From 11f0ece58f28cd588119cf2264d0d6600498927e Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 10 Nov 2021 13:43:52 +0000 Subject: LibWeb: Add initial values for all CSS properties It's a little verbose to repeat these in cases like the borders, but if everything has an initial value, we can guarantee that `property_initial_value()` will return something! :^) --- Userland/Libraries/LibWeb/CSS/Properties.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/Properties.json b/Userland/Libraries/LibWeb/CSS/Properties.json index 487271f5b3..70da58ff6a 100644 --- a/Userland/Libraries/LibWeb/CSS/Properties.json +++ b/Userland/Libraries/LibWeb/CSS/Properties.json @@ -118,6 +118,8 @@ ] }, "border": { + "inherited": false, + "initial": "medium currentcolor none", "longhands": [ "border-width", "border-style", @@ -125,6 +127,8 @@ ] }, "border-top": { + "inherited": false, + "initial": "medium currentcolor none", "longhands": [ "border-top-width", "border-top-style", @@ -132,6 +136,8 @@ ] }, "border-right": { + "inherited": false, + "initial": "medium currentcolor none", "longhands": [ "border-right-width", "border-right-style", @@ -139,6 +145,8 @@ ] }, "border-bottom": { + "inherited": false, + "initial": "medium currentcolor none", "longhands": [ "border-bottom-width", "border-bottom-style", @@ -146,6 +154,8 @@ ] }, "border-left": { + "inherited": false, + "initial": "medium currentcolor none", "longhands": [ "border-left-width", "border-left-style", @@ -277,6 +287,8 @@ ] }, "border-radius": { + "inherited": false, + "initial": "0", "longhands": [ "border-top-left-radius", "border-top-right-radius", @@ -581,6 +593,8 @@ ] }, "flex": { + "inherited": false, + "initial": "0 1 auto", "longhands": [ "flex-grow", "flex-shrink", @@ -610,6 +624,8 @@ ] }, "flex-flow": { + "inherited": false, + "initial": "row nowrap", "longhands": [ "flex-direction", "flex-wrap" @@ -648,6 +664,8 @@ ] }, "font": { + "inherited": true, + "initial": "normal medium sans-serif", "longhands": [ "font-family", "font-size", @@ -778,6 +796,7 @@ }, "list-style": { "inherited": true, + "initial": "outside disc", "longhands": [ "list-style-type", "list-style-position", @@ -824,6 +843,8 @@ ] }, "margin": { + "inherited": false, + "initial": "0", "longhands": [ "margin-top", "margin-right", @@ -964,6 +985,8 @@ }, "outline": { "inherited": false, + "__comment": "FIXME: Initial value is really `medium invert none` but we don't yet parse the outline shorthand.", + "initial": "none", "longhands": [ "outline-color", "outline-style", @@ -1047,6 +1070,8 @@ ] }, "padding": { + "inherited": false, + "initial": "0", "longhands": [ "padding-top", "padding-right", -- cgit v1.2.3