Commit graph

3 commits

Author SHA1 Message Date
Zaggy1024
e6664213ac LibWeb: Fall back to TextInputBox for unsupported input types
This isn't strictly correct as it stands currently, since the size
attribute isn't supposed to affect type="time" and others, but those
types currently end up with zero width instead.

Size could probably be applied through shadow DOM style, and the input
layout box would simply allow content sizing.
2026-06-05 12:49:24 +02:00
Andreas Kling
ec29db716c LibWeb: Size appearance-none text inputs for max-content
Use the text-control auto content size when calculating max-content
width for primitive text input widgets. CSS Sizing treats cyclic
percentage preferred sizes as initial values for non-replaced
max-content contributions, so an `appearance: none` input with
`width: 100%` should contribute its `width: auto` size instead of
collapsing to zero.

Keep the min-content path unchanged so the percentage-sized replaced
element rule can still compress non-button-like input controls for
flex automatic minimum sizing. Add coverage for an inline-flex
control matching the GitHub file search layout.
2026-05-20 22:31:38 +02:00
Jonathan Gamble
d3cdeb3ac5 LibWeb: Implement auto_content_box_size for textarea and input
This allows default and attribute-based sizing when an axis is auto,
without overriding extrinsic sizing.
2026-02-02 14:36:49 +00:00