mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Let flexbox stretch auto-width text inputs
Don't rewrite text input 'width: auto' to 'size()ch' in 'HTMLInputElement::adjust_computed_style()'. That turns the control into a definite-width flex item and prevents 'align-items: stretch' from expanding it across the flex container. Fixes the layout of the input element on the element matrix login page.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
46fcf51bf7
commit
482e5e770f
Notes:
github-actions[bot]
2026-04-13 07:58:05 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/482e5e770fd Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8873 Reviewed-by: https://github.com/gmta ✅
@@ -185,11 +185,6 @@ void HTMLInputElement::adjust_computed_style(CSS::ComputedProperties& style)
|
||||
if (style.display().is_inline_outside() && style.display().is_flow_inside())
|
||||
style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::InlineBlock)));
|
||||
|
||||
if (type_state() != TypeAttributeState::FileUpload) {
|
||||
if (style.property(CSS::PropertyID::Width).has_auto())
|
||||
style.set_property(CSS::PropertyID::Width, CSS::LengthStyleValue::create(CSS::Length(size(), CSS::LengthUnit::Ch)));
|
||||
}
|
||||
|
||||
// NOTE: Other browsers apply a minimum height of a single line's line-height to single-line input elements.
|
||||
if (is_single_line() && style.property(CSS::PropertyID::Height).has_auto()) {
|
||||
auto current_line_height = style.line_height().to_double();
|
||||
|
||||
Reference in New Issue
Block a user