diff --git a/Tests/LibWeb/Layout/expected/inline-size.txt b/Tests/LibWeb/Layout/expected/inline-size.txt index 64faca20cb..293a828e94 100644 --- a/Tests/LibWeb/Layout/expected/inline-size.txt +++ b/Tests/LibWeb/Layout/expected/inline-size.txt @@ -1,6 +1,6 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x570 [BFC] children: not-inline - BlockContainer
at (8,70) content-size 784x492 children: not-inline + BlockContainer at (0,0) content-size 800x986 [BFC] children: not-inline + BlockContainer at (8,70) content-size 784x908 children: not-inline BlockContainer.min-inline-test) [8,70 784x200] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [8,340 784x76] PaintableWithLines (BlockContainer
.max-inline-test) [8,486 100x76] TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer(anonymous)) [8,632 784x0] + PaintableWithLines (BlockContainer(anonymous)) [8,632 784x76] + PaintableWithLines (BlockContainer
.inline-size-test) [8,778 400x200] + TextPaintable (TextNode<#text>) + PaintableWithLines (BlockContainer(anonymous)) [8,1048 784x0] diff --git a/Tests/LibWeb/Layout/input/inline-size.html b/Tests/LibWeb/Layout/input/inline-size.html index d81253bac5..ec3fd3b9d5 100644 --- a/Tests/LibWeb/Layout/input/inline-size.html +++ b/Tests/LibWeb/Layout/input/inline-size.html @@ -19,7 +19,14 @@ max-inline-size: 100px; writing-mode: horizontal-tb; } +.inline-size-test { + background: blue; + inline-size: 400px; + height: 200px; +}
KK
KK
+KK
diff --git a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt index 632e31c5fb..bc4bd6fac5 100644 --- a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt +++ b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt @@ -85,6 +85,7 @@ grid-template-columns: grid-template-rows: height: 1445px image-rendering: auto +inline-size: auto inset-block-end: auto inset-block-start: auto inset-inline-end: auto diff --git a/Userland/Libraries/LibWeb/CSS/Properties.json b/Userland/Libraries/LibWeb/CSS/Properties.json index d367c2ea65..ab9f38f8ce 100644 --- a/Userland/Libraries/LibWeb/CSS/Properties.json +++ b/Userland/Libraries/LibWeb/CSS/Properties.json @@ -1307,6 +1307,13 @@ "image-rendering" ] }, + "inline-size": { + "logical-alias-for": [ + "width" + ], + "initial": "auto", + "max-values": 1 + }, "inset": { "inherited": false, "initial": "auto", diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index b959e5f17f..71b79a720b 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -375,6 +375,8 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i return PropertyID::PaddingLeft; case PropertyID::PaddingInlineEnd: return PropertyID::PaddingRight; + case PropertyID::InlineSize: + return PropertyID::Width; case PropertyID::InsetBlockStart: return PropertyID::Top; case PropertyID::InsetBlockEnd: