Parcourir la source

LibWeb: Add font-variant-* css properties

Johan Dahlin il y a 9 mois
Parent
commit
8bd94e2593

+ 57 - 2
Libraries/LibWeb/CSS/Enums.json

@@ -221,9 +221,64 @@
     "fallback",
     "optional"
   ],
-  "font-variant": [
+  "font-variant-alternates": [
     "normal",
-    "small-caps"
+    "historical-forms"
+  ],
+  "font-variant-caps": [
+    "normal",
+    "small-caps",
+    "all-small-caps",
+    "petite-caps",
+    "all-petite-caps",
+    "unicase",
+    "titling-caps"
+  ],
+  "font-variant-east-asian": [
+    "normal",
+    "ruby",
+    "jis78",
+    "jis83",
+    "jis90",
+    "jis04",
+    "simplified",
+    "traditional",
+    "full-width",
+    "proportional-width"
+  ],
+  "font-variant-emoji": [
+    "normal",
+    "text",
+    "emoji",
+    "unicode"
+  ],
+  "font-variant-ligatures": [
+    "normal",
+    "none",
+    "common-ligatures",
+    "no-common-ligatures",
+    "discretionary-ligatures",
+    "no-discretionary-ligatures",
+    "historical-ligatures",
+    "no-historical-ligatures",
+    "contextual",
+    "no-contextual"
+  ],
+  "font-variant-numeric": [
+    "normal",
+    "ordinal",
+    "slashed-zero",
+    "lining-nums",
+    "oldstyle-nums",
+    "proportional-nums",
+    "tabular-nums",
+    "diagonal-fractions",
+    "stacked-fractions"
+  ],
+  "font-variant-position": [
+    "normal",
+    "sub",
+    "super"
   ],
   "font-width": [
     "ultra-condensed",

+ 31 - 0
Libraries/LibWeb/CSS/Keywords.json

@@ -67,7 +67,9 @@
   "additive",
   "alias",
   "all",
+  "all-petite-caps",
   "all-scroll",
+  "all-small-caps",
   "alpha",
   "alternate",
   "alternate-reverse",
@@ -114,6 +116,7 @@
   "collapse",
   "column",
   "column-reverse",
+  "common-ligatures",
   "compact",
   "condensed",
   "contain",
@@ -121,6 +124,7 @@
   "content-box",
   "contents",
   "context-menu",
+  "contextual",
   "copy",
   "cover",
   "crisp-edges",
@@ -133,7 +137,9 @@
   "decimal",
   "decimal-leading-zero",
   "default",
+  "diagonal-fractions",
   "disc",
+  "discretionary-ligatures",
   "disclosure-closed",
   "disclosure-open",
   "distribute",
@@ -147,6 +153,7 @@
   "ease-out",
   "ellipsis",
   "embed",
+  "emoji",
   "enabled",
   "end",
   "evenodd",
@@ -185,6 +192,8 @@
   "high-quality",
   "highlight",
   "highlighttext",
+  "historical-forms",
+  "historical-ligatures",
   "horizontal-tb",
   "hover",
   "inactiveborder",
@@ -213,6 +222,10 @@
   "isolate",
   "isolate-override",
   "italic",
+  "jis04",
+  "jis78",
+  "jis83",
+  "jis90", 
   "jump-both",
   "jump-end",
   "jump-none",
@@ -229,6 +242,7 @@
   "lighter",
   "line-through",
   "linear",
+  "lining-nums",
   "linktext",
   "list-item",
   "listbox",
@@ -262,7 +276,11 @@
   "nearest",
   "nesw-resize",
   "no-close-quote",
+  "no-common-ligatures",  
+  "no-contextual",
+  "no-discretionary-ligatures",
   "no-drop",
+  "no-historical-ligatures",
   "no-open-quote",
   "no-preference",
   "no-repeat",
@@ -276,12 +294,14 @@
   "nwse-resize",
   "oblique",
   "off",
+  "oldstyle-nums",
   "on",
   "opaque",
   "open-quote",
   "optimizequality",
   "optimizespeed",
   "optional",
+  "ordinal",
   "outset",
   "outside",
   "overline",
@@ -289,6 +309,7 @@
   "padding-box",
   "paged",
   "paused",
+  "petite-caps",
   "pixelated",
   "plaintext",
   "pointer",
@@ -299,6 +320,8 @@
   "progress",
   "progress-bar",
   "progressive",
+  "proportional-nums",
+  "proportional-width",
   "push-button",
   "radio",
   "rec2020",
@@ -342,6 +365,8 @@
   "serif",
   "sideways-lr",
   "sideways-rl",
+  "simplified",
+  "slashed-zero",
   "slider-horizontal",
   "slow",
   "small",
@@ -357,6 +382,7 @@
   "square-button",
   "srgb",
   "stable",
+  "stacked-fractions",
   "standalone",
   "standard",
   "start",
@@ -378,6 +404,7 @@
   "table-header-group",
   "table-row",
   "table-row-group",
+  "tabular-nums",
   "text",
   "text-bottom",
   "text-top",
@@ -385,6 +412,7 @@
   "textfield",
   "thick",
   "thin",
+  "titling-caps",
   "threeddarkshadow",
   "threedface",
   "threedhighlight",
@@ -392,6 +420,7 @@
   "threedshadow",
   "to-zero",
   "top",
+  "traditional",
   "ui-monospace",
   "ui-rounded",
   "ui-sans-serif",
@@ -399,6 +428,8 @@
   "ultra-condensed",
   "ultra-expanded",
   "underline",
+  "unicase",
+  "unicode",
   "unsafe",
   "unset",
   "up",

+ 65 - 1
Libraries/LibWeb/CSS/Properties.json

@@ -1243,11 +1243,75 @@
     ]
   },
   "font-variant": {
+    "inherited": true,
+    "initial": "normal",
+    "longhands": [
+      "font-variant-alternates",
+      "font-variant-caps",
+      "font-variant-east-asian",
+      "font-variant-emoji",
+      "font-variant-ligatures",
+      "font-variant-numeric",
+      "font-variant-position"
+    ],
+    "valid-types": [
+      "string"
+    ]
+  },
+  "font-variant-alternates": {
+    "animation-type": "discrete",
+    "inherited": true,
+    "initial": "normal",
+    "valid-types": [
+      "font-variant-alternates"
+    ]
+  },
+  "font-variant-caps": {
+    "animation-type": "discrete",
+    "inherited": true,
+    "initial": "normal",
+    "valid-types": [
+      "font-variant-caps"
+    ]
+  },
+  "font-variant-east-asian": {
+    "animation-type": "discrete",
+    "inherited": true,
+    "initial": "normal",
+    "valid-types": [
+      "font-variant-east-asian"
+    ]
+  },
+  "font-variant-emoji": {
+    "animation-type": "discrete",
+    "inherited": true,
+    "initial": "normal",
+    "valid-types": [
+      "font-variant-emoji"
+    ]
+  },
+  "font-variant-ligatures": {
+    "animation-type": "discrete",
+    "inherited": true,
+    "initial": "normal",
+    "valid-types": [
+      "font-variant-ligatures"
+    ]
+  },
+  "font-variant-numeric": {
+    "animation-type": "discrete",
+    "inherited": true,
+    "initial": "normal",
+    "valid-types": [
+      "font-variant-numeric"
+    ]
+  },
+  "font-variant-position": {
     "animation-type": "discrete",
     "inherited": true,
     "initial": "normal",
     "valid-types": [
-      "font-variant"
+      "font-variant-position"
     ]
   },
   "font-variation-settings": {