From d5e61168b2a37ac6d22a61fd5f5594aa16907526 Mon Sep 17 00:00:00 2001 From: MacDue Date: Sun, 2 Apr 2023 22:52:54 +0100 Subject: [PATCH] LibWeb: Add longhand properties for background-position If background-position was not longhand enough for you, we've now got background-position-x and background-position-y :^) --- Userland/Libraries/LibWeb/CSS/Properties.json | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/Properties.json b/Userland/Libraries/LibWeb/CSS/Properties.json index 36ac8221c6..bc27cae21a 100644 --- a/Userland/Libraries/LibWeb/CSS/Properties.json +++ b/Userland/Libraries/LibWeb/CSS/Properties.json @@ -126,6 +126,44 @@ "right", "top" ], + "quirks": [ + "unitless-length" + ], + "longhands": [ + "background-position-x", + "background-position-y" + ] + }, + "background-position-x": { + "inherited": false, + "affects-layout": false, + "initial": "0%", + "valid-types": [ + "length", + "percentage" + ], + "valid-identifiers": [ + "center", + "left", + "right" + ], + "quirks": [ + "unitless-length" + ] + }, + "background-position-y": { + "inherited": false, + "affects-layout": false, + "initial": "0%", + "valid-types": [ + "length", + "percentage" + ], + "valid-identifiers": [ + "center", + "bottom", + "top" + ], "quirks": [ "unitless-length" ]