Kaynağa Gözat

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! :^)
Sam Atkins 3 yıl önce
ebeveyn
işleme
11f0ece58f
1 değiştirilmiş dosya ile 25 ekleme ve 0 silme
  1. 25 0
      Userland/Libraries/LibWeb/CSS/Properties.json

+ 25 - 0
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",