From 7e11de272fd3bf59564ccb650875c3576449898f Mon Sep 17 00:00:00 2001 From: Tobias Christiansen Date: Mon, 16 Oct 2023 13:49:52 +0200 Subject: [PATCH] LibWeb: Add 'object-position' property and 'position' enum This patch adds the 'object-position' CSS property description to the json for code generation. Also the 'position' enum is added. The values of this enum are the valid inputs to the object-position property from CSS Values-4. --- Userland/Libraries/LibWeb/CSS/Enums.json | 7 +++++++ Userland/Libraries/LibWeb/CSS/Properties.json | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/Enums.json b/Userland/Libraries/LibWeb/CSS/Enums.json index 8a38daa95b..1eded3827e 100644 --- a/Userland/Libraries/LibWeb/CSS/Enums.json +++ b/Userland/Libraries/LibWeb/CSS/Enums.json @@ -319,6 +319,13 @@ "all", "none" ], + "position": [ + "left", + "right", + "top", + "bottom", + "center" + ], "positioning": [ "absolute", "fixed", diff --git a/Userland/Libraries/LibWeb/CSS/Properties.json b/Userland/Libraries/LibWeb/CSS/Properties.json index bf062e9626..9b21c7e38f 100644 --- a/Userland/Libraries/LibWeb/CSS/Properties.json +++ b/Userland/Libraries/LibWeb/CSS/Properties.json @@ -1624,6 +1624,18 @@ "object-fit" ] }, + "object-position": { + "affects-layout": false, + "inherited": false, + "initial": "50% 50%", + "max-values": 2, + "valid-types": [ + "length [-∞,∞]", + "percentage [-∞,∞]", + "position" + ], + "percentages-resolve-to": "length" + }, "opacity": { "affects-layout": false, "affects-stacking-context": true,