Skip to content

Buttons with display: inline are empty #2395

@Psychpsyo

Description

@Psychpsyo

Summary

Putting display: inline on a <button> makes it be empty.

Operating system

Linux

Steps to reproduce

  1. <button style="display: inline">Hello!</button>

Expected behavior

<button style="display: inline">This should be visible.</button>

Actual behavior

<button style="display: inline">This is invisible.</button>

URL for a reduced test case

data:text/html,<button style="display: inline">Hello!</button>

HTML/SVG/etc. source for a reduced test case

<button style="display: inline">Hello!</button>

Log output and (if possible) backtrace

4045.236 WebContent(6905): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
4045.236 WebContent(6905): BlockContainer <input> (not painted) [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: not-inline
  BlockContainer <(anonymous)> (not painted) flex-container(column) [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] [FFC] children: not-inline
    BlockContainer <(anonymous)> (not painted) [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] [BFC] children: inline
      BlockContainer <span> (not painted) inline-block [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] [BFC] children: inline
        TextNode <#text>

Screenshots or screen recordings

Reduced test case in Ladybird:
image

Reduced test case in Firefox:
image

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcsshas reproWe have a way to reproduce this bug.layout

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions