瀏覽代碼

LibWeb: Make -webkit-appearance an alias for the appearance css property

Bastiaan van der Plaat 1 年之前
父節點
當前提交
44ff957784

+ 1 - 0
Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt

@@ -1,3 +1,4 @@
+-webkit-appearance: auto
 accent-color: auto
 align-content: stretch
 align-items: normal

+ 6 - 0
Userland/Libraries/LibWeb/CSS/Properties.json

@@ -1,4 +1,10 @@
 {
+  "-webkit-appearance": {
+    "logical-alias-for": [
+      "appearance"
+    ],
+    "max-values": 1
+  },
   "accent-color": {
     "inherited": true,
     "initial": "auto",

+ 2 - 0
Userland/Libraries/LibWeb/CSS/StyleComputer.cpp

@@ -395,6 +395,8 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
             return PropertyID::Left;
         case PropertyID::InsetInlineEnd:
             return PropertyID::Right;
+        case PropertyID::WebkitAppearance:
+            return PropertyID::Appearance;
         default:
             return {};
         }