Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexbox does not handle elements with intrinsic sizes correctly #2516

Open
1 task
Psychpsyo opened this issue Nov 23, 2024 · 0 comments
Open
1 task

Flexbox does not handle elements with intrinsic sizes correctly #2516

Psychpsyo opened this issue Nov 23, 2024 · 0 comments

Comments

@Psychpsyo
Copy link
Contributor

Summary

When I put a <button> into a column flexbox in Ladybird, it does not stretch to the full width of the flexbox.

Operating system

Linux

Steps to reproduce

  1. Make a flexbox with flex-direction: column and put a button in it.
  2. Make sure that the flexbox is wider than the button
  3. Notice how the button does to grow to be as wide as the flexbox itself.

Expected behavior

I think the button should grow horizontally to fill the entire width of the flexbox.
At least that's the behavior in Firefox and Chrome, but after much starting at the specs and the code, I can't figure out where exactly this is supposed to happen.

Actual behavior

The button is it's usual size and does not grow.

URL for a reduced test case

data:text/html;base64,PHN0eWxlPiNmbGV4e2Rpc3BsYXk6ZmxleDtmbGV4LWRpcmVjdGlvbjpjb2x1bW47d2lkdGg6MTAwJTt9I2ZsZXg+KntiYWNrZ3JvdW5kLWNvbG9yOmxpZ2h0Z3JheTt9PC9zdHlsZT48ZGl2IGlkPSJmbGV4Ij48YnV0dG9uPlRlc3Q8L2J1dHRvbj48L2Rpdj4=

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

<style>
  #flex {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  #flex > * {
    background-color: lightgray;
  }
</style>

<div id="flex">
  <button>Test</button>
</div>

Log output and (if possible) backtrace

None

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant