#c) [740,8 52x52]
diff --git a/Tests/LibWeb/Layout/input/block-and-inline/float-logical.html b/Tests/LibWeb/Layout/input/block-and-inline/float-logical.html
new file mode 100644
index 00000000000..ff69fb1c6bb
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/block-and-inline/float-logical.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/Userland/Libraries/LibWeb/CSS/Enums.json b/Userland/Libraries/LibWeb/CSS/Enums.json
index 53813ed7b09..7417904f0a8 100644
--- a/Userland/Libraries/LibWeb/CSS/Enums.json
+++ b/Userland/Libraries/LibWeb/CSS/Enums.json
@@ -195,7 +195,9 @@
"float": [
"none",
"left",
- "right"
+ "right",
+ "inline-start",
+ "inline-end"
],
"font-variant": [
"normal",
diff --git a/Userland/Libraries/LibWeb/CSS/Identifiers.json b/Userland/Libraries/LibWeb/CSS/Identifiers.json
index a77ee7b0526..cc55d849049 100644
--- a/Userland/Libraries/LibWeb/CSS/Identifiers.json
+++ b/Userland/Libraries/LibWeb/CSS/Identifiers.json
@@ -188,8 +188,10 @@
"initial-only",
"inline",
"inline-block",
+ "inline-end",
"inline-flex",
"inline-grid",
+ "inline-start",
"inline-table",
"inset",
"inside",
diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
index f7ac2665863..9eb384bc764 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
@@ -711,6 +711,19 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i
return;
}
+ if (property_id == CSS::PropertyID::Float) {
+ auto ident = value.to_identifier();
+
+ // FIXME: Honor writing-mode, direction and text-orientation.
+ if (ident == CSS::ValueID::InlineStart) {
+ set_longhand_property(CSS::PropertyID::Float, IdentifierStyleValue::create(CSS::ValueID::Left));
+ return;
+ } else if (ident == CSS::ValueID::InlineEnd) {
+ set_longhand_property(CSS::PropertyID::Float, IdentifierStyleValue::create(CSS::ValueID::Right));
+ return;
+ }
+ }
+
if (property_is_shorthand(property_id)) {
// ShorthandStyleValue was handled already.
// That means if we got here, that `value` must be a CSS-wide keyword, which we should apply to our longhand properties.