Backed out changeset 2fc34d798e24 (bug 1917771) for causing failures at baseline...
[gecko.git] / layout / style / test / property_database.js
blobbf7b98bd4fe28200bbe6fd9c80ae491a243abf87
1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
2 /* eslint-disable dot-notation */
3 /* vim: set ts=2 sw=2 sts=2 et: */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 // Utility function. Returns true if the given boolean pref...
9 //  (a) exists and (b) is set to true.
10 // Otherwise, returns false.
12 // This function also reports a test failure if the pref isn't set at all. This
13 // ensures that we remove pref-checks from mochitests (instead of accidentally
14 // disabling the tests that are controlled by that check) when we remove a
15 // mature feature's pref from the rest of the codebase.
16 function IsCSSPropertyPrefEnabled(prefName) {
17   try {
18     if (SpecialPowers.getBoolPref(prefName)) {
19       return true;
20     }
21   } catch (ex) {
22     ok(
23       false,
24       "Failed to look up property-controlling pref '" +
25         prefName +
26         "' (" +
27         ex +
28         ")"
29     );
30   }
32   return false;
35 // True longhand properties.
36 const CSS_TYPE_LONGHAND = 0;
38 // True shorthand properties.
39 const CSS_TYPE_TRUE_SHORTHAND = 1;
41 // Properties that we handle as shorthands but were longhands either in
42 // the current spec or earlier versions of the spec.
43 const CSS_TYPE_SHORTHAND_AND_LONGHAND = 2;
45 // Legacy shorthand properties, that behave mostly like an alias
46 // (CSS_TYPE_SHORTHAND_AND_LONGHAND) but not quite because their syntax may not
47 // match, plus they shouldn't serialize in cssText.
48 const CSS_TYPE_LEGACY_SHORTHAND = 3;
50 // Each property has the following fields:
51 //   domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties
52 //   inherited: Whether the property is inherited by default (stated as
53 //     yes or no in the property header in all CSS specs)
54 //   type: see above
55 //   alias_for: optional, indicates that the property is an alias for
56 //     some other property that is the preferred serialization.  (Type
57 //     must not be CSS_TYPE_LONGHAND.)
58 //   logical: optional, indicates that the property is a logical directional
59 //     property.  (Type must be CSS_TYPE_LONGHAND.)
60 //   axis: optional, indicates that the property is an axis-related logical
61 //     directional property.  (Type must be CSS_TYPE_LONGHAND and 'logical'
62 //     must be true.)
63 //   initial_values: Values whose computed value should be the same as the
64 //     computed value for the property's initial value.
65 //   other_values: Values whose computed value should be different from the
66 //     computed value for the property's initial value.
67 //   XXX Should have a third field for values whose computed value may or
68 //     may not be the same as for the property's initial value.
69 //   invalid_values: Things that are not values for the property and
70 //     should be rejected, but which are balanced and should not absorb
71 //     what follows
72 //   quirks_values: Values that should be accepted in quirks mode only,
73 //     mapped to the values they are equivalent to.
74 //   unbalanced_values: Things that are not values for the property and
75 //     should be rejected, and which also contain unbalanced constructs
76 //     that should absorb what follows
78 // Note: By default, an alias is assumed to accept/reject the same values as
79 // the property that it aliases, and to have the same prerequisites. So, if
80 // "alias_for" is set, the "*_values" and "prerequisites" fields can simply
81 // be omitted, and they'll be populated automatically to match the aliased
82 // property's fields.
84 // Helper functions used to construct gCSSProperties.
86 function initial_font_family_is_sans_serif() {
87   // The initial value of 'font-family' might be 'serif' or
88   // 'sans-serif'.
89   const meta = document.createElement("meta");
90   meta.setAttribute("style", "font: initial;");
91   document.documentElement.appendChild(meta);
92   const family = getComputedStyle(meta).fontFamily;
93   meta.remove();
94   return family == "sans-serif";
97 var gInitialFontFamilyIsSansSerif = initial_font_family_is_sans_serif();
99 // shared by background-image and border-image-source
100 var validNonUrlImageValues = [
101   "-moz-element(#a)",
102   "-moz-element(  #a  )",
103   "-moz-element(#a-1)",
104   "-moz-element(#a\\:1)",
105   /* gradient torture test */
106   "linear-gradient(red, blue)",
107   "linear-gradient(red, yellow, blue)",
108   "linear-gradient(red 1px, yellow 20%, blue 24em, green)",
109   "linear-gradient(red, yellow, green, blue 50%)",
110   "linear-gradient(red -50%, yellow -25%, green, blue)",
111   "linear-gradient(red -99px, yellow, green, blue 120%)",
112   "linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
113   "linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
114   "linear-gradient(red, green calc(50% + 20px), blue)",
115   "linear-gradient(180deg, red, blue)",
117   "linear-gradient(to top, red, blue)",
118   "linear-gradient(to bottom, red, blue)",
119   "linear-gradient(to left, red, blue)",
120   "linear-gradient(to right, red, blue)",
121   "linear-gradient(to top left, red, blue)",
122   "linear-gradient(to top right, red, blue)",
123   "linear-gradient(to bottom left, red, blue)",
124   "linear-gradient(to bottom right, red, blue)",
125   "linear-gradient(to left top, red, blue)",
126   "linear-gradient(to left bottom, red, blue)",
127   "linear-gradient(to right top, red, blue)",
128   "linear-gradient(to right bottom, red, blue)",
130   "linear-gradient(-33deg, red, blue)",
131   "linear-gradient(30grad, red, blue)",
132   "linear-gradient(10deg, red, blue)",
133   "linear-gradient(1turn, red, blue)",
134   "linear-gradient(.414rad, red, blue)",
136   "linear-gradient(.414rad, red, 50%, blue)",
137   "linear-gradient(.414rad, red, 0%, blue)",
138   "linear-gradient(.414rad, red, 100%, blue)",
140   "linear-gradient(.414rad, red 50%, 50%, blue 50%)",
141   "linear-gradient(.414rad, red 50%, 20%, blue 50%)",
142   "linear-gradient(.414rad, red 50%, 30%, blue 10%)",
143   "linear-gradient(to right bottom, red, 20%, green 50%, 65%, blue)",
144   "linear-gradient(to right bottom, red, 20%, green 10%, blue)",
145   "linear-gradient(to right bottom, red, 50%, green 50%, 50%, blue)",
146   "linear-gradient(to right bottom, red, 0%, green 50%, 100%, blue)",
148   "linear-gradient(red 0% 100%)",
149   "linear-gradient(red 0% 50%, blue 50%)",
150   "linear-gradient(red 0% 50%, blue 50% 100%)",
151   "linear-gradient(red 0% 50%, 0%, blue 50%)",
152   "linear-gradient(red 0% 50%, 0%, blue 50% 100%)",
154   /* Unitless 0 is valid as an <angle> */
155   "linear-gradient(0, red, blue)",
157   "radial-gradient(red, blue)",
158   "radial-gradient(red, yellow, blue)",
159   "radial-gradient(red 1px, yellow 20%, blue 24em, green)",
160   "radial-gradient(red, yellow, green, blue 50%)",
161   "radial-gradient(red -50%, yellow -25%, green, blue)",
162   "radial-gradient(red -99px, yellow, green, blue 120%)",
163   "radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
165   "radial-gradient(0 0, red, blue)",
166   "radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
168   "radial-gradient(at top left, red, blue)",
169   "radial-gradient(at 20% bottom, red, blue)",
170   "radial-gradient(at center 20%, red, blue)",
171   "radial-gradient(at left 35px, red, blue)",
172   "radial-gradient(at 10% 10em, red, blue)",
173   "radial-gradient(at 44px top, red, blue)",
174   "radial-gradient(at 0 0, red, blue)",
176   "radial-gradient(farthest-corner, red, blue)",
177   "radial-gradient(circle, red, blue)",
178   "radial-gradient(ellipse closest-corner, red, blue)",
179   "radial-gradient(closest-corner ellipse, red, blue)",
180   "radial-gradient(farthest-side circle, red, blue)",
182   "radial-gradient(at 43px, red, blue)",
183   "radial-gradient(at 43px 43px, red, blue)",
184   "radial-gradient(at 50% 50%, red, blue)",
185   "radial-gradient(at 43px 50%, red, blue)",
186   "radial-gradient(at 50% 43px, red, blue)",
187   "radial-gradient(circle 43px, red, blue)",
188   "radial-gradient(43px circle, red, blue)",
189   "radial-gradient(ellipse 43px 43px, red, blue)",
190   "radial-gradient(ellipse 50% 50%, red, blue)",
191   "radial-gradient(ellipse 43px 50%, red, blue)",
192   "radial-gradient(ellipse 50% 43px, red, blue)",
193   "radial-gradient(50% 43px ellipse, red, blue)",
195   "radial-gradient(farthest-corner at top left, red, blue)",
196   "radial-gradient(ellipse closest-corner at 45px, red, blue)",
197   "radial-gradient(circle farthest-side at 45px, red, blue)",
198   "radial-gradient(closest-side ellipse at 50%, red, blue)",
199   "radial-gradient(farthest-corner circle at 4em, red, blue)",
201   "radial-gradient(30% 40% at top left, red, blue)",
202   "radial-gradient(50px 60px at 15% 20%, red, blue)",
203   "radial-gradient(7em 8em at 45px, red, blue)",
205   "radial-gradient(circle at 15% 20%, red, blue)",
207   "radial-gradient(red 0% 100%)",
208   "radial-gradient(red 0% 50%, blue 50%)",
209   "radial-gradient(red 0% 50%, blue 50% 100%)",
210   "radial-gradient(red 0% 50%, 0%, blue 50%)",
211   "radial-gradient(red 0% 50%, 0%, blue 50% 100%)",
213   "repeating-radial-gradient(red, blue)",
214   "repeating-radial-gradient(red, yellow, blue)",
215   "repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
216   "repeating-radial-gradient(red, yellow, green, blue 50%)",
217   "repeating-radial-gradient(red -50%, yellow -25%, green, blue)",
218   "repeating-radial-gradient(red -99px, yellow, green, blue 120%)",
219   "repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
220   "repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
222   "repeating-radial-gradient(at top left, red, blue)",
223   "repeating-radial-gradient(at 0 0, red, blue)",
224   "repeating-radial-gradient(at 20% bottom, red, blue)",
225   "repeating-radial-gradient(at center 20%, red, blue)",
226   "repeating-radial-gradient(at left 35px, red, blue)",
227   "repeating-radial-gradient(at 10% 10em, red, blue)",
228   "repeating-radial-gradient(at 44px top, red, blue)",
230   "repeating-radial-gradient(farthest-corner at top left, red, blue)",
231   "repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)",
232   "repeating-radial-gradient(farthest-side circle at 45px, red, blue)",
233   "repeating-radial-gradient(ellipse closest-side at 50%, red, blue)",
234   "repeating-radial-gradient(circle farthest-corner at 4em, red, blue)",
236   "repeating-radial-gradient(30% 40% at top left, red, blue)",
237   "repeating-radial-gradient(50px 60px at 15% 20%, red, blue)",
238   "repeating-radial-gradient(7em 8em at 45px, red, blue)",
240   // When that happens this should be moved to the `invalid` list.
241   "repeating-radial-gradient(circle closest-side at left 0px bottom 7in, hsl(2,2%,5%), rgb(1,6,0))",
243   "radial-gradient(at calc(25%) top, red, blue)",
244   "radial-gradient(at left calc(25%), red, blue)",
245   "radial-gradient(at calc(25px) top, red, blue)",
246   "radial-gradient(at left calc(25px), red, blue)",
247   "radial-gradient(at calc(-25%) top, red, blue)",
248   "radial-gradient(at left calc(-25%), red, blue)",
249   "radial-gradient(at calc(-25px) top, red, blue)",
250   "radial-gradient(at left calc(-25px), red, blue)",
251   "radial-gradient(at calc(100px + -25%) top, red, blue)",
252   "radial-gradient(at left calc(100px + -25%), red, blue)",
253   "radial-gradient(at calc(100px + -25px) top, red, blue)",
254   "radial-gradient(at left calc(100px + -25px), red, blue)",
256   "image-set(linear-gradient(green, green) 1x, url(foobar.png) 2x)",
257   "image-set(linear-gradient(red, red), url(foobar.png) 2x)",
258   "image-set(url(foobar.png) 2x)",
259   "image-set(url(foobar.png) 1x, url(bar.png) 2x, url(baz.png) 3x)",
260   "image-set('foobar.png', 'bar.png' 2x, url(baz.png) 3x)",
261   "image-set(url(foobar.png) type('image/png'))",
262   "image-set(url(foobar.png) 1x type('image/png'))",
263   "image-set(url(foobar.png) type('image/png') 1x)",
265   ...(IsCSSPropertyPrefEnabled("layout.css.cross-fade.enabled")
266     ? [
267         "cross-fade(red, blue)",
268         "cross-fade(red)",
269         "cross-fade(red 50%)",
270         // see: <https://github.com/w3c/csswg-drafts/issues/5333>. This
271         // may become invalid depending on how discussion on that issue
272         // goes.
273         "cross-fade(red -50%, blue 150%)",
274         "cross-fade(red -50%, url(www.example.com))",
276         "cross-fade(url(http://placekitten.com/200/300), 55% linear-gradient(red, blue))",
277         "cross-fade(cross-fade(red, white), cross-fade(blue))",
278         "cross-fade(gold 77%, 60% blue)",
280         "cross-fade(url(http://placekitten.com/200/300), url(http://placekitten.com/200/300))",
281         "cross-fade(#F0F8FF, rgb(0, 0, 0), rgba(0, 255, 0, 1) 25%)",
282       ]
283     : []),
285   // Conic gradient
286   "conic-gradient(red, blue)",
287   "conic-gradient(red,blue,yellow)",
288   "conic-gradient(  red  ,  blue,   yellow)",
289   "conic-gradient(red 0, blue 50deg)",
290   "conic-gradient(red 10%, blue 50%)",
291   "conic-gradient(red -50deg, blue 50deg)",
292   "conic-gradient(red 50deg, blue 0.3turn, yellow 200grad, orange 60% 5rad)",
294   "conic-gradient(red 0 100%)",
295   "conic-gradient(red 0 50%, blue 50%)",
296   "conic-gradient(red 0 50deg, blue 50% 100%)",
297   "conic-gradient(red 0 50%, 0deg, blue 50%)",
298   "conic-gradient(red 0deg 50%, 0%, blue 50% 100%)",
300   "conic-gradient(from 0, red, blue)",
301   "conic-gradient(from 40deg, red, blue)",
302   "conic-gradient(from 0.4turn, red, blue)",
303   "conic-gradient(from 200grad, red, blue)",
304   "conic-gradient(from 5rad, red, blue)",
306   "conic-gradient(at top, red, blue)",
307   "conic-gradient(at top left, red, blue)",
308   "conic-gradient(at left top, red, blue)",
309   "conic-gradient(at center center, red, blue)",
310   "conic-gradient(at 20% bottom, red, blue)",
311   "conic-gradient(at center 20%, red, blue)",
312   "conic-gradient(at left 35px, red, blue)",
313   "conic-gradient(at 10% 10em, red, blue)",
314   "conic-gradient(at 44px top, red, blue)",
315   "conic-gradient(at 0 0, red, blue)",
316   "conic-gradient(at 10px, red, blue)",
318   "conic-gradient(at calc(25%) top, red, blue)",
319   "conic-gradient(at left calc(25%), red, blue)",
320   "conic-gradient(at calc(25px) top, red, blue)",
321   "conic-gradient(at left calc(25px), red, blue)",
322   "conic-gradient(at calc(-25%) top, red, blue)",
323   "conic-gradient(at left calc(-25%), red, blue)",
324   "conic-gradient(at calc(-25px) top, red, blue)",
325   "conic-gradient(at left calc(-25px), red, blue)",
326   "conic-gradient(at calc(100px + -25%) top, red, blue)",
327   "conic-gradient(at left calc(100px + -25%), red, blue)",
328   "conic-gradient(at calc(100px + -25px) top, red, blue)",
329   "conic-gradient(at left calc(100px + -25px), red, blue)",
331   "conic-gradient(from 0 at 0 0, red, blue)",
332   "conic-gradient(from 40deg at 50%, red, blue)",
333   "conic-gradient(from 0.4turn at left 30%, red, blue)",
334   "conic-gradient(from 200grad at calc(100px + -25%) top, red, blue)",
335   "conic-gradient(from 5rad at 10px, red, blue)",
337   "repeating-conic-gradient(red, blue)",
338   "repeating-conic-gradient(red, yellow, blue)",
339   "repeating-conic-gradient(red 1deg, yellow 20%, blue 5rad, green)",
340   "repeating-conic-gradient(red, yellow, green, blue 50%)",
341   "repeating-conic-gradient(red -50%, yellow -25%, green, blue)",
342   "repeating-conic-gradient(red -99deg, yellow, green, blue 120%)",
343   "repeating-conic-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
344   "repeating-conic-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
346   "repeating-conic-gradient(from 0, red, blue)",
347   "repeating-conic-gradient(from 40deg, red, blue)",
348   "repeating-conic-gradient(from 0.4turn, red, blue)",
349   "repeating-conic-gradient(from 200grad, red, blue)",
350   "repeating-conic-gradient(from 5rad, red, blue)",
352   "repeating-conic-gradient(at top left, red, blue)",
353   "repeating-conic-gradient(at 0 0, red, blue)",
354   "repeating-conic-gradient(at 20% bottom, red, blue)",
355   "repeating-conic-gradient(at center 20%, red, blue)",
356   "repeating-conic-gradient(at left 35px, red, blue)",
357   "repeating-conic-gradient(at 10% 10em, red, blue)",
358   "repeating-conic-gradient(at 44px top, red, blue)",
360   "repeating-conic-gradient(from 0 at 0 0, red, blue)",
361   "repeating-conic-gradient(from 40deg at 50%, red, blue)",
362   "repeating-conic-gradient(from 0.4turn at left 30%, red, blue)",
363   "repeating-conic-gradient(from 200grad at calc(100px + -25%) top, red, blue)",
364   "repeating-conic-gradient(from 5rad at 10px, red, blue)",
366   // 2008 GRADIENTS: -webkit-gradient()
367   // ----------------------------------
368   // linear w/ no color stops (valid) and a variety of position values:
369   "-webkit-gradient(linear, 1 2, 3 4)",
370   "-webkit-gradient(linear,1 2,3 4)", // (no extra space)
371   "-webkit-gradient(linear  ,  1   2  ,  3   4  )", // (lots of extra space)
372   "-webkit-gradient(linear, 1 10% , 0% 4)", // percentages
373   "-webkit-gradient(linear, +1.0 -2%, +5.3% -0)", // (+/- & decimals are valid)
374   "-webkit-gradient(linear, left top, right bottom)", // keywords
375   "-webkit-gradient(linear, right center, center top)",
376   "-webkit-gradient(linear, center center, center center)",
377   "-webkit-gradient(linear, center 5%, 30 top)", // keywords mixed w/ nums
379   // linear w/ just 1 color stop:
380   "-webkit-gradient(linear, 1 2, 3 4, from(lime))",
381   "-webkit-gradient(linear, 1 2, 3 4, to(lime))",
382   // * testing the various allowable stop values (<number> & <percent>):
383   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, lime))",
384   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-0, lime))",
385   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-30, lime))",
386   "-webkit-gradient(linear, 1 2, 3 4, color-stop(+9999, lime))",
387   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-.1, lime))",
388   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0%, lime))",
389   "-webkit-gradient(linear, 1 2, 3 4, color-stop(100%, lime))",
390   "-webkit-gradient(linear, 1 2, 3 4, color-stop(9999%, lime))",
391   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-.5%, lime))",
392   "-webkit-gradient(linear, 1 2, 3 4, color-stop(+0%, lime))",
393   // * testing the various color values:
394   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, transparent))",
395   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, rgb(1,2,3)))",
396   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, #00ff00))",
397   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, #00f))",
398   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, hsla(240, 30%, 50%, 0.8)))",
399   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, rgba(255, 230, 10, 0.5)))",
401   // linear w/ multiple color stops:
402   // * using from()/to() -- note that out-of-order is OK:
403   "-webkit-gradient(linear, 1 2, 3 4, from(lime), from(blue))",
404   "-webkit-gradient(linear, 1 2, 3 4, to(lime),   to(blue))",
405   "-webkit-gradient(linear, 1 2, 3 4, from(lime), to(blue))",
406   "-webkit-gradient(linear, 1 2, 3 4, to(lime),   from(blue))",
407   "-webkit-gradient(linear, 1 2, 3 4, from(lime), to(blue), from(purple))",
408   // * using color-stop():
409   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, lime), color-stop(30%, blue))",
410   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, lime), color-stop(30%, blue), color-stop(100%, purple))",
411   // * using color-stop() intermixed with from()/to() functions:
412   "-webkit-gradient(linear, 1 2, 3 4, from(lime), color-stop(30%, blue))",
413   "-webkit-gradient(linear, 1 2, 3 4, color-stop(30%, blue), to(lime))",
414   // * overshooting endpoints (0 & 1.0)
415   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-30%, lime), color-stop(.4, blue), color-stop(1.5, purple))",
416   // * repeating a stop position (valid)
417   "-webkit-gradient(linear, 1 2, 3 4, color-stop(30%, lime), color-stop(30%, blue))",
418   // * stops out of order (valid)
419   "-webkit-gradient(linear, 1 2, 3 4, color-stop(70%, lime), color-stop(20%, blue), color-stop(40%, purple))",
421   // radial w/ no color stops (valid) and a several different radius values:
422   "-webkit-gradient(radial, 1 2, 8, 3 4, 9)",
423   "-webkit-gradient(radial, 0 0, 10, 0 0, 5)",
425   // radial w/ color stops
426   // (mostly leaning on more-robust 'linear' tests above; just testing a few
427   // examples w/ radial as a sanity-check):
428   "-webkit-gradient(radial, 1 2, 8, 3 4, 9, from(lime))",
429   "-webkit-gradient(radial, 1 2, 8, 3 4, 9, to(blue))",
430   "-webkit-gradient(radial, 1 2, 8, 3 4, 9, color-stop(0.5, #00f), color-stop(0.8, rgba(100, 200, 0, 0.5)))",
432   // 2011 GRADIENTS: -webkit-linear-gradient(), -webkit-radial -gradient()
433   // ---------------------------------------------------------------------
434   // Basic linear-gradient syntax (valid when prefixed or unprefixed):
435   "-webkit-linear-gradient(red, green, blue)",
437   // Angled linear-gradients (valid when prefixed or unprefixed):
438   "-webkit-linear-gradient(135deg, red, blue)",
439   "-webkit-linear-gradient( 135deg  , red  , blue )",
440   "-webkit-linear-gradient(280deg, red 60%, blue)",
442   // Linear-gradient with unitless-0 <angle> (normally invalid for <angle>
443   // but accepted here for better webkit emulation):
444   "-webkit-linear-gradient(0, red, blue)",
446   // Linear-gradient with calc expression (bug 1363349)
447   "-webkit-gradient(linear, calc(5 + 5) top, calc(10 + 10) top, from(blue), to(lime))",
448   "-webkit-gradient(linear, calc(5 - 5) top, calc(10 + 10) top, from(blue), to(lime))",
449   "-webkit-gradient(linear, calc(5 * 5) top, calc(10 + 10) top, from(blue), to(lime))",
450   "-webkit-gradient(linear, calc(5 / 5) top, calc(10 + 10) top, from(blue), to(lime))",
451   "-webkit-gradient(linear, left calc(25% - 10%), right calc(75% + 10%), from(blue), to(lime))",
452   "-webkit-gradient(linear, calc(1) 2, 3 4)",
454   // Radial-gradient with calc expression (bug 1363349)
455   "-webkit-gradient(radial, 1 2, 0, 3 4, calc(1 + 5), from(blue), to(lime))",
456   "-webkit-gradient(radial, 1 2, calc(1 + 2), 3 4, calc(1 + 5), from(blue), to(lime))",
457   "-webkit-gradient(radial, 1 2, calc(1 - 2), 3 4, calc(1 + 5), from(blue), to(lime))",
458   "-webkit-gradient(radial, 1 2, calc(1 * 2), 3 4, calc(1 + 5), from(blue), to(lime))",
459   "-webkit-gradient(radial, 1 2, calc(1 / 2), 3 4, calc(1 + 5), from(blue), to(lime))",
460   "-webkit-gradient(radial, calc(0 + 1) calc(1 + 1), calc(1 + 2), calc(1 + 2) 4, calc(1 + 5), from(blue), to(lime))",
461   "-webkit-gradient(radial, 1 2, calc(8), 3 4, 9)",
463   // Basic radial-gradient syntax (valid when prefixed or unprefixed):
464   "-webkit-radial-gradient(circle, white, black)",
465   "-webkit-radial-gradient(circle, white, black)",
466   "-webkit-radial-gradient(ellipse closest-side, white, black)",
467   "-webkit-radial-gradient(circle farthest-corner, white, black)",
469   // Contain/cover keywords (valid only for -moz/-webkit prefixed):
470   "-webkit-radial-gradient(cover, red, blue)",
471   "-webkit-radial-gradient(cover circle, red, blue)",
472   "-webkit-radial-gradient(contain, red, blue)",
473   "-webkit-radial-gradient(contain ellipse, red, blue)",
475   // Initial side/corner/point (valid only for -moz/-webkit prefixed):
476   "-webkit-linear-gradient(top, red, blue)",
477   "-webkit-linear-gradient(left, red, blue)",
478   "-webkit-linear-gradient(bottom, red, blue)",
479   "-webkit-linear-gradient(right top, red, blue)",
480   "-webkit-linear-gradient(top right, red, blue)",
481   "-webkit-radial-gradient(right, red, blue)",
482   "-webkit-radial-gradient(left bottom, red, blue)",
483   "-webkit-radial-gradient(bottom left, red, blue)",
484   "-webkit-radial-gradient(center, red, blue)",
485   "-webkit-radial-gradient(center right, red, blue)",
486   "-webkit-radial-gradient(center center, red, blue)",
487   "-webkit-radial-gradient(center top, red, blue)",
488   "-webkit-radial-gradient(left 50%, red, blue)",
489   "-webkit-radial-gradient(20px top, red, blue)",
490   "-webkit-radial-gradient(20em 30%, red, blue)",
492   // Point + keyword-sized shape (valid only for -moz/-webkit prefixed):
493   "-webkit-radial-gradient(center, circle closest-corner, red, blue)",
494   "-webkit-radial-gradient(10px 20px, cover circle, red, blue)",
495   "-webkit-radial-gradient(5em 50%, ellipse contain, red, blue)",
497   // Repeating examples:
498   "-webkit-repeating-linear-gradient(red 10%, blue 30%)",
499   "-webkit-repeating-linear-gradient(30deg, pink 20px, orange 70px)",
500   "-webkit-repeating-linear-gradient(left, red, blue)",
501   "-webkit-repeating-linear-gradient(left, red 10%, blue 30%)",
502   "-webkit-repeating-radial-gradient(circle, red, blue 10%, red 20%)",
503   "-webkit-repeating-radial-gradient(circle farthest-corner, gray 10px, yellow 20px)",
504   "-webkit-repeating-radial-gradient(top left, circle, red, blue 4%, red 8%)",
506 var invalidNonUrlImageValues = [
507   "-moz-element(#a:1)",
508   "-moz-element(a#a)",
509   "-moz-element(#a a)",
510   "-moz-element(#a+a)",
511   "-moz-element(#a())",
512   /* no quirks mode colors */
513   "linear-gradient(red, ff00ff)",
514   /* no quirks mode colors */
515   "radial-gradient(at 10% bottom, ffffff, black) scroll no-repeat",
516   /* no quirks mode lengths */
517   "linear-gradient(red -99, yellow, green, blue 120%)",
518   /* Unitless nonzero numbers are valid as an <angle> */
519   "linear-gradient(30, red, blue)",
520   /* There must be a comma between gradient-line (e.g. <angle>) and colors */
521   "linear-gradient(30deg red, blue)",
522   "linear-gradient(to top left red, blue)",
523   "linear-gradient(to right red, blue)",
524   /* Invalid color or calc() function */
525   "linear-gradient(red, rgb(0, rubbish, 0) 50%, red)",
526   "linear-gradient(red, red calc(50% + rubbish), red)",
527   "linear-gradient(to top calc(50% + rubbish), red, blue)",
529   "radial-gradient(circle 175px 20px, black, white)",
530   "radial-gradient(175px 20px circle, black, white)",
531   "radial-gradient(ellipse 175px, black, white)",
532   "radial-gradient(175px ellipse, black, white)",
533   "radial-gradient(50%, red, blue)",
534   "radial-gradient(circle 50%, red, blue)",
535   "radial-gradient(50% circle, red, blue)",
537   /* Invalid units */
538   "conic-gradient(red, blue 50px, yellow 30px)",
539   "repeating-conic-gradient(red 1deg, yellow 20%, blue 24em, green)",
540   "conic-gradient(from 0%, black, white)",
541   "conic-gradient(from 60%, black, white)",
542   "conic-gradient(from 40px, black, white)",
543   "conic-gradient(from 50, black, white)",
544   "conic-gradient(at 50deg, black, white)",
545   "conic-gradient(from 40deg at 50deg, black, white)",
546   "conic-gradient(from 40deg at 50deg 60deg, black, white)",
547   /* Invalid keywords (or ordering) */
548   "conic-gradient(at 40% from 50deg, black, white)",
549   "conic-gradient(to 50deg, black, white)",
551   /* Used to be valid only when prefixed */
552   "linear-gradient(top left, red, blue)",
553   "linear-gradient(0 0, red, blue)",
554   "linear-gradient(20% bottom, red, blue)",
555   "linear-gradient(center 20%, red, blue)",
556   "linear-gradient(left 35px, red, blue)",
557   "linear-gradient(10% 10em, red, blue)",
558   "linear-gradient(44px top, red, blue)",
560   "linear-gradient(top left 45deg, red, blue)",
561   "linear-gradient(20% bottom -300deg, red, blue)",
562   "linear-gradient(center 20% 1.95929rad, red, blue)",
563   "linear-gradient(left 35px 30grad, red, blue)",
564   "linear-gradient(left 35px 0.1turn, red, blue)",
565   "linear-gradient(10% 10em 99999deg, red, blue)",
566   "linear-gradient(44px top -33deg, red, blue)",
568   "linear-gradient(30grad left 35px, red, blue)",
569   "linear-gradient(10deg 20px, red, blue)",
570   "linear-gradient(1turn 20px, red, blue)",
571   "linear-gradient(.414rad bottom, red, blue)",
573   "linear-gradient(to top, 0%, blue)",
574   "linear-gradient(to top, red, 100%)",
575   "linear-gradient(to top, red, 45%, 56%, blue)",
576   "linear-gradient(to top, red,, blue)",
577   "linear-gradient(to top, red, green 35%, 15%, 54%, blue)",
579   "linear-gradient(unset, 10px 10px, from(blue))",
580   "linear-gradient(unset, 10px 10px, blue 0)",
581   "repeating-linear-gradient(unset, 10px 10px, blue 0)",
583   "radial-gradient(top left 45deg, red, blue)",
584   "radial-gradient(20% bottom -300deg, red, blue)",
585   "radial-gradient(center 20% 1.95929rad, red, blue)",
586   "radial-gradient(left 35px 30grad, red, blue)",
587   "radial-gradient(10% 10em 99999deg, red, blue)",
588   "radial-gradient(44px top -33deg, red, blue)",
590   "radial-gradient(-33deg, red, blue)",
591   "radial-gradient(30grad left 35px, red, blue)",
592   "radial-gradient(10deg 20px, red, blue)",
593   "radial-gradient(.414rad bottom, red, blue)",
595   "radial-gradient(cover, red, blue)",
596   "radial-gradient(ellipse contain, red, blue)",
597   "radial-gradient(cover circle, red, blue)",
599   "radial-gradient(top left, cover, red, blue)",
600   "radial-gradient(15% 20%, circle, red, blue)",
601   "radial-gradient(45px, ellipse closest-corner, red, blue)",
602   "radial-gradient(45px, farthest-side circle, red, blue)",
604   "radial-gradient(99deg, cover, red, blue)",
605   "radial-gradient(-1.2345rad, circle, red, blue)",
606   "radial-gradient(399grad, ellipse closest-corner, red, blue)",
607   "radial-gradient(399grad, farthest-side circle, red, blue)",
609   "radial-gradient(top left 99deg, cover, red, blue)",
610   "radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
611   "radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
612   "radial-gradient(45px 399grad, farthest-side circle, red, blue)",
613   "radial-gradient(circle red, blue)",
615   /* don't allow more than two positions with multi-position syntax */
616   "linear-gradient(red 0% 50% 100%)",
617   "linear-gradient(red 0% 50% 75%, blue 75%)",
618   "linear-gradient(to bottom, red 0% 50% 100%)",
619   "linear-gradient(to bottom, red 0% 50% 75%, blue 75%)",
620   "radial-gradient(red 0% 50% 100%)",
621   "radial-gradient(red 0% 50% 75%, blue 75%)",
622   "radial-gradient(center, red 0% 50% 100%)",
623   "radial-gradient(center, red 0% 50% 75%, blue 75%)",
624   "conic-gradient(red 0% 50% 100%)",
625   "conic-gradient(red 0% 50% 75%, blue 75%)",
626   "conic-gradient(center, red 0% 50% 100%)",
627   "conic-gradient(center, red 0% 50% 75%, blue 75%)",
629   // missing color in color stop
630   "conic-gradient(red 50deg, blue 0.3turn, yellow 200grad, orange 60%, 5rad)",
632   "-moz-linear-gradient(unset, 10px 10px, from(blue))",
633   "-moz-linear-gradient(unset, 10px 10px, blue 0)",
634   "-moz-repeating-linear-gradient(unset, 10px 10px, blue 0)",
636   // 2008 GRADIENTS: -webkit-gradient()
637   // https://www.webkit.org/blog/175/introducing-css-gradients/
638   // ----------------------------------
639   // Mostly-empty expressions (missing most required pieces):
640   "-webkit-gradient()",
641   "-webkit-gradient( )",
642   "-webkit-gradient(,)",
643   "-webkit-gradient(bogus)",
644   "-webkit-gradient(linear)",
645   "-webkit-gradient(linear,)",
646   "-webkit-gradient(,linear)",
647   "-webkit-gradient(radial)",
648   "-webkit-gradient(radial,)",
650   // linear w/ partial/missing <point> expression(s)
651   "-webkit-gradient(linear, 1)", // Incomplete <point>
652   "-webkit-gradient(linear, left)", // Incomplete <point>
653   "-webkit-gradient(linear, center)", // Incomplete <point>
654   "-webkit-gradient(linear, top)", // Incomplete <point>
655   "-webkit-gradient(linear, 5%)", // Incomplete <point>
656   "-webkit-gradient(linear, 1 2)", // Missing 2nd <point>
657   "-webkit-gradient(linear, 1, 3)", // 2 incomplete <point>s
658   "-webkit-gradient(linear, 1, 3 4)", // Incomplete 1st <point>
659   "-webkit-gradient(linear, 1 2, 3)", // Incomplete 2nd <point>
660   "-webkit-gradient(linear, 1 2, 3, 4)", // Comma inside <point>
661   "-webkit-gradient(linear, 1, 2, 3 4)", // Comma inside <point>
662   "-webkit-gradient(linear, 1, 2, 3, 4)", // Comma inside <point>
664   // linear w/ invalid units in <point> expression
665   "-webkit-gradient(linear, 1px 2, 3 4)",
666   "-webkit-gradient(linear, 1 2, 3 4px)",
667   "-webkit-gradient(linear, 1px 2px, 3px 4px)",
668   "-webkit-gradient(linear, 1 2em, 3 4)",
670   // linear w/ <radius> (only valid for radial)
671   "-webkit-gradient(linear, 1 2, 8, 3 4, 9)",
673   // linear w/ out-of-order position keywords in <point> expression
674   // (horizontal keyword is supposed to come first, for "x" coord)
675   "-webkit-gradient(linear, 0 0, top right)",
676   "-webkit-gradient(linear, bottom center, 0 0)",
677   "-webkit-gradient(linear, top bottom, 0 0)",
678   "-webkit-gradient(linear, bottom top, 0 0)",
679   "-webkit-gradient(linear, bottom top, 0 0)",
681   // linear w/ trailing comma (which implies missing color-stops):
682   "-webkit-gradient(linear, 1 2, 3 4,)",
684   // linear w/ invalid color values:
685   "-webkit-gradient(linear, 1 2, 3 4, from(invalidcolorname))",
686   "-webkit-gradient(linear, 1 2, 3 4, from(inherit))",
687   "-webkit-gradient(linear, 1 2, 3 4, from(initial))",
688   "-webkit-gradient(linear, 1 2, 3 4, from(currentColor))",
689   "-webkit-gradient(linear, 1 2, 3 4, from(00ff00))",
690   "-webkit-gradient(linear, 1 2, 3 4, from(##00ff00))",
691   "-webkit-gradient(linear, 1 2, 3 4, from(#00fff))", // wrong num hex digits
692   "-webkit-gradient(linear, 1 2, 3 4, from(xyz(0,0,0)))", // bogus color func
693   // Mixing <number> and <percentage> is invalid.
694   "-webkit-gradient(linear, 1 2, 3 4, from(rgb(100, 100%, 30)))",
696   // linear w/ color stops that have comma issues
697   "-webkit-gradient(linear, 1 2, 3 4 from(lime))",
698   "-webkit-gradient(linear, 1 2, 3 4, from(lime,))",
699   "-webkit-gradient(linear, 1 2, 3 4, from(lime),)",
700   "-webkit-gradient(linear, 1 2, 3 4, from(lime) to(blue))",
701   "-webkit-gradient(linear, 1 2, 3 4, from(lime),, to(blue))",
702   "-webkit-gradient(linear, 1 2, 3 4, from(rbg(0, 0, 0,)))",
703   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0 lime))",
704   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0,, lime))",
706   // radial w/ broken <point>/radius expression(s)
707   "-webkit-gradient(radial, 1)", // Incomplete <point>
708   "-webkit-gradient(radial, 1 2)", // Missing radius + 2nd <point>
709   "-webkit-gradient(radial, 1 2, 8)", // Missing 2nd <point>
710   "-webkit-gradient(radial, 1 2, 8, 3)", // Incomplete 2nd <point>
711   "-webkit-gradient(radial, 1 2, 8, 3 4)", // Missing 2nd radius
712   "-webkit-gradient(radial, 1 2, 3 4, 9)", // Missing 1st radius
713   "-webkit-gradient(radial, 1 2, -1.5, center center, +99999.9999)", // Negative radius
715   // radial w/ incorrect units on radius (invalid; expecting <number>)
716   "-webkit-gradient(radial, 1 2, 8%,      3 4, 9)",
717   "-webkit-gradient(radial, 1 2, 8px,     3 4, 9)",
718   "-webkit-gradient(radial, 1 2, 8em,     3 4, 9)",
719   "-webkit-gradient(radial, 1 2, top,     3 4, 9)",
721   // radial w/ trailing comma (which implies missing color-stops):
722   "-webkit-gradient(linear, 1 2, 8, 3 4, 9,)",
724   // radial w/ invalid color value (mostly leaning on 'linear' test above):
725   "-webkit-gradient(radial, 1 2, 8, 3 4, 9, from(invalidcolorname))",
727   // 2011 GRADIENTS: -webkit-linear-gradient(), -webkit-radial -gradient()
728   // ---------------------------------------------------------------------
729   // Syntax that's invalid for all types of gradients:
730   // * empty gradient expressions:
731   "-webkit-linear-gradient()",
732   "-webkit-radial-gradient()",
733   "-webkit-repeating-linear-gradient()",
734   "-webkit-repeating-radial-gradient()",
736   // * missing comma between <legacy-gradient-line> and color list:
737   "-webkit-linear-gradient(0 red, blue)",
738   "-webkit-linear-gradient(30deg red, blue)",
739   "-webkit-linear-gradient(top right red, blue)",
740   "-webkit-linear-gradient(bottom red, blue)",
742   // Linear-gradient with calc expression containing mixed units
743   // (bug 1363349)
744   "-webkit-gradient(linear, calc(5 + 5%) top, calc(10 + 10) top, from(blue), to(lime))",
745   "-webkit-gradient(linear, left calc(25 - 10%), right calc(75% + 10%), from(blue), to(lime))",
747   // Radial-gradient with calc expression containing mixed units, or a
748   // percentage in the radius (bug 1363349)
749   "-webkit-gradient(radial, 1 2, 0, 3 4, calc(1% + 5%), from(blue), to(lime))",
750   "-webkit-gradient(radial, 1 2, calc(1 + 2), 3 4, calc(1 + 5%), from(blue), to(lime))",
751   "-webkit-gradient(radial, calc(0 + 1) calc(1 + 1), calc(1% + 2%), calc(1 + 2) 4, calc(1 + 5), from(blue), to(lime))",
753   // Linear syntax that's invalid for both -webkit & unprefixed, but valid
754   // for -moz:
755   // * initial <legacy-gradient-line> which includes a length:
756   "-webkit-linear-gradient(10px, red, blue)",
757   "-webkit-linear-gradient(10px top, red, blue)",
758   // * initial <legacy-gradient-line> which includes a side *and* an angle:
759   "-webkit-linear-gradient(bottom 30deg, red, blue)",
760   "-webkit-linear-gradient(30deg bottom, red, blue)",
761   "-webkit-linear-gradient(10px top 50deg, red, blue)",
762   "-webkit-linear-gradient(50deg 10px top, red, blue)",
763   // * initial <legacy-gradient-line> which includes explicit "center":
764   "-webkit-linear-gradient(center, red, blue)",
765   "-webkit-linear-gradient(left center, red, blue)",
766   "-webkit-linear-gradient(top center, red, blue)",
767   "-webkit-linear-gradient(center top, red, blue)",
769   // Linear syntax that's invalid for -webkit, but valid for -moz & unprefixed:
770   // * "to" syntax:
771   "-webkit-linear-gradient(to top, red, blue)",
773   // * <shape> followed by angle:
774   "-webkit-radial-gradient(circle 10deg, red, blue)",
776   // Radial syntax that's invalid for both -webkit & -moz, but valid for
777   // unprefixed:
778   // * "<shape> at <position>" syntax:
779   "-webkit-radial-gradient(circle at left bottom, red, blue)",
780   // * explicitly-sized shape:
781   "-webkit-radial-gradient(circle 10px, red, blue)",
782   "-webkit-radial-gradient(ellipse 40px 20px, red, blue)",
784   // Radial syntax that's invalid for both -webkit & unprefixed, but valid
785   // for -moz:
786   // * initial angle
787   "-webkit-radial-gradient(30deg, red, blue)",
788   // * initial angle/position combo
789   "-webkit-radial-gradient(top 30deg, red, blue)",
790   "-webkit-radial-gradient(left top 30deg, red, blue)",
791   "-webkit-radial-gradient(10px 20px 30deg, red, blue)",
793   // Conic gradients should not support prefixed syntax
794   "-webkit-gradient(conic, 1 2, 3 4, color-stop(0, lime))",
795   "-webkit-conic-gradient(red, blue)",
796   "-moz-conic-gradient(red, blue)",
797   "-webkit-repeating-conic-gradient(red, blue)",
798   "-moz-repeating-conic-gradient(red, blue)",
800   "image-set(url(foobar.png) 1x, none)",
801   "image-set(garbage)",
802   "image-set(image-set('foobar.png', 'bar.png' 2x) 1x, url(baz.png) 3x)", // Nested image-sets should fail to parse
803   "image-set(image-set(garbage))",
804   "image-set()",
805   "image-set(type('image/png') url(foobar.png) 1x)",
806   "image-set(url(foobar.png) type('image/png') 1x type('image/png'))",
807   "image-set(url(foobar.png) type('image/png') type('image/png'))",
808   "image-set(url(foobar.png) type(image/png))",
809   "image-set(url(foobar.png) epyt('image/png'))",
811   ...(IsCSSPropertyPrefEnabled("layout.css.cross-fade.enabled")
812     ? [
813         "cross-fade(red blue)",
814         "cross-fade()",
815         "cross-fade(50%, blue 50%)",
816         // Old syntax
817         "cross-fade(red, white, 50%)",
818         // see: <https://github.com/w3c/csswg-drafts/issues/5333>. This
819         // may become invalid depending on how discussion on that issue
820         // goes.
821         "cross-fade(red, 150%, blue)",
822         "cross-fade(red auto, blue 10%)",
824         // nested invalidity should propagate.
825         "cross-fade(url(http://placekitten.com/200/300), 55% linear-gradient(center, red, blue))",
826         "cross-fade(cross-fade(red, white, 50%), cross-fade(blue))",
828         "cross-fade(url(http://placekitten.com/200/300) url(http://placekitten.com/200/300))",
829         "cross-fade(#F0F8FF, rgb(0, 0, 0), rgba(0, 255, 0, 1), 25%)",
830       ]
831     : []),
833 var unbalancedGradientAndElementValues = ["-moz-element(#a()"];
835 var basicShapeSVGBoxValues = [
836   "fill-box",
837   "stroke-box",
838   "view-box",
840   "polygon(evenodd, 20pt 20cm) fill-box",
841   "polygon(evenodd, 20ex 20pc) stroke-box",
842   "polygon(evenodd, 20rem 20in) view-box",
845 var basicShapeOtherValues = [
846   "polygon(20px 20px)",
847   "polygon(20px 20%)",
848   "polygon(20% 20%)",
849   "polygon(20rem 20em)",
850   "polygon(20cm 20mm)",
851   "polygon(20px 20px, 30px 30px)",
852   "polygon(20px 20px, 30% 30%, 30px 30px)",
854   "content-box",
855   "padding-box",
856   "border-box",
858   "polygon(0 0) content-box",
859   "border-box polygon(0 0)",
860   "padding-box    polygon(   0  20px ,  30px    20% )  ",
862   "circle()",
863   "circle(at center)",
864   "circle(at top 0px left 20px)",
865   "circle(at bottom right)",
866   "circle(20%)",
867   "circle(300px)",
868   "circle(calc(20px + 30px))",
869   "circle(farthest-side)",
870   "circle(closest-side)",
871   "circle(closest-side at center)",
872   "circle(farthest-side at top)",
873   "circle(20px at top right)",
874   "circle(40% at 50% 100%)",
875   "circle(calc(20% + 20%) at right bottom)",
876   "circle() padding-box",
878   "ellipse()",
879   "ellipse(at center)",
880   "ellipse(at top 0px left 20px)",
881   "ellipse(at bottom right)",
882   "ellipse(20% 20%)",
883   "ellipse(300px 50%)",
884   "ellipse(calc(20px + 30px) 10%)",
885   "ellipse(farthest-side closest-side)",
886   "ellipse(closest-side farthest-side)",
887   "ellipse(farthest-side farthest-side)",
888   "ellipse(closest-side closest-side)",
889   "ellipse(closest-side closest-side at center)",
890   "ellipse(20% farthest-side at top)",
891   "ellipse(20px 50% at top right)",
892   "ellipse(closest-side 40% at 50% 100%)",
893   "ellipse(calc(20% + 20%) calc(20px + 20cm) at right bottom)",
895   "inset(1px)",
896   "inset(20% -20px)",
897   "inset(20em 4rem calc(20% + 20px))",
898   "inset(20vh 20vw 20pt 3%)",
899   "inset(5px round 3px)",
900   "inset(1px 2px round 3px / 3px)",
901   "inset(1px 2px 3px round 3px 2em / 20%)",
902   "inset(1px 2px 3px 4px round 3px 2vw 20% / 20px 3em 2vh 20%)",
905 var basicShapeOtherValuesWithFillRule = [
906   "polygon(nonzero, 20px 20px, 30% 30%, 30px 30px)",
907   "polygon(evenodd, 20px 20px, 30% 30%, 30px 30px)",
908   "polygon(evenodd, 20% 20em) content-box",
909   "polygon(evenodd, 20vh 20em) padding-box",
910   "polygon(evenodd, 20vh calc(20% + 20em)) border-box",
911   "polygon(evenodd, 20vh 20vw) margin-box",
914 var basicShapeInvalidValues = [
915   "url(#test) url(#tes2)",
916   "polygon (0 0)",
917   "polygon(20px, 40px)",
918   "border-box content-box",
919   "polygon(0 0) polygon(0 0)",
920   "polygon(nonzero 0 0)",
921   "polygon(evenodd 20px 20px)",
922   "polygon(20px 20px, evenodd)",
923   "polygon(20px 20px, nonzero)",
924   "polygon(0 0) conten-box content-box",
925   "content-box polygon(0 0) conten-box",
926   "padding-box polygon(0 0) conten-box",
927   "polygon(0 0) polygon(0 0) content-box",
928   "polygon(0 0) content-box polygon(0 0)",
929   "polygon(0 0), content-box",
930   "polygon(0 0), polygon(0 0)",
931   "content-box polygon(0 0) polygon(0 0)",
932   "content-box polygon(0 0) none",
933   "none content-box polygon(0 0)",
934   "inherit content-box polygon(0 0)",
935   "initial polygon(0 0)",
936   "polygon(0 0) farthest-side",
937   "farthest-corner polygon(0 0)",
938   "polygon(0 0) farthest-corner",
939   "polygon(0 0) conten-box",
940   "polygon(0 0) polygon(0 0) farthest-corner",
941   "polygon(0 0) polygon(0 0) polygon(0 0)",
942   "border-box polygon(0, 0)",
943   "border-box padding-box",
944   "margin-box farthest-side",
945   "nonsense() border-box",
946   "border-box nonsense()",
948   "circle(at)",
949   "circle(at 20% 20% 30%)",
950   "circle(20px 2px at center)",
951   "circle(2at center)",
952   "circle(closest-corner)",
953   "circle(at center top closest-side)",
954   "circle(-20px)",
955   "circle(farthest-side closest-side)",
956   "circle(20% 20%)",
957   "circle(at farthest-side)",
958   "circle(calc(20px + rubbish))",
959   "circle(at top left 20px)",
961   "ellipse(at)",
962   "ellipse(at 20% 20% 30%)",
963   "ellipse(20px at center)",
964   "ellipse(-20px 20px)",
965   "ellipse(closest-corner farthest-corner)",
966   "ellipse(20px -20px)",
967   "ellipse(-20px -20px)",
968   "ellipse(farthest-side)",
969   "ellipse(20%)",
970   "ellipse(at farthest-side farthest-side)",
971   "ellipse(at top left calc(20px + rubbish))",
972   "ellipse(at top left 20px)",
974   "polygon(at)",
975   "polygon(at 20% 20% 30%)",
976   "polygon(20px at center)",
977   "polygon(2px 2at center)",
978   "polygon(closest-corner farthest-corner)",
979   "polygon(at center top closest-side closest-side)",
980   "polygon(40% at 50% 100%)",
981   "polygon(40% farthest-side 20px at 50% 100%)",
983   "inset()",
984   "inset(round)",
985   "inset(round 3px)",
986   "inset(1px round 1px 2px 3px 4px 5px)",
987   "inset(1px 2px 3px 4px 5px)",
988   "inset(1px, round 3px)",
989   "inset(1px, 2px)",
990   "inset(1px 2px, 3px)",
991   "inset(1px at 3px)",
992   "inset(1px round 1px // 2px)",
993   "inset(1px round)",
994   "inset(1px calc(2px + rubbish))",
995   "inset(1px round 2px calc(3px + rubbish))",
998 var basicShapeUnbalancedValues = [
999   "polygon(30% 30%",
1000   "polygon(nonzero, 20% 20px",
1001   "polygon(evenodd, 20px 20px",
1003   "circle(",
1004   "circle(40% at 50% 100%",
1005   "ellipse(",
1006   "ellipse(40% at 50% 100%",
1008   "inset(1px",
1009   "inset(1px 2px",
1010   "inset(1px 2px 3px",
1011   "inset(1px 2px 3px 4px",
1012   "inset(1px 2px 3px 4px round 5px",
1013   "inset(1px 2px 3px 4px round 5px / 6px",
1016 var basicShapeXywhRectValues = [];
1017 if (IsCSSPropertyPrefEnabled("layout.css.basic-shape-xywh.enabled")) {
1018   basicShapeXywhRectValues.push(
1019     "xywh(1px 2% 3px 4em)",
1020     "xywh(1px 2% 3px 4em round 0px)",
1021     "xywh(1px 2% 3px 4em round 0px 1%)",
1022     "xywh(1px 2% 3px 4em round 0px 1% 2px)",
1023     "xywh(1px 2% 3px 4em round 0px 1% 2px 3em)"
1024   );
1027 if (IsCSSPropertyPrefEnabled("layout.css.basic-shape-rect.enabled")) {
1028   basicShapeXywhRectValues.push(
1029     "rect(auto auto auto auto)",
1030     "rect(1px 2% auto 4em)",
1031     "rect(1px 2% auto 4em round 0px)",
1032     "rect(1px 2% auto 4em round 0px 1%)",
1033     "rect(1px 2% auto 4em round 0px 1% 2px)",
1034     "rect(1px 2% auto 4em round 0px 1% 2px 3em)"
1035   );
1038 var basicShapeShapeValues = [];
1039 var basicShapeShapeValuesWithFillRule = [];
1040 if (IsCSSPropertyPrefEnabled("layout.css.basic-shape-shape.enabled")) {
1041   basicShapeShapeValuesWithFillRule.push(
1042     "shape(evenodd from 0px 0px, line to 10px 10px)",
1043     "shape(nonzero from 0px 0px, line to 10px 10px)"
1044   );
1046   basicShapeShapeValues.push(
1047     "shape(from 0px 0%, line to 10px 10%)",
1048     "shape(from 10px 10px, move by 10px 5px, line by 20px 40%, close)",
1049     "shape(from 10px 10px, hline by 10px, vline to 5rem)",
1050     "shape(from 10px 10px, vline by 5%, hline to 1vw)",
1051     "shape(from 10px 10px, curve to 50px 20px via 10rem 1%)",
1052     "shape(from 10px 10px, smooth to 50px 20px via 10rem 1%)",
1053     "shape(from 10% 1rem, arc to 50px 1pt of 20% cw large rotate 25deg)"
1054   );
1056   // It's fine to include this for properties which don't support shape(),
1057   // e.g. shape-outside, because they must reject these values.
1058   basicShapeInvalidValues.push(
1059     "shape()",
1060     "shape(evenodd, from 0px 0px)",
1061     "shape(from 0px 0px line to 10px 10px)",
1062     "shape(from 0px 0px)",
1063     "shape(close)",
1064     "shape(nonzero, close)"
1065   );
1068 if (/* mozGradientsEnabled */ true) {
1069   // Maybe one day :(
1070   // Extend gradient lists with valid/invalid moz-prefixed expressions:
1071   validNonUrlImageValues.push(
1072     "-moz-linear-gradient(red, blue)",
1073     "-moz-linear-gradient(red, yellow, blue)",
1074     "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
1075     "-moz-linear-gradient(red, yellow, green, blue 50%)",
1076     "-moz-linear-gradient(red -50%, yellow -25%, green, blue)",
1077     "-moz-linear-gradient(red -99px, yellow, green, blue 120%)",
1078     "-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
1079     "-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
1081     "-moz-linear-gradient(top, red, blue)",
1083     "-moz-linear-gradient(to top, red, blue)",
1084     "-moz-linear-gradient(to bottom, red, blue)",
1085     "-moz-linear-gradient(to left, red, blue)",
1086     "-moz-linear-gradient(to right, red, blue)",
1087     "-moz-linear-gradient(to top left, red, blue)",
1088     "-moz-linear-gradient(to top right, red, blue)",
1089     "-moz-linear-gradient(to bottom left, red, blue)",
1090     "-moz-linear-gradient(to bottom right, red, blue)",
1091     "-moz-linear-gradient(to left top, red, blue)",
1092     "-moz-linear-gradient(to left bottom, red, blue)",
1093     "-moz-linear-gradient(to right top, red, blue)",
1094     "-moz-linear-gradient(to right bottom, red, blue)",
1096     "-moz-linear-gradient(top left, red, blue)",
1097     "-moz-linear-gradient(left, red, blue)",
1098     "-moz-linear-gradient(bottom, red, blue)",
1100     "-moz-linear-gradient(0, red, blue)",
1102     "-moz-linear-gradient(-33deg, red, blue)",
1104     "-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow  calc(100px))",
1105     "-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)",
1106     "-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))",
1107     "-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))",
1108     "-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow  calc(-25px))",
1109     "-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow  calc(-25px))",
1111     "-moz-radial-gradient(red, blue)",
1112     "-moz-radial-gradient(red, yellow, blue)",
1113     "-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
1114     "-moz-radial-gradient(red, yellow, green, blue 50%)",
1115     "-moz-radial-gradient(red -50%, yellow -25%, green, blue)",
1116     "-moz-radial-gradient(red -99px, yellow, green, blue 120%)",
1117     "-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
1119     "-moz-radial-gradient(top left, red, blue)",
1120     "-moz-radial-gradient(20% bottom, red, blue)",
1121     "-moz-radial-gradient(center 20%, red, blue)",
1122     "-moz-radial-gradient(left 35px, red, blue)",
1123     "-moz-radial-gradient(10% 10em, red, blue)",
1124     "-moz-radial-gradient(44px top, red, blue)",
1126     "-moz-radial-gradient(0 0, red, blue)",
1127     "-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
1129     "-moz-radial-gradient(cover, red, blue)",
1130     "-moz-radial-gradient(cover circle, red, blue)",
1131     "-moz-radial-gradient(contain, red, blue)",
1132     "-moz-radial-gradient(contain ellipse, red, blue)",
1133     "-moz-radial-gradient(circle, red, blue)",
1134     "-moz-radial-gradient(ellipse closest-corner, red, blue)",
1135     "-moz-radial-gradient(farthest-side circle, red, blue)",
1137     "-moz-radial-gradient(top left, cover, red, blue)",
1138     "-moz-radial-gradient(15% 20%, circle, red, blue)",
1139     "-moz-radial-gradient(45px, ellipse closest-corner, red, blue)",
1140     "-moz-radial-gradient(45px, farthest-side circle, red, blue)",
1142     "-moz-repeating-linear-gradient(red, blue)",
1143     "-moz-repeating-linear-gradient(red, yellow, blue)",
1144     "-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
1145     "-moz-repeating-linear-gradient(red, yellow, green, blue 50%)",
1146     "-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)",
1147     "-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)",
1148     "-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
1149     "-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
1151     "-moz-repeating-linear-gradient(to top, red, blue)",
1152     "-moz-repeating-linear-gradient(to bottom, red, blue)",
1153     "-moz-repeating-linear-gradient(to left, red, blue)",
1154     "-moz-repeating-linear-gradient(to right, red, blue)",
1155     "-moz-repeating-linear-gradient(to top left, red, blue)",
1156     "-moz-repeating-linear-gradient(to top right, red, blue)",
1157     "-moz-repeating-linear-gradient(to bottom left, red, blue)",
1158     "-moz-repeating-linear-gradient(to bottom right, red, blue)",
1159     "-moz-repeating-linear-gradient(to left top, red, blue)",
1160     "-moz-repeating-linear-gradient(to left bottom, red, blue)",
1161     "-moz-repeating-linear-gradient(to right top, red, blue)",
1162     "-moz-repeating-linear-gradient(to right bottom, red, blue)",
1164     "-moz-repeating-linear-gradient(top left, red, blue)",
1166     "-moz-repeating-radial-gradient(red, blue)",
1167     "-moz-repeating-radial-gradient(red, yellow, blue)",
1168     "-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
1169     "-moz-repeating-radial-gradient(red, yellow, green, blue 50%)",
1170     "-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)",
1171     "-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)",
1172     "-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
1173     "-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
1175     "-moz-repeating-radial-gradient(farthest-corner, red, blue)",
1176     "-moz-repeating-radial-gradient(circle, red, blue)",
1177     "-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)",
1179     "-moz-radial-gradient(calc(25%) top, red, blue)",
1180     "-moz-radial-gradient(left calc(25%), red, blue)",
1181     "-moz-radial-gradient(calc(25px) top, red, blue)",
1182     "-moz-radial-gradient(left calc(25px), red, blue)",
1183     "-moz-radial-gradient(calc(-25%) top, red, blue)",
1184     "-moz-radial-gradient(left calc(-25%), red, blue)",
1185     "-moz-radial-gradient(calc(-25px) top, red, blue)",
1186     "-moz-radial-gradient(left calc(-25px), red, blue)",
1187     "-moz-radial-gradient(calc(100px + -25%) top, red, blue)",
1188     "-moz-radial-gradient(left calc(100px + -25%), red, blue)",
1189     "-moz-radial-gradient(calc(100px + -25px) top, red, blue)",
1190     "-moz-radial-gradient(left calc(100px + -25px), red, blue)"
1191   );
1193   invalidNonUrlImageValues.push(
1194     // The entries in this block used to be valid with the older more-complex
1195     // -moz prefixed gradient syntax, but we've since simplified the syntax for
1196     // consistency with -webkit prefixed gradients, in a way that makes these
1197     // invalid now.
1198     "-moz-linear-gradient(center 0%, red, blue)",
1199     "-moz-linear-gradient(50% top, red, blue)",
1200     "-moz-linear-gradient(50% 0%, red, blue)",
1201     "-moz-linear-gradient(0 0, red, blue)",
1202     "-moz-linear-gradient(20% bottom, red, blue)",
1203     "-moz-linear-gradient(center 20%, red, blue)",
1204     "-moz-linear-gradient(left 35px, red, blue)",
1205     "-moz-linear-gradient(10% 10em, red, blue)",
1206     "-moz-linear-gradient(44px top, red, blue)",
1207     "-moz-linear-gradient(0px, red, blue)",
1208     "-moz-linear-gradient(top left 45deg, red, blue)",
1209     "-moz-linear-gradient(20% bottom -300deg, red, blue)",
1210     "-moz-linear-gradient(center 20% 1.95929rad, red, blue)",
1211     "-moz-linear-gradient(left 35px 30grad, red, blue)",
1212     "-moz-linear-gradient(left 35px 0.1turn, red, blue)",
1213     "-moz-linear-gradient(10% 10em 99999deg, red, blue)",
1214     "-moz-linear-gradient(44px top -33deg, red, blue)",
1215     "-moz-linear-gradient(30grad left 35px, red, blue)",
1216     "-moz-linear-gradient(10deg 20px, red, blue)",
1217     "-moz-linear-gradient(1turn 20px, red, blue)",
1218     "-moz-linear-gradient(.414rad bottom, red, blue)",
1219     "-moz-radial-gradient(top left 45deg, red, blue)",
1220     "-moz-radial-gradient(20% bottom -300deg, red, blue)",
1221     "-moz-radial-gradient(center 20% 1.95929rad, red, blue)",
1222     "-moz-radial-gradient(left 35px 30grad, red, blue)",
1223     "-moz-radial-gradient(10% 10em 99999deg, red, blue)",
1224     "-moz-radial-gradient(44px top -33deg, red, blue)",
1225     "-moz-radial-gradient(-33deg, red, blue)",
1226     "-moz-radial-gradient(30grad left 35px, red, blue)",
1227     "-moz-radial-gradient(10deg 20px, red, blue)",
1228     "-moz-radial-gradient(.414rad bottom, red, blue)",
1229     "-moz-radial-gradient(99deg, cover, red, blue)",
1230     "-moz-radial-gradient(-1.2345rad, circle, red, blue)",
1231     "-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)",
1232     "-moz-radial-gradient(399grad, farthest-side circle, red, blue)",
1233     "-moz-radial-gradient(top left 99deg, cover, red, blue)",
1234     "-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
1235     "-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
1236     "-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)",
1237     "-moz-repeating-linear-gradient(0 0, red, blue)",
1238     "-moz-repeating-linear-gradient(20% bottom, red, blue)",
1239     "-moz-repeating-linear-gradient(center 20%, red, blue)",
1240     "-moz-repeating-linear-gradient(left 35px, red, blue)",
1241     "-moz-repeating-linear-gradient(10% 10em, red, blue)",
1242     "-moz-repeating-linear-gradient(44px top, red, blue)",
1243     "-moz-repeating-linear-gradient(top left 45deg, red, blue)",
1244     "-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)",
1245     "-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)",
1246     "-moz-repeating-linear-gradient(left 35px 30grad, red, blue)",
1247     "-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)",
1248     "-moz-repeating-linear-gradient(44px top -33deg, red, blue)",
1249     "-moz-repeating-linear-gradient(30grad left 35px, red, blue)",
1250     "-moz-repeating-linear-gradient(10deg 20px, red, blue)",
1251     "-moz-repeating-linear-gradient(.414rad bottom, red, blue)",
1253     /* Negative radii */
1254     "-moz-radial-gradient(40%, -100px -10%, red, blue)",
1256     /* no quirks mode colors */
1257     "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
1258     /* no quirks mode lengths */
1259     "-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
1260     "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
1261     /* Unitless 0 is invalid as an <angle> */
1262     "-moz-linear-gradient(top left 0, red, blue)",
1263     "-moz-linear-gradient(5px 5px 0, red, blue)",
1264     /* There must be a comma between gradient-line (e.g. <angle>) and colors */
1265     "-moz-linear-gradient(30deg red, blue)",
1266     "-moz-linear-gradient(5px 5px 30deg red, blue)",
1267     "-moz-linear-gradient(5px 5px red, blue)",
1268     "-moz-linear-gradient(top left 30deg red, blue)",
1270     /* Old syntax */
1271     "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))",
1272     "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
1273     "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
1274     "-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))",
1275     "-moz-linear-gradient(20px 20px, from(blue), to(red))",
1276     "-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))",
1277     "-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))",
1278     "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
1279     "-moz-linear-gradient(left left, top top, from(blue))",
1280     "-moz-linear-gradient(inherit, 10px 10px, from(blue))",
1281     /* New syntax */
1282     "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
1283     "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
1284     "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
1285     "-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
1286     "-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
1287     "-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
1288     "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
1289     "-moz-linear-gradient(left left, top top, blue 0)",
1290     "-moz-linear-gradient(inherit, 10px 10px, blue 0)",
1291     "-moz-linear-gradient(left left blue red)",
1292     "-moz-linear-gradient(left left blue, red)",
1293     "-moz-linear-gradient()",
1294     "-moz-linear-gradient(cover, red, blue)",
1295     "-moz-linear-gradient(auto, red, blue)",
1296     "-moz-linear-gradient(22 top, red, blue)",
1297     "-moz-linear-gradient(10% red blue)",
1298     "-moz-linear-gradient(10%, red blue)",
1299     "-moz-linear-gradient(10%,, red, blue)",
1300     "-moz-linear-gradient(45px, center, red, blue)",
1301     "-moz-linear-gradient(45px, center red, blue)",
1302     "-moz-radial-gradient(contain, ellipse, red, blue)",
1303     "-moz-radial-gradient(10deg contain, red, blue)",
1304     "-moz-radial-gradient(10deg, contain,, red, blue)",
1305     "-moz-radial-gradient(contain contain, red, blue)",
1306     "-moz-radial-gradient(ellipse circle, red, blue)",
1307     "-moz-radial-gradient(to top left, red, blue)",
1308     "-moz-radial-gradient(center, 10%, red, blue)",
1309     "-moz-radial-gradient(5rad, 20px, red, blue)",
1311     "-moz-radial-gradient(at top left to cover, red, blue)",
1312     "-moz-radial-gradient(at 15% 20% circle, red, blue)",
1314     "-moz-radial-gradient(to cover, red, blue)",
1315     "-moz-radial-gradient(to contain, red, blue)",
1316     "-moz-radial-gradient(to closest-side circle, red, blue)",
1317     "-moz-radial-gradient(to farthest-corner ellipse, red, blue)",
1319     "-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)",
1320     "-moz-radial-gradient(circle at 45px farthest-side, red, blue)",
1321     "-moz-radial-gradient(ellipse 45px, closest-side, red, blue)",
1322     "-moz-radial-gradient(circle 45px, farthest-corner, red, blue)",
1323     "-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)",
1324     "-moz-radial-gradient(circle, circle farthest-corner, red, blue)",
1326     "-moz-radial-gradient(99deg to farthest-corner, red, blue)",
1327     "-moz-radial-gradient(-1.2345rad circle, red, blue)",
1328     "-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)",
1329     "-moz-radial-gradient(circle 399grad to farthest-side, red, blue)",
1331     "-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)",
1332     "-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)",
1333     "-moz-radial-gradient(to top left at 30% 40%, red, blue)",
1334     "-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)",
1335     "-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)",
1337     "-moz-radial-gradient(to 50%, red, blue)",
1338     "-moz-radial-gradient(circle to 50%, red, blue)",
1339     "-moz-radial-gradient(circle to 43px 43px, red, blue)",
1340     "-moz-radial-gradient(circle to 50% 50%, red, blue)",
1341     "-moz-radial-gradient(circle to 43px 50%, red, blue)",
1342     "-moz-radial-gradient(circle to 50% 43px, red, blue)",
1343     "-moz-radial-gradient(ellipse to 43px, red, blue)",
1344     "-moz-radial-gradient(ellipse to 50%, red, blue)",
1346     "-moz-linear-gradient(to 0 0, red, blue)",
1347     "-moz-linear-gradient(to 20% bottom, red, blue)",
1348     "-moz-linear-gradient(to center 20%, red, blue)",
1349     "-moz-linear-gradient(to left 35px, red, blue)",
1350     "-moz-linear-gradient(to 10% 10em, red, blue)",
1351     "-moz-linear-gradient(to 44px top, red, blue)",
1352     "-moz-linear-gradient(to top left 45deg, red, blue)",
1353     "-moz-linear-gradient(to 20% bottom -300deg, red, blue)",
1354     "-moz-linear-gradient(to center 20% 1.95929rad, red, blue)",
1355     "-moz-linear-gradient(to left 35px 30grad, red, blue)",
1356     "-moz-linear-gradient(to 10% 10em 99999deg, red, blue)",
1357     "-moz-linear-gradient(to 44px top -33deg, red, blue)",
1358     "-moz-linear-gradient(to -33deg, red, blue)",
1359     "-moz-linear-gradient(to 30grad left 35px, red, blue)",
1360     "-moz-linear-gradient(to 10deg 20px, red, blue)",
1361     "-moz-linear-gradient(to .414rad bottom, red, blue)",
1363     "-moz-linear-gradient(to top top, red, blue)",
1364     "-moz-linear-gradient(to bottom bottom, red, blue)",
1365     "-moz-linear-gradient(to left left, red, blue)",
1366     "-moz-linear-gradient(to right right, red, blue)",
1368     "-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
1369     "-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
1370     "-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
1371     "-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
1372     "-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
1373     "-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
1374     "-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
1375     "-moz-repeating-linear-gradient(left left, top top, blue 0)",
1376     "-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)",
1377     "-moz-repeating-linear-gradient(left left blue red)",
1378     "-moz-repeating-linear-gradient()",
1380     "-moz-repeating-linear-gradient(to 0 0, red, blue)",
1381     "-moz-repeating-linear-gradient(to 20% bottom, red, blue)",
1382     "-moz-repeating-linear-gradient(to center 20%, red, blue)",
1383     "-moz-repeating-linear-gradient(to left 35px, red, blue)",
1384     "-moz-repeating-linear-gradient(to 10% 10em, red, blue)",
1385     "-moz-repeating-linear-gradient(to 44px top, red, blue)",
1386     "-moz-repeating-linear-gradient(to top left 45deg, red, blue)",
1387     "-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)",
1388     "-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)",
1389     "-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)",
1390     "-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)",
1391     "-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)",
1392     "-moz-repeating-linear-gradient(to -33deg, red, blue)",
1393     "-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)",
1394     "-moz-repeating-linear-gradient(to 10deg 20px, red, blue)",
1395     "-moz-repeating-linear-gradient(to .414rad bottom, red, blue)",
1397     "-moz-repeating-linear-gradient(to top top, red, blue)",
1398     "-moz-repeating-linear-gradient(to bottom bottom, red, blue)",
1399     "-moz-repeating-linear-gradient(to left left, red, blue)",
1400     "-moz-repeating-linear-gradient(to right right, red, blue)",
1402     "-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)",
1403     "-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)",
1404     "-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)",
1406     /* Valid only when unprefixed */
1407     "-moz-radial-gradient(at top left, red, blue)",
1408     "-moz-radial-gradient(at 20% bottom, red, blue)",
1409     "-moz-radial-gradient(at center 20%, red, blue)",
1410     "-moz-radial-gradient(at left 35px, red, blue)",
1411     "-moz-radial-gradient(at 10% 10em, red, blue)",
1412     "-moz-radial-gradient(at 44px top, red, blue)",
1413     "-moz-radial-gradient(at 0 0, red, blue)",
1415     "-moz-radial-gradient(circle 43px, red, blue)",
1416     "-moz-radial-gradient(ellipse 43px 43px, red, blue)",
1417     "-moz-radial-gradient(ellipse 50% 50%, red, blue)",
1418     "-moz-radial-gradient(ellipse 43px 50%, red, blue)",
1419     "-moz-radial-gradient(ellipse 50% 43px, red, blue)",
1421     "-moz-radial-gradient(farthest-corner at top left, red, blue)",
1422     "-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)",
1423     "-moz-radial-gradient(circle farthest-side at 45px, red, blue)",
1424     "-moz-radial-gradient(closest-side ellipse at 50%, red, blue)",
1425     "-moz-radial-gradient(farthest-corner circle at 4em, red, blue)",
1427     "-moz-radial-gradient(30% 40% at top left, red, blue)",
1428     "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)",
1429     "-moz-radial-gradient(7em 8em at 45px, red, blue)"
1430   );
1433 const pathValues = {
1434   other_values: [
1435     "path('M 10 10 20 20 H 90 V 90 Z')",
1436     "path('M10 10 20,20H90V90Z')",
1437     "path('M 10 10 C 20 20, 40 20, 50 10')",
1438     "path('M 10 80 C 40 10, 65 10, 95 80 S 1.5e2 150, 180 80')",
1439     "path('M 10 80 Q 95 10 180 80')",
1440     "path('M 10 80 Q 52.5 10, 95 80 T 180 80')",
1441     "path('M 80 80 A 45 45, 0, 0, 0, 1.25e2 1.25e2 L 125 80 Z')",
1442     "path('M100-200h20z')",
1443     "path('M10,10L20.6.5z')",
1444   ],
1445   invalid_values: [
1446     "path()",
1447     "path(a)",
1448     "path('M 10 Z')",
1449     "path('M 10-10 20')",
1450     "path('M 10 10 C 20 20 40 20')",
1451   ],
1454 var gCSSProperties = {
1455   animation: {
1456     domProp: "animation",
1457     inherited: false,
1458     type: CSS_TYPE_TRUE_SHORTHAND,
1459     applies_to_marker: true,
1460     subproperties: [
1461       "animation-name",
1462       "animation-duration",
1463       "animation-timing-function",
1464       "animation-delay",
1465       "animation-direction",
1466       "animation-fill-mode",
1467       "animation-iteration-count",
1468       "animation-play-state",
1469     ],
1470     initial_values: [
1471       "none none 0s 0s ease normal running 1.0",
1472       "none",
1473       "0s",
1474       "ease",
1475       "normal",
1476       "running",
1477       "1.0",
1478     ],
1479     other_values: [
1480       "none none 0s 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) normal running 1.0",
1481       "bounce 1s linear 2s",
1482       "bounce 1s 2s linear",
1483       "bounce linear 1s 2s",
1484       "linear bounce 1s 2s",
1485       "linear 1s bounce 2s",
1486       "linear 1s 2s bounce",
1487       "1s bounce linear 2s",
1488       "1s bounce 2s linear",
1489       "1s 2s bounce linear",
1490       "1s linear bounce 2s",
1491       "1s linear 2s bounce",
1492       "1s 2s linear bounce",
1493       "bounce linear 1s",
1494       "bounce 1s linear",
1495       "linear bounce 1s",
1496       "linear 1s bounce",
1497       "1s bounce linear",
1498       "1s linear bounce",
1499       "1s 2s bounce",
1500       "1s bounce 2s",
1501       "bounce 1s 2s",
1502       "1s 2s linear",
1503       "1s linear 2s",
1504       "linear 1s 2s",
1505       "bounce 1s",
1506       "1s bounce",
1507       "linear 1s",
1508       "1s linear",
1509       "1s 2s",
1510       "2s 1s",
1511       "bounce",
1512       "linear",
1513       "1s",
1514       "height",
1515       "2s",
1516       "ease-in-out",
1517       "2s ease-in",
1518       "opacity linear",
1519       "ease-out 2s",
1520       "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)",
1521       "1s \\32bounce linear 2s",
1522       "1s -bounce linear 2s",
1523       "1s -\\32bounce linear 2s",
1524       "1s \\32 0bounce linear 2s",
1525       "1s -\\32 0bounce linear 2s",
1526       "1s \\2bounce linear 2s",
1527       "1s -\\2bounce linear 2s",
1528       "2s, 1s bounce",
1529       "1s bounce, 2s",
1530       "2s all, 1s bounce",
1531       "1s bounce, 2s all",
1532       "1s bounce, 2s none",
1533       "2s none, 1s bounce",
1534       "2s bounce, 1s all",
1535       "2s all, 1s bounce",
1536     ],
1537     invalid_values: [
1538       "2s inherit",
1539       "inherit 2s",
1540       "2s bounce, 1s inherit",
1541       "2s inherit, 1s bounce",
1542       "2s initial",
1543       "2s all,, 1s bounce",
1544       "2s all, , 1s bounce",
1545       "bounce 1s cubic-bezier(0, rubbish) 2s",
1546       "bounce 1s steps(rubbish) 2s",
1547       "2s unset",
1548     ],
1549   },
1550   "animation-delay": {
1551     domProp: "animationDelay",
1552     inherited: false,
1553     type: CSS_TYPE_LONGHAND,
1554     applies_to_marker: true,
1555     initial_values: ["0s", "0ms"],
1556     other_values: [
1557       "1s",
1558       "250ms",
1559       "-100ms",
1560       "-1s",
1561       "1s, 250ms, 2.3s",
1562       "calc(1s + 2ms)",
1563     ],
1564     invalid_values: ["0", "0px"],
1565   },
1566   "animation-direction": {
1567     domProp: "animationDirection",
1568     inherited: false,
1569     type: CSS_TYPE_LONGHAND,
1570     applies_to_marker: true,
1571     initial_values: ["normal"],
1572     other_values: [
1573       "alternate",
1574       "normal, alternate",
1575       "alternate, normal",
1576       "normal, normal",
1577       "normal, normal, normal",
1578       "reverse",
1579       "alternate-reverse",
1580       "normal, reverse, alternate-reverse, alternate",
1581     ],
1582     invalid_values: [
1583       "normal normal",
1584       "inherit, normal",
1585       "reverse-alternate",
1586       "normal, unset",
1587       "unset, normal",
1588     ],
1589   },
1590   "animation-duration": {
1591     domProp: "animationDuration",
1592     inherited: false,
1593     type: CSS_TYPE_LONGHAND,
1594     initial_values: ["0s", "0ms"],
1595     applies_to_marker: true,
1596     other_values: ["1s", "250ms", "1s, 250ms, 2.3s", "calc(1s + 2ms)"],
1597     invalid_values: ["0", "0px", "-1ms", "-2s"],
1598   },
1599   "animation-fill-mode": {
1600     domProp: "animationFillMode",
1601     inherited: false,
1602     type: CSS_TYPE_LONGHAND,
1603     applies_to_marker: true,
1604     initial_values: ["none"],
1605     other_values: [
1606       "forwards",
1607       "backwards",
1608       "both",
1609       "none, none",
1610       "forwards, backwards",
1611       "forwards, none",
1612       "none, both",
1613     ],
1614     invalid_values: ["all"],
1615   },
1616   "animation-iteration-count": {
1617     domProp: "animationIterationCount",
1618     inherited: false,
1619     type: CSS_TYPE_LONGHAND,
1620     applies_to_marker: true,
1621     initial_values: ["1"],
1622     other_values: [
1623       "infinite",
1624       "0",
1625       "0.5",
1626       "7.75",
1627       "-0.0",
1628       "1, 2, 3",
1629       "infinite, 2",
1630       "1, infinite",
1631       "calc(1 + 2.0)",
1632     ],
1633     // negatives forbidden per
1634     // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
1635     invalid_values: ["none", "-1", "-0.5", "-1, infinite", "infinite, -3"],
1636   },
1637   "animation-name": {
1638     domProp: "animationName",
1639     inherited: false,
1640     type: CSS_TYPE_LONGHAND,
1641     applies_to_marker: true,
1642     initial_values: ["none"],
1643     other_values: [
1644       "all",
1645       "ball",
1646       "mall",
1647       "color",
1648       "bounce, bubble, opacity",
1649       "foobar",
1650       "auto",
1651       "\\32bounce",
1652       "-bounce",
1653       "-\\32bounce",
1654       "\\32 0bounce",
1655       "-\\32 0bounce",
1656       "\\2bounce",
1657       "-\\2bounce",
1658     ],
1659     invalid_values: [
1660       "bounce, initial",
1661       "initial, bounce",
1662       "bounce, inherit",
1663       "inherit, bounce",
1664       "bounce, unset",
1665       "unset, bounce",
1666     ],
1667   },
1668   "animation-play-state": {
1669     domProp: "animationPlayState",
1670     inherited: false,
1671     type: CSS_TYPE_LONGHAND,
1672     applies_to_marker: true,
1673     initial_values: ["running"],
1674     other_values: [
1675       "paused",
1676       "running, running",
1677       "paused, running",
1678       "paused, paused",
1679       "running, paused",
1680       "paused, running, running, running, paused, running",
1681     ],
1682     invalid_values: ["0"],
1683   },
1684   "animation-timing-function": {
1685     domProp: "animationTimingFunction",
1686     inherited: false,
1687     type: CSS_TYPE_LONGHAND,
1688     applies_to_marker: true,
1689     initial_values: ["ease"],
1690     other_values: [
1691       "cubic-bezier(0.25, 0.1, 0.25, 1.0)",
1692       "linear",
1693       "ease-in",
1694       "ease-out",
1695       "ease-in-out",
1696       "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)",
1697       "cubic-bezier(0.5, 0.5, 0.5, 0.5)",
1698       "cubic-bezier(0.25, 1.5, 0.75, -0.5)",
1699       "step-start",
1700       "step-end",
1701       "steps(1)",
1702       "steps(2, start)",
1703       "steps(386)",
1704       "steps(3, end)",
1705       "steps(calc(2 + 1))",
1706       "steps(1, jump-start)",
1707       "steps(1, jump-end)",
1708       "steps(2, jump-none)",
1709       "steps(1, jump-both)",
1710     ],
1711     invalid_values: [
1712       "none",
1713       "auto",
1714       "cubic-bezier(0.25, 0.1, 0.25)",
1715       "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)",
1716       "cubic-bezier(-0.5, 0.5, 0.5, 0.5)",
1717       "cubic-bezier(1.5, 0.5, 0.5, 0.5)",
1718       "cubic-bezier(0.5, 0.5, -0.5, 0.5)",
1719       "cubic-bezier(0.5, 0.5, 1.5, 0.5)",
1720       "steps(2, step-end)",
1721       "steps(0)",
1722       "steps(-2)",
1723       "steps(0, step-end, 1)",
1724       "steps(0, jump-start)",
1725       "steps(0, jump-end)",
1726       "steps(1, jump-none)",
1727       "steps(0, jump-both)",
1728     ],
1729   },
1730   appearance: {
1731     domProp: "appearance",
1732     inherited: false,
1733     type: CSS_TYPE_LONGHAND,
1734     initial_values: ["none"],
1735     other_values: ["auto", "radio", "menulist"],
1736     invalid_values: [],
1737   },
1738   "-moz-appearance": {
1739     domProp: "MozAppearance",
1740     inherited: false,
1741     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1742     alias_for: "appearance",
1743     subproperties: ["appearance"],
1744   },
1745   "-webkit-appearance": {
1746     domProp: "webkitAppearance",
1747     inherited: false,
1748     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1749     alias_for: "appearance",
1750     subproperties: ["appearance"],
1751   },
1752   "aspect-ratio": {
1753     domProp: "aspectRatio",
1754     inherited: false,
1755     type: CSS_TYPE_LONGHAND,
1756     initial_values: ["auto"],
1757     other_values: [
1758       "1",
1759       "1.0",
1760       "1 / 2",
1761       "1/2",
1762       "16.2 / 9.5",
1763       "1/0",
1764       "0/1",
1765       "0 / 0",
1766       "auto 1",
1767       "0 auto",
1768     ],
1769     invalid_values: ["none", "1 test", "1 / auto", "auto / 1"],
1770   },
1771   "border-inline": {
1772     domProp: "borderInline",
1773     inherited: false,
1774     type: CSS_TYPE_TRUE_SHORTHAND,
1775     subproperties: [
1776       "border-inline-start-color",
1777       "border-inline-start-style",
1778       "border-inline-start-width",
1779       "border-inline-end-color",
1780       "border-inline-end-style",
1781       "border-inline-end-width",
1782     ],
1783     initial_values: [
1784       "none",
1785       "medium",
1786       "currentColor",
1787       "thin",
1788       "none medium currentcolor",
1789     ],
1790     other_values: [
1791       "solid",
1792       "green",
1793       "medium solid",
1794       "green solid",
1795       "10px solid",
1796       "thick solid",
1797       "5px green none",
1798     ],
1799     invalid_values: ["5%", "5", "5 solid green"],
1800   },
1801   "border-inline-end": {
1802     domProp: "borderInlineEnd",
1803     inherited: false,
1804     type: CSS_TYPE_TRUE_SHORTHAND,
1805     subproperties: [
1806       "border-inline-end-color",
1807       "border-inline-end-style",
1808       "border-inline-end-width",
1809     ],
1810     initial_values: [
1811       "none",
1812       "medium",
1813       "currentColor",
1814       "thin",
1815       "none medium currentcolor",
1816     ],
1817     other_values: [
1818       "solid",
1819       "green",
1820       "medium solid",
1821       "green solid",
1822       "10px solid",
1823       "thick solid",
1824       "5px green none",
1825     ],
1826     invalid_values: ["5%", "5", "5 green none"],
1827   },
1828   "border-inline-color": {
1829     domProp: "borderInlineColor",
1830     inherited: false,
1831     type: CSS_TYPE_TRUE_SHORTHAND,
1832     subproperties: ["border-inline-start-color", "border-inline-end-color"],
1833     initial_values: ["currentColor"],
1834     other_values: ["green", "rgba(255,128,0,0.5) blue", "blue transparent"],
1835     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
1836   },
1837   "border-inline-end-color": {
1838     domProp: "borderInlineEndColor",
1839     inherited: false,
1840     type: CSS_TYPE_LONGHAND,
1841     applies_to_first_letter: true,
1842     logical: true,
1843     initial_values: ["currentColor"],
1844     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
1845     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
1846   },
1847   "border-inline-style": {
1848     domProp: "borderInlineStyle",
1849     inherited: false,
1850     type: CSS_TYPE_TRUE_SHORTHAND,
1851     subproperties: ["border-inline-start-style", "border-inline-end-style"],
1852     initial_values: ["none"],
1853     other_values: [
1854       "solid",
1855       "dashed solid",
1856       "solid dotted",
1857       "double double",
1858       "inset outset",
1859       "inset double",
1860       "none groove",
1861       "ridge none",
1862     ],
1863     invalid_values: [],
1864   },
1865   "border-inline-end-style": {
1866     domProp: "borderInlineEndStyle",
1867     inherited: false,
1868     type: CSS_TYPE_LONGHAND,
1869     applies_to_first_letter: true,
1870     logical: true,
1871     /* XXX hidden is sometimes the same as initial */
1872     initial_values: ["none"],
1873     other_values: [
1874       "solid",
1875       "dashed",
1876       "dotted",
1877       "double",
1878       "outset",
1879       "inset",
1880       "groove",
1881       "ridge",
1882     ],
1883     invalid_values: [],
1884   },
1885   "border-inline-width": {
1886     domProp: "borderInlineWidth",
1887     inherited: false,
1888     type: CSS_TYPE_TRUE_SHORTHAND,
1889     subproperties: ["border-inline-start-width", "border-inline-end-width"],
1890     prerequisites: { "border-style": "solid" },
1891     initial_values: ["medium", "3px", "medium medium"],
1892     other_values: [
1893       "thin",
1894       "thick",
1895       "1px",
1896       "2em",
1897       "calc(2px)",
1898       "calc(2px) thin",
1899       "calc(-2px)",
1900       "calc(-2px) thick",
1901       "calc(0em)",
1902       "medium calc(0em)",
1903       "calc(0px)",
1904       "1px calc(0px)",
1905       "calc(5em)",
1906       "1em calc(5em)",
1907     ],
1908     invalid_values: ["5%", "5", "5 thin", "thin 5%", "blue", "solid"],
1909   },
1910   "border-inline-end-width": {
1911     domProp: "borderInlineEndWidth",
1912     inherited: false,
1913     type: CSS_TYPE_LONGHAND,
1914     applies_to_first_letter: true,
1915     logical: true,
1916     prerequisites: { "border-inline-end-style": "solid" },
1917     initial_values: ["medium", "3px", "calc(4px - 1px)"],
1918     other_values: [
1919       "thin",
1920       "thick",
1921       "1px",
1922       "2em",
1923       "calc(2px)",
1924       "calc(-2px)",
1925       "calc(0em)",
1926       "calc(0px)",
1927       "calc(5em)",
1928       "calc(3*25px)",
1929       "calc(25px*3)",
1930       "calc(3*25px + 5em)",
1931     ],
1932     invalid_values: ["5%", "5"],
1933   },
1934   "border-image": {
1935     domProp: "borderImage",
1936     inherited: false,
1937     type: CSS_TYPE_TRUE_SHORTHAND,
1938     subproperties: [
1939       "border-image-source",
1940       "border-image-slice",
1941       "border-image-width",
1942       "border-image-outset",
1943       "border-image-repeat",
1944     ],
1945     initial_values: ["none"],
1946     other_values: [
1947       "url('border.png') 27 27 27 27",
1948       "url('border.png') 27",
1949       "stretch url('border.png')",
1950       "url('border.png') 27 fill",
1951       "url('border.png') 27 27 27 27 repeat",
1952       "repeat url('border.png') 27 27 27 27",
1953       "url('border.png') repeat 27 27 27 27",
1954       "url('border.png') fill 27 27 27 27 repeat",
1955       "url('border.png') fill 27 27 27 27 repeat space",
1956       "url('border.png') 27 27 27 27 / 1em",
1957       "27 27 27 27 / 1em url('border.png') ",
1958       "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat",
1959       "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')",
1960       "url('border.png') 27 27 27 27 / / 10 10 1em",
1961       "fill 27 27 27 27 / / 10 10 1em url('border.png')",
1962       "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat",
1963       "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round",
1964     ],
1965     invalid_values: [
1966       "url('border.png') 27 27 27 27 27",
1967       "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em",
1968       "url('border.png') 27 27 27 27 /",
1969       "url('border.png') fill",
1970       "url('border.png') fill repeat",
1971       "fill repeat",
1972       "url('border.png') fill / 1em",
1973       "url('border.png') / repeat",
1974       "url('border.png') 1 /",
1975       "url('border.png') 1 / /",
1976       "1 / url('border.png')",
1977       "url('border.png') / 1",
1978       "url('border.png') / / 1",
1979     ],
1980   },
1981   "border-image-source": {
1982     domProp: "borderImageSource",
1983     inherited: false,
1984     type: CSS_TYPE_LONGHAND,
1985     applies_to_first_letter: true,
1986     initial_values: ["none"],
1987     other_values: ["url('border.png')"].concat(validNonUrlImageValues),
1988     invalid_values: ["url('border.png') url('border.png')"].concat(
1989       invalidNonUrlImageValues
1990     ),
1991     unbalanced_values: [].concat(unbalancedGradientAndElementValues),
1992   },
1993   "border-image-slice": {
1994     domProp: "borderImageSlice",
1995     inherited: false,
1996     type: CSS_TYPE_LONGHAND,
1997     applies_to_first_letter: true,
1998     initial_values: ["100%", "100% 100% 100% 100%"],
1999     other_values: [
2000       "0%",
2001       "10",
2002       "10 100% 0 2",
2003       "0 0 0 0",
2004       "fill 10 10",
2005       "10 10 fill",
2006     ],
2007     invalid_values: [
2008       "-10%",
2009       "-10",
2010       "10 10 10 10 10",
2011       "10 10 10 10 -10",
2012       "10px",
2013       "-10px",
2014       "fill",
2015       "fill fill 10px",
2016       "10px fill fill",
2017     ],
2018   },
2019   "border-image-width": {
2020     domProp: "borderImageWidth",
2021     inherited: false,
2022     type: CSS_TYPE_LONGHAND,
2023     applies_to_first_letter: true,
2024     initial_values: ["1", "1 1 1 1"],
2025     other_values: [
2026       "0",
2027       "0%",
2028       "0px",
2029       "auto auto auto auto",
2030       "10 10% auto 15px",
2031       "10px 10px 10px 10px",
2032       "10",
2033       "10 10",
2034       "10 10 10",
2035       "calc(10px)",
2036       "calc(10px + 5%)",
2037     ],
2038     invalid_values: [
2039       "-10",
2040       "-10px",
2041       "-10%",
2042       "10 10 10 10 10",
2043       "10 10 10 10 auto",
2044       "auto auto auto auto auto",
2045       "10px calc(nonsense)",
2046       "1px red",
2047     ],
2048     unbalanced_values: ["10px calc("],
2049   },
2050   "border-image-outset": {
2051     domProp: "borderImageOutset",
2052     inherited: false,
2053     type: CSS_TYPE_LONGHAND,
2054     applies_to_first_letter: true,
2055     initial_values: ["0", "0 0 0 0"],
2056     other_values: [
2057       "10px",
2058       "10",
2059       "10 10",
2060       "10 10 10",
2061       "10 10 10 10",
2062       "10px 10 10 10px",
2063     ],
2064     invalid_values: [
2065       "-10",
2066       "-10px",
2067       "-10%",
2068       "10%",
2069       "10 10 10 10 10",
2070       "10px calc(nonsense)",
2071       "1px red",
2072     ],
2073     unbalanced_values: ["10px calc("],
2074   },
2075   "border-image-repeat": {
2076     domProp: "borderImageRepeat",
2077     inherited: false,
2078     type: CSS_TYPE_LONGHAND,
2079     applies_to_first_letter: true,
2080     initial_values: ["stretch", "stretch stretch"],
2081     other_values: [
2082       "round",
2083       "repeat",
2084       "stretch round",
2085       "repeat round",
2086       "stretch repeat",
2087       "round round",
2088       "repeat repeat",
2089       "space",
2090       "stretch space",
2091       "repeat space",
2092       "round space",
2093       "space space",
2094     ],
2095     invalid_values: ["none", "stretch stretch stretch", "0", "10", "0%", "0px"],
2096   },
2097   "border-radius": {
2098     domProp: "borderRadius",
2099     inherited: false,
2100     type: CSS_TYPE_TRUE_SHORTHAND,
2101     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2102     subproperties: [
2103       "border-bottom-left-radius",
2104       "border-bottom-right-radius",
2105       "border-top-left-radius",
2106       "border-top-right-radius",
2107     ],
2108     initial_values: [
2109       "0",
2110       "0px",
2111       "0px 0 0 0px",
2112       "calc(-2px)",
2113       "calc(0px) calc(0pt)",
2114       "calc(0px) calc(0pt) calc(0px) calc(0em)",
2115     ],
2116     other_values: [
2117       "0%",
2118       "3%",
2119       "1px",
2120       "2em",
2121       "3em 2px",
2122       "2pt 3% 4em",
2123       "2px 2px 2px 2px", // circular
2124       "3% / 2%",
2125       "1px / 4px",
2126       "2em / 1em",
2127       "3em 2px / 2px 3em",
2128       "2pt 3% 4em / 4pt 1% 5em",
2129       "2px 2px 2px 2px / 4px 4px 4px 4px",
2130       "1pt / 2pt 3pt",
2131       "4pt 5pt / 3pt", // elliptical
2132       "calc(-1%)",
2133       "calc(2px)",
2134       "calc(50%)",
2135       "calc(3*25px)",
2136       "calc(3*25px) 5px",
2137       "5px calc(3*25px)",
2138       "calc(20%) calc(3*25px)",
2139       "calc(25px*3)",
2140       "calc(3*25px + 50%)",
2141       "2px 2px calc(2px + 1%) 2px",
2142       "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
2143     ],
2144     invalid_values: [
2145       "2px -2px",
2146       "inherit 2px",
2147       "inherit / 2px",
2148       "2px inherit",
2149       "2px / inherit",
2150       "2px 2px 2px 2px 2px",
2151       "1px / 2px 2px 2px 2px 2px",
2152       "2",
2153       "2 2",
2154       "2px 2px 2px 2px / 2px 2px 2 2px",
2155       "2px calc(0px + rubbish)",
2156       "unset 2px",
2157       "unset / 2px",
2158       "2px unset",
2159       "2px / unset",
2160     ],
2161   },
2162   "border-bottom-left-radius": {
2163     domProp: "borderBottomLeftRadius",
2164     inherited: false,
2165     type: CSS_TYPE_LONGHAND,
2166     applies_to_first_letter: true,
2167     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2168     initial_values: ["0", "0px", "calc(-2px)"],
2169     other_values: [
2170       "0%",
2171       "3%",
2172       "1px",
2173       "2em", // circular
2174       "3% 2%",
2175       "1px 4px",
2176       "2em 2pt", // elliptical
2177       "calc(-1%)",
2178       "calc(2px)",
2179       "calc(50%)",
2180       "calc(3*25px)",
2181       "calc(3*25px) 5px",
2182       "5px calc(3*25px)",
2183       "calc(20%) calc(3*25px)",
2184       "calc(25px*3)",
2185       "calc(3*25px + 50%)",
2186     ],
2187     invalid_values: [
2188       "-1px",
2189       "4px -2px",
2190       "inherit 2px",
2191       "2px inherit",
2192       "2",
2193       "2px 2",
2194       "2 2px",
2195       "2px calc(0px + rubbish)",
2196       "unset 2px",
2197       "2px unset",
2198     ],
2199   },
2200   "border-bottom-right-radius": {
2201     domProp: "borderBottomRightRadius",
2202     inherited: false,
2203     type: CSS_TYPE_LONGHAND,
2204     applies_to_first_letter: true,
2205     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2206     initial_values: ["0", "0px", "calc(-2px)"],
2207     other_values: [
2208       "0%",
2209       "3%",
2210       "1px",
2211       "2em", // circular
2212       "3% 2%",
2213       "1px 4px",
2214       "2em 2pt", // elliptical
2215       "calc(-1%)",
2216       "calc(2px)",
2217       "calc(50%)",
2218       "calc(3*25px)",
2219       "calc(3*25px) 5px",
2220       "5px calc(3*25px)",
2221       "calc(20%) calc(3*25px)",
2222       "calc(25px*3)",
2223       "calc(3*25px + 50%)",
2224     ],
2225     invalid_values: [
2226       "-1px",
2227       "4px -2px",
2228       "inherit 2px",
2229       "2px inherit",
2230       "2",
2231       "2px 2",
2232       "2 2px",
2233       "2px calc(0px + rubbish)",
2234       "unset 2px",
2235       "2px unset",
2236     ],
2237   },
2238   "border-top-left-radius": {
2239     domProp: "borderTopLeftRadius",
2240     inherited: false,
2241     type: CSS_TYPE_LONGHAND,
2242     applies_to_first_letter: true,
2243     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2244     initial_values: ["0", "0px", "calc(-2px)"],
2245     other_values: [
2246       "0%",
2247       "3%",
2248       "1px",
2249       "2em", // circular
2250       "3% 2%",
2251       "1px 4px",
2252       "2em 2pt", // elliptical
2253       "calc(-1%)",
2254       "calc(2px)",
2255       "calc(50%)",
2256       "calc(3*25px)",
2257       "calc(3*25px) 5px",
2258       "5px calc(3*25px)",
2259       "calc(20%) calc(3*25px)",
2260       "calc(25px*3)",
2261       "calc(3*25px + 50%)",
2262     ],
2263     invalid_values: [
2264       "-1px",
2265       "4px -2px",
2266       "inherit 2px",
2267       "2px inherit",
2268       "2",
2269       "2px 2",
2270       "2 2px",
2271       "2px calc(0px + rubbish)",
2272       "unset 2px",
2273       "2px unset",
2274     ],
2275   },
2276   "border-top-right-radius": {
2277     domProp: "borderTopRightRadius",
2278     inherited: false,
2279     type: CSS_TYPE_LONGHAND,
2280     applies_to_first_letter: true,
2281     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2282     initial_values: ["0", "0px", "calc(-2px)"],
2283     other_values: [
2284       "0%",
2285       "3%",
2286       "1px",
2287       "2em", // circular
2288       "3% 2%",
2289       "1px 4px",
2290       "2em 2pt", // elliptical
2291       "calc(-1%)",
2292       "calc(2px)",
2293       "calc(50%)",
2294       "calc(3*25px)",
2295       "calc(3*25px) 5px",
2296       "5px calc(3*25px)",
2297       "calc(20%) calc(3*25px)",
2298       "calc(25px*3)",
2299       "calc(3*25px + 50%)",
2300     ],
2301     invalid_values: [
2302       "-1px",
2303       "4px -2px",
2304       "inherit 2px",
2305       "2px inherit",
2306       "2",
2307       "2px 2",
2308       "2 2px",
2309       "2px calc(0px + rubbish)",
2310       "unset 2px",
2311       "2px unset",
2312     ],
2313   },
2314   "border-start-start-radius": {
2315     domProp: "borderStartStartRadius",
2316     inherited: false,
2317     type: CSS_TYPE_LONGHAND,
2318     applies_to_first_letter: true,
2319     logical: true,
2320     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2321     initial_values: ["0", "0px", "calc(-2px)"],
2322     other_values: [
2323       "0%",
2324       "3%",
2325       "1px",
2326       "2em", // circular
2327       "3% 2%",
2328       "1px 4px",
2329       "2em 2pt", // elliptical
2330       "calc(-1%)",
2331       "calc(2px)",
2332       "calc(50%)",
2333       "calc(3*25px)",
2334       "calc(3*25px) 5px",
2335       "5px calc(3*25px)",
2336       "calc(20%) calc(3*25px)",
2337       "calc(25px*3)",
2338       "calc(3*25px + 50%)",
2339     ],
2340     invalid_values: [
2341       "-1px",
2342       "4px -2px",
2343       "inherit 2px",
2344       "2px inherit",
2345       "2",
2346       "2px 2",
2347       "2 2px",
2348       "2px calc(0px + rubbish)",
2349       "unset 2px",
2350       "2px unset",
2351     ],
2352   },
2353   "border-start-end-radius": {
2354     domProp: "borderStartEndRadius",
2355     inherited: false,
2356     type: CSS_TYPE_LONGHAND,
2357     applies_to_first_letter: true,
2358     logical: true,
2359     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2360     initial_values: ["0", "0px", "calc(-2px)"],
2361     other_values: [
2362       "0%",
2363       "3%",
2364       "1px",
2365       "2em", // circular
2366       "3% 2%",
2367       "1px 4px",
2368       "2em 2pt", // elliptical
2369       "calc(-1%)",
2370       "calc(2px)",
2371       "calc(50%)",
2372       "calc(3*25px)",
2373       "calc(3*25px) 5px",
2374       "5px calc(3*25px)",
2375       "calc(20%) calc(3*25px)",
2376       "calc(25px*3)",
2377       "calc(3*25px + 50%)",
2378     ],
2379     invalid_values: [
2380       "-1px",
2381       "4px -2px",
2382       "inherit 2px",
2383       "2px inherit",
2384       "2",
2385       "2px 2",
2386       "2 2px",
2387       "2px calc(0px + rubbish)",
2388       "unset 2px",
2389       "2px unset",
2390     ],
2391   },
2392   "border-end-start-radius": {
2393     domProp: "borderEndStartRadius",
2394     inherited: false,
2395     type: CSS_TYPE_LONGHAND,
2396     applies_to_first_letter: true,
2397     logical: true,
2398     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2399     initial_values: ["0", "0px", "calc(-2px)"],
2400     other_values: [
2401       "0%",
2402       "3%",
2403       "1px",
2404       "2em", // circular
2405       "3% 2%",
2406       "1px 4px",
2407       "2em 2pt", // elliptical
2408       "calc(-1%)",
2409       "calc(2px)",
2410       "calc(50%)",
2411       "calc(3*25px)",
2412       "calc(3*25px) 5px",
2413       "5px calc(3*25px)",
2414       "calc(20%) calc(3*25px)",
2415       "calc(25px*3)",
2416       "calc(3*25px + 50%)",
2417     ],
2418     invalid_values: [
2419       "-1px",
2420       "4px -2px",
2421       "inherit 2px",
2422       "2px inherit",
2423       "2",
2424       "2px 2",
2425       "2 2px",
2426       "2px calc(0px + rubbish)",
2427       "unset 2px",
2428       "2px unset",
2429     ],
2430   },
2431   "border-end-end-radius": {
2432     domProp: "borderEndEndRadius",
2433     inherited: false,
2434     type: CSS_TYPE_LONGHAND,
2435     applies_to_first_letter: true,
2436     logical: true,
2437     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2438     initial_values: ["0", "0px", "calc(-2px)"],
2439     other_values: [
2440       "0%",
2441       "3%",
2442       "1px",
2443       "2em", // circular
2444       "3% 2%",
2445       "1px 4px",
2446       "2em 2pt", // elliptical
2447       "calc(-1%)",
2448       "calc(2px)",
2449       "calc(50%)",
2450       "calc(3*25px)",
2451       "calc(3*25px) 5px",
2452       "5px calc(3*25px)",
2453       "calc(20%) calc(3*25px)",
2454       "calc(25px*3)",
2455       "calc(3*25px + 50%)",
2456     ],
2457     invalid_values: [
2458       "-1px",
2459       "4px -2px",
2460       "inherit 2px",
2461       "2px inherit",
2462       "2",
2463       "2px 2",
2464       "2 2px",
2465       "2px calc(0px + rubbish)",
2466       "unset 2px",
2467       "2px unset",
2468     ],
2469   },
2470   "border-inline-start": {
2471     domProp: "borderInlineStart",
2472     inherited: false,
2473     type: CSS_TYPE_TRUE_SHORTHAND,
2474     subproperties: [
2475       "border-inline-start-color",
2476       "border-inline-start-style",
2477       "border-inline-start-width",
2478     ],
2479     initial_values: [
2480       "none",
2481       "medium",
2482       "currentColor",
2483       "thin",
2484       "none medium currentcolor",
2485     ],
2486     other_values: [
2487       "solid",
2488       "green",
2489       "medium solid",
2490       "green solid",
2491       "10px solid",
2492       "thick solid",
2493       "5px green none",
2494     ],
2495     invalid_values: ["5%", "5", "5 green solid"],
2496   },
2497   "border-inline-start-color": {
2498     domProp: "borderInlineStartColor",
2499     inherited: false,
2500     type: CSS_TYPE_LONGHAND,
2501     applies_to_first_letter: true,
2502     logical: true,
2503     initial_values: ["currentColor"],
2504     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
2505     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
2506   },
2507   "border-inline-start-style": {
2508     domProp: "borderInlineStartStyle",
2509     inherited: false,
2510     type: CSS_TYPE_LONGHAND,
2511     applies_to_first_letter: true,
2512     logical: true,
2513     /* XXX hidden is sometimes the same as initial */
2514     initial_values: ["none"],
2515     other_values: [
2516       "solid",
2517       "dashed",
2518       "dotted",
2519       "double",
2520       "outset",
2521       "inset",
2522       "groove",
2523       "ridge",
2524     ],
2525     invalid_values: [],
2526   },
2527   "border-inline-start-width": {
2528     domProp: "borderInlineStartWidth",
2529     inherited: false,
2530     type: CSS_TYPE_LONGHAND,
2531     applies_to_first_letter: true,
2532     logical: true,
2533     prerequisites: { "border-inline-start-style": "solid" },
2534     initial_values: ["medium", "3px", "calc(4px - 1px)"],
2535     other_values: [
2536       "thin",
2537       "thick",
2538       "1px",
2539       "2em",
2540       "calc(2px)",
2541       "calc(-2px)",
2542       "calc(0em)",
2543       "calc(0px)",
2544       "calc(5em)",
2545       "calc(3*25px)",
2546       "calc(25px*3)",
2547       "calc(3*25px + 5em)",
2548     ],
2549     invalid_values: ["5%", "5"],
2550   },
2551   "-moz-box-align": {
2552     domProp: "MozBoxAlign",
2553     inherited: false,
2554     type: CSS_TYPE_LONGHAND,
2555     initial_values: ["stretch"],
2556     other_values: ["start", "center", "baseline", "end"],
2557     invalid_values: [],
2558   },
2559   "-moz-box-direction": {
2560     domProp: "MozBoxDirection",
2561     inherited: false,
2562     type: CSS_TYPE_LONGHAND,
2563     initial_values: ["normal"],
2564     other_values: ["reverse"],
2565     invalid_values: [],
2566   },
2567   "-moz-box-flex": {
2568     domProp: "MozBoxFlex",
2569     inherited: false,
2570     type: CSS_TYPE_LONGHAND,
2571     initial_values: ["0", "0.0", "-0.0"],
2572     other_values: ["1", "100", "0.1"],
2573     invalid_values: ["10px", "-1"],
2574   },
2575   "-moz-box-ordinal-group": {
2576     domProp: "MozBoxOrdinalGroup",
2577     inherited: false,
2578     type: CSS_TYPE_LONGHAND,
2579     initial_values: ["1"],
2580     other_values: ["2", "100", "0"],
2581     invalid_values: ["1.0", "-1", "-1000"],
2582   },
2583   "-moz-box-orient": {
2584     domProp: "MozBoxOrient",
2585     inherited: false,
2586     type: CSS_TYPE_LONGHAND,
2587     initial_values: ["horizontal", "inline-axis"],
2588     other_values: ["vertical", "block-axis"],
2589     invalid_values: [],
2590   },
2591   "-moz-box-pack": {
2592     domProp: "MozBoxPack",
2593     inherited: false,
2594     type: CSS_TYPE_LONGHAND,
2595     initial_values: ["start"],
2596     other_values: ["center", "end", "justify"],
2597     invalid_values: [],
2598   },
2599   "box-decoration-break": {
2600     domProp: "boxDecorationBreak",
2601     inherited: false,
2602     type: CSS_TYPE_LONGHAND,
2603     initial_values: ["slice"],
2604     other_values: ["clone"],
2605     invalid_values: ["auto", "none", "1px"],
2606   },
2607   "box-sizing": {
2608     domProp: "boxSizing",
2609     inherited: false,
2610     type: CSS_TYPE_LONGHAND,
2611     initial_values: ["content-box"],
2612     other_values: ["border-box"],
2613     invalid_values: [
2614       "padding-box",
2615       "margin-box",
2616       "content",
2617       "padding",
2618       "border",
2619       "margin",
2620     ],
2621   },
2622   "-moz-box-sizing": {
2623     domProp: "MozBoxSizing",
2624     inherited: false,
2625     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2626     alias_for: "box-sizing",
2627     subproperties: ["box-sizing"],
2628   },
2629   "print-color-adjust": {
2630     domProp: "printColorAdjust",
2631     inherited: true,
2632     type: CSS_TYPE_LONGHAND,
2633     initial_values: ["economy"],
2634     other_values: ["exact"],
2635     invalid_values: [],
2636   },
2637   "color-adjust": {
2638     domProp: "colorAdjust",
2639     inherited: true,
2640     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2641     alias_for: "print-color-adjust",
2642     subproperties: ["print-color-adjust"],
2643   },
2644   "color-scheme": {
2645     domProp: "colorScheme",
2646     inherited: true,
2647     type: CSS_TYPE_LONGHAND,
2648     initial_values: ["normal"],
2649     other_values: [
2650       "light",
2651       "dark",
2652       "light dark",
2653       "light dark purple",
2654       "light light dark",
2655       "only light",
2656       "only light dark",
2657       "only light dark purple",
2658       "light only",
2659     ],
2660     invalid_values: ["only normal", "normal only", "only light only"],
2661   },
2662   columns: {
2663     domProp: "columns",
2664     inherited: false,
2665     type: CSS_TYPE_TRUE_SHORTHAND,
2666     subproperties: ["column-count", "column-width"],
2667     initial_values: ["auto", "auto auto"],
2668     other_values: [
2669       "3",
2670       "20px",
2671       "2 10px",
2672       "10px 2",
2673       "2 auto",
2674       "auto 2",
2675       "auto 50px",
2676       "50px auto",
2677     ],
2678     invalid_values: [
2679       "5%",
2680       "-1px",
2681       "-1",
2682       "3 5",
2683       "10px 4px",
2684       "10 2px 5in",
2685       "30px -1",
2686       "auto 3 5px",
2687       "5 auto 20px",
2688       "auto auto auto",
2689       "calc(50px + rubbish) 2",
2690     ],
2691   },
2692   "column-count": {
2693     domProp: "columnCount",
2694     inherited: false,
2695     type: CSS_TYPE_LONGHAND,
2696     initial_values: ["auto"],
2697     other_values: ["1", "17"],
2698     // negative and zero invalid per editor's draft
2699     invalid_values: ["-1", "0", "3px"],
2700   },
2701   "column-fill": {
2702     domProp: "columnFill",
2703     inherited: false,
2704     type: CSS_TYPE_LONGHAND,
2705     initial_values: ["balance"],
2706     other_values: ["auto"],
2707     invalid_values: ["2px", "dotted", "5em"],
2708   },
2709   "column-rule": {
2710     domProp: "columnRule",
2711     inherited: false,
2712     type: CSS_TYPE_TRUE_SHORTHAND,
2713     prerequisites: { color: "green" },
2714     subproperties: [
2715       "column-rule-width",
2716       "column-rule-style",
2717       "column-rule-color",
2718     ],
2719     initial_values: [
2720       "medium none currentColor",
2721       "none",
2722       "medium",
2723       "currentColor",
2724     ],
2725     other_values: [
2726       "2px blue solid",
2727       "red dotted 1px",
2728       "ridge 4px orange",
2729       "5px solid",
2730     ],
2731     invalid_values: [
2732       "2px 3px 4px red",
2733       "dotted dashed",
2734       "5px dashed green 3px",
2735       "5 solid",
2736       "5 green solid",
2737     ],
2738   },
2739   "column-rule-width": {
2740     domProp: "columnRuleWidth",
2741     inherited: false,
2742     type: CSS_TYPE_LONGHAND,
2743     prerequisites: { "column-rule-style": "solid" },
2744     initial_values: ["medium", "3px", "calc(3px)", "calc(5em + 3px - 5em)"],
2745     other_values: [
2746       "thin",
2747       "15px",
2748       /* valid calc() values */
2749       "calc(-2px)",
2750       "calc(2px)",
2751       "calc(3em)",
2752       "calc(3em + 2px)",
2753       "calc( 3em + 2px)",
2754       "calc(3em + 2px )",
2755       "calc( 3em + 2px )",
2756       "calc(3*25px)",
2757       "calc(3 *25px)",
2758       "calc(3 * 25px)",
2759       "calc(3* 25px)",
2760       "calc(25px*3)",
2761       "calc(25px *3)",
2762       "calc(25px* 3)",
2763       "calc(25px * 3)",
2764       "calc(25px * 3 / 4)",
2765       "calc((25px * 3) / 4)",
2766       "calc(25px * (3 / 4))",
2767       "calc(3 * 25px / 4)",
2768       "calc((3 * 25px) / 4)",
2769       "calc(3 * (25px / 4))",
2770       "calc(3em + 25px * 3 / 4)",
2771       "calc(3em + (25px * 3) / 4)",
2772       "calc(3em + 25px * (3 / 4))",
2773       "calc(25px * 3 / 4 + 3em)",
2774       "calc((25px * 3) / 4 + 3em)",
2775       "calc(25px * (3 / 4) + 3em)",
2776       "calc(3em + (25px * 3 / 4))",
2777       "calc(3em + ((25px * 3) / 4))",
2778       "calc(3em + (25px * (3 / 4)))",
2779       "calc((25px * 3 / 4) + 3em)",
2780       "calc(((25px * 3) / 4) + 3em)",
2781       "calc((25px * (3 / 4)) + 3em)",
2782       "calc(3*25px + 1in)",
2783       "calc(1in - 3em + 2px)",
2784       "calc(1in - (3em + 2px))",
2785       "calc((1in - 3em) + 2px)",
2786       "calc(50px/2)",
2787       "calc(50px/(2 - 1))",
2788       "calc(-3px)",
2789       /* numeric reduction cases */
2790       "calc(5 * 3 * 2em)",
2791       "calc(2em * 5 * 3)",
2792       "calc((5 * 3) * 2em)",
2793       "calc(2em * (5 * 3))",
2794       "calc((5 + 3) * 2em)",
2795       "calc(2em * (5 + 3))",
2796       "calc(2em / (5 + 3))",
2797       "calc(2em * (5*2 + 3))",
2798       "calc(2em * ((5*2) + 3))",
2799       "calc(2em * (5*(2 + 3)))",
2801       "calc((5 + 7) * 3em)",
2802       "calc((5em + 3em) - 2em)",
2803       "calc((5em - 3em) + 2em)",
2804       "calc(2em - (5em - 3em))",
2805       "calc(2em + (5em - 3em))",
2806       "calc(2em - (5em + 3em))",
2807       "calc(2em + (5em + 3em))",
2808       "calc(2em + 5em - 3em)",
2809       "calc(2em - 5em - 3em)",
2810       "calc(2em + 5em + 3em)",
2811       "calc(2em - 5em + 3em)",
2813       "calc(2em / 4 * 3)",
2814       "calc(2em * 4 / 3)",
2815       "calc(2em * 4 * 3)",
2816       "calc(2em / 4 / 3)",
2817       "calc(4 * 2em / 3)",
2818       "calc(4 / 3 * 2em)",
2820       "calc((2em / 4) * 3)",
2821       "calc((2em * 4) / 3)",
2822       "calc((2em * 4) * 3)",
2823       "calc((2em / 4) / 3)",
2824       "calc((4 * 2em) / 3)",
2825       "calc((4 / 3) * 2em)",
2827       "calc(2em / (4 * 3))",
2828       "calc(2em * (4 / 3))",
2829       "calc(2em * (4 * 3))",
2830       "calc(2em / (4 / 3))",
2831       "calc(4 * (2em / 3))",
2833       "min(5px)",
2834       "min(5px,2em)",
2836       "max(5px)",
2837       "max(5px,2em)",
2839       "calc(min(5px))",
2840       "calc(min(5px,2em))",
2842       "calc(max(5px))",
2843       "calc(max(5px,2em))",
2845       // Valid cases with unitless zero (which is never
2846       // a length).
2847       "calc(0 * 2em)",
2848       "calc(2em * 0)",
2849       "calc(3em + 0 * 2em)",
2850       "calc(3em + 2em * 0)",
2851       "calc((0 + 2) * 2em)",
2852       "calc((2 + 0) * 2em)",
2853       // And test zero lengths while we're here.
2854       "calc(2 * 0px)",
2855       "calc(0 * 0px)",
2856       "calc(2 * 0em)",
2857       "calc(0 * 0em)",
2858       "calc(0px * 0)",
2859       "calc(0px * 2)",
2860     ],
2861     invalid_values: [
2862       "20",
2863       "-1px",
2864       "red",
2865       "50%",
2866       /* invalid calc() values */
2867       "calc(2em+ 2px)",
2868       "calc(2em +2px)",
2869       "calc(2em+2px)",
2870       "calc(2em- 2px)",
2871       "calc(2em -2px)",
2872       "calc(2em-2px)",
2873       "-moz-min()",
2874       "calc(min())",
2875       "-moz-max()",
2876       "calc(max())",
2877       "-moz-min(5px)",
2878       "-moz-max(5px)",
2879       "-moz-min(5px,2em)",
2880       "-moz-max(5px,2em)",
2881       "calc(5 + 5)",
2882       "calc(5 * 5)",
2883       "calc(5em * 5em)",
2884       "calc(5em / 5em * 5em)",
2886       "calc(4 * 3 / 2em)",
2887       "calc((4 * 3) / 2em)",
2888       "calc(4 * (3 / 2em))",
2889       "calc(4 / (3 * 2em))",
2891       // Tests for handling of unitless zero, which cannot
2892       // be a length inside calc().
2893       "calc(0)",
2894       "calc(0 + 2em)",
2895       "calc(2em + 0)",
2896       "calc(0 * 2)",
2897       "calc(2 * 0)",
2898       "calc(1 * (2em + 0))",
2899       "calc((2em + 0))",
2900       "calc((2em + 0) * 1)",
2901       "calc(1 * (0 + 2em))",
2902       "calc((0 + 2em))",
2903       "calc((0 + 2em) * 1)",
2904     ],
2905   },
2906   "column-rule-style": {
2907     domProp: "columnRuleStyle",
2908     inherited: false,
2909     type: CSS_TYPE_LONGHAND,
2910     initial_values: ["none"],
2911     other_values: [
2912       "solid",
2913       "hidden",
2914       "ridge",
2915       "groove",
2916       "inset",
2917       "outset",
2918       "double",
2919       "dotted",
2920       "dashed",
2921     ],
2922     invalid_values: ["20", "foo"],
2923   },
2924   "column-rule-color": {
2925     domProp: "columnRuleColor",
2926     inherited: false,
2927     type: CSS_TYPE_LONGHAND,
2928     prerequisites: { color: "green" },
2929     initial_values: ["currentColor"],
2930     other_values: ["red", "blue", "#ffff00"],
2931     invalid_values: ["ffff00"],
2932   },
2933   "column-span": {
2934     domProp: "columnSpan",
2935     inherited: false,
2936     type: CSS_TYPE_LONGHAND,
2937     initial_values: ["none"],
2938     other_values: ["all"],
2939     invalid_values: ["-1", "0", "auto", "2px"],
2940   },
2941   "column-width": {
2942     domProp: "columnWidth",
2943     inherited: false,
2944     type: CSS_TYPE_LONGHAND,
2945     initial_values: ["auto"],
2946     other_values: [
2947       "15px",
2948       "calc(15px)",
2949       "calc(30px - 3em)",
2950       "calc(-15px)",
2951       "0px",
2952       "calc(0px)",
2953     ],
2954     invalid_values: ["20", "-1px", "50%"],
2955   },
2956   "container-type": {
2957     domProp: "containerType",
2958     inherited: false,
2959     type: CSS_TYPE_LONGHAND,
2960     initial_values: ["normal"],
2961     other_values: ["inline-size", "size"],
2962     invalid_values: [
2963       "none style",
2964       "none inline-size",
2965       "inline-size none",
2966       "style none",
2967       "style style",
2968       "inline-size style inline-size",
2969       "inline-size block-size",
2970       "block-size",
2971       "block-size style",
2972       "size inline-size",
2973       "size block-size",
2974     ],
2975   },
2976   "container-name": {
2977     domProp: "containerName",
2978     inherited: false,
2979     type: CSS_TYPE_LONGHAND,
2980     initial_values: ["none"],
2981     other_values: ["foo bar", "foo", "baz bazz", "foo foo"],
2982     invalid_values: ["foo unset", "none bar", "foo initial", "initial foo"],
2983   },
2984   container: {
2985     domProp: "container",
2986     inherited: false,
2987     type: CSS_TYPE_TRUE_SHORTHAND,
2988     subproperties: ["container-type", "container-name"],
2989     initial_values: ["none"],
2990     other_values: ["foo / size", "foo bar / size", "foo / inline-size", "foo"],
2991     invalid_values: ["size / foo", "size / foo bar"],
2992   },
2993   d: {
2994     domProp: "d",
2995     inherited: false,
2996     type: CSS_TYPE_LONGHAND,
2997     initial_values: ["none"],
2998     other_values: ["path('')", "path(' ')"].concat(pathValues.other_values),
2999     invalid_values: pathValues.invalid_values,
3000   },
3001   "-moz-float-edge": {
3002     domProp: "MozFloatEdge",
3003     inherited: false,
3004     type: CSS_TYPE_LONGHAND,
3005     initial_values: ["content-box"],
3006     other_values: ["margin-box"],
3007     invalid_values: ["content", "padding", "border", "margin"],
3008   },
3009   "-moz-force-broken-image-icon": {
3010     domProp: "MozForceBrokenImageIcon",
3011     inherited: false,
3012     type: CSS_TYPE_LONGHAND,
3013     initial_values: ["0"],
3014     other_values: ["1"],
3015     invalid_values: [],
3016   },
3017   "margin-inline": {
3018     domProp: "marginInline",
3019     inherited: false,
3020     type: CSS_TYPE_TRUE_SHORTHAND,
3021     subproperties: ["margin-inline-start", "margin-inline-end"],
3022     initial_values: ["0", "0px 0em"],
3023     other_values: [
3024       "1px",
3025       "3em 1%",
3026       "5%",
3027       "calc(2px) 1%",
3028       "calc(-2px) 1%",
3029       "calc(50%) 1%",
3030       "calc(3*25px) calc(2px)",
3031       "calc(25px*3) 1em",
3032       "calc(3*25px + 50%) calc(3*25px - 50%)",
3033     ],
3034     invalid_values: [
3035       "5",
3036       "..25px",
3037       ".+5px",
3038       ".px",
3039       "-.px",
3040       "++5px",
3041       "-+4px",
3042       "+-3px",
3043       "--7px",
3044       "+-.6px",
3045       "-+.5px",
3046       "++.7px",
3047       "--.4px",
3048     ],
3049   },
3050   "margin-inline-end": {
3051     domProp: "marginInlineEnd",
3052     inherited: false,
3053     type: CSS_TYPE_LONGHAND,
3054     applies_to_first_letter: true,
3055     logical: true,
3056     /* no subproperties */
3057     /* auto may or may not be initial */
3058     initial_values: [
3059       "0",
3060       "0px",
3061       "0%",
3062       "0em",
3063       "0ex",
3064       "calc(0pt)",
3065       "calc(0% + 0px)",
3066     ],
3067     other_values: [
3068       "1px",
3069       "3em",
3070       "5%",
3071       "calc(2px)",
3072       "calc(-2px)",
3073       "calc(50%)",
3074       "calc(3*25px)",
3075       "calc(25px*3)",
3076       "calc(3*25px + 50%)",
3077     ],
3078     invalid_values: [
3079       "5",
3080       "..25px",
3081       ".+5px",
3082       ".px",
3083       "-.px",
3084       "++5px",
3085       "-+4px",
3086       "+-3px",
3087       "--7px",
3088       "+-.6px",
3089       "-+.5px",
3090       "++.7px",
3091       "--.4px",
3092     ],
3093   },
3094   "margin-inline-start": {
3095     domProp: "marginInlineStart",
3096     inherited: false,
3097     type: CSS_TYPE_LONGHAND,
3098     applies_to_first_letter: true,
3099     logical: true,
3100     /* no subproperties */
3101     /* auto may or may not be initial */
3102     initial_values: [
3103       "0",
3104       "0px",
3105       "0%",
3106       "0em",
3107       "0ex",
3108       "calc(0pt)",
3109       "calc(0% + 0px)",
3110     ],
3111     other_values: [
3112       "1px",
3113       "3em",
3114       "5%",
3115       "calc(2px)",
3116       "calc(-2px)",
3117       "calc(50%)",
3118       "calc(3*25px)",
3119       "calc(25px*3)",
3120       "calc(3*25px + 50%)",
3121     ],
3122     invalid_values: [
3123       "5",
3124       "..25px",
3125       ".+5px",
3126       ".px",
3127       "-.px",
3128       "++5px",
3129       "-+4px",
3130       "+-3px",
3131       "--7px",
3132       "+-.6px",
3133       "-+.5px",
3134       "++.7px",
3135       "--.4px",
3136     ],
3137   },
3138   mask: {
3139     domProp: "mask",
3140     inherited: false,
3141     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3142     /* FIXME: All mask-border-* should be added when we implement them. */
3143     subproperties: [
3144       "mask-clip",
3145       "mask-image",
3146       "mask-mode",
3147       "mask-origin",
3148       "mask-position-x",
3149       "mask-position-y",
3150       "mask-repeat",
3151       "mask-size",
3152       "mask-composite",
3153     ],
3154     initial_values: [
3155       "match-source",
3156       "none",
3157       "repeat",
3158       "add",
3159       "0% 0%",
3160       "top left",
3161       "0% 0% / auto",
3162       "top left / auto",
3163       "left top / auto",
3164       "0% 0% / auto auto",
3165       "top left none",
3166       "left top none",
3167       "none left top",
3168       "none top left",
3169       "none 0% 0%",
3170       "top left / auto none",
3171       "left top / auto none",
3172       "top left / auto auto none",
3173       "match-source none repeat add top left",
3174       "top left repeat none add",
3175       "none repeat add top left / auto",
3176       "top left / auto repeat none add match-source",
3177       "none repeat add 0% 0% / auto auto match-source",
3178       "border-box",
3179       "border-box border-box",
3180     ],
3181     other_values: [
3182       "none alpha repeat add left top",
3183       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3184       "no-repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') alpha left top add",
3185       "repeat-x",
3186       "repeat-y",
3187       "no-repeat",
3188       "none repeat-y alpha add 0% 0%",
3189       "subtract",
3190       "0% top subtract alpha repeat none",
3191       "top",
3192       "left",
3193       "50% 50%",
3194       "center",
3195       "top / 100px",
3196       "left / contain",
3197       "left / cover",
3198       "10px / 10%",
3199       "10em / calc(20px)",
3200       "top left / 100px 100px",
3201       "top left / 100px auto",
3202       "top left / 100px 10%",
3203       "top left / 100px calc(20px)",
3204       "bottom right add none alpha repeat",
3205       "50% alpha",
3206       "alpha 50%",
3207       "50%",
3208       "url(#mymask)",
3209       "radial-gradient(at 10% bottom, #ffffff, black) add no-repeat",
3210       "repeating-radial-gradient(at 10% bottom, #ffffff, black) no-repeat",
3211       "-moz-element(#test) alpha",
3212       /* multiple mask-image */
3213       "url(404.png), url(404.png)",
3214       "repeat-x, subtract, none",
3215       "0% top url(404.png), url(404.png) 50% top",
3216       "subtract repeat-y top left url(404.png), repeat-x alpha",
3217       "top left / contain, bottom right / cover",
3218       /* test cases with clip+origin in the shorthand */
3219       "url(404.png) alpha padding-box",
3220       "url(404.png) border-box alpha",
3221       "content-box url(404.png)",
3222       "url(404.png) alpha padding-box padding-box",
3223       "url(404.png) alpha padding-box border-box",
3224       "content-box border-box url(404.png)",
3225       "alpha padding-box url(404.png) border-box",
3226       "alpha padding-box url(404.png) padding-box",
3227     ],
3228     invalid_values: [
3229       /* mixes with keywords have to be in correct order */
3230       "50% left",
3231       "top 50%",
3232       /* no quirks mode colors */
3233       "radial-gradient(at 10% bottom, ffffff, black) add no-repeat",
3234       /* no quirks mode lengths */
3235       "linear-gradient(red -99, yellow, green, blue 120%)",
3236       /* bug 258080: don't accept background-position separated */
3237       "left url(404.png) top",
3238       "top url(404.png) left",
3239       "-moz-element(#a rubbish)",
3240       "left top / match-source",
3241     ],
3242   },
3243   "mask-clip": {
3244     domProp: "maskClip",
3245     inherited: false,
3246     type: CSS_TYPE_LONGHAND,
3247     initial_values: ["border-box"],
3248     other_values: [
3249       "content-box",
3250       "fill-box",
3251       "stroke-box",
3252       "view-box",
3253       "no-clip",
3254       "padding-box",
3255       "border-box, padding-box",
3256       "padding-box, padding-box, padding-box",
3257       "border-box, border-box",
3258     ],
3259     invalid_values: ["content-box content-box", "margin-box"],
3260   },
3261   "mask-composite": {
3262     domProp: "maskComposite",
3263     inherited: false,
3264     type: CSS_TYPE_LONGHAND,
3265     initial_values: ["add"],
3266     other_values: [
3267       "subtract",
3268       "intersect",
3269       "exclude",
3270       "add, add",
3271       "subtract, intersect",
3272       "subtract, subtract, add",
3273     ],
3274     invalid_values: ["add subtract", "intersect exclude"],
3275   },
3276   "mask-image": {
3277     domProp: "maskImage",
3278     inherited: false,
3279     type: CSS_TYPE_LONGHAND,
3280     initial_values: ["none"],
3281     other_values: [
3282       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3283       "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
3284       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
3285       "none, none",
3286       "none, none, none, none, none",
3287       "url(#mymask)",
3288       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
3289       "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
3290       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3291     ].concat(validNonUrlImageValues),
3292     invalid_values: [].concat(invalidNonUrlImageValues),
3293     unbalanced_values: [].concat(unbalancedGradientAndElementValues),
3294   },
3295   "mask-mode": {
3296     domProp: "maskMode",
3297     inherited: false,
3298     type: CSS_TYPE_LONGHAND,
3299     initial_values: ["match-source"],
3300     other_values: [
3301       "alpha",
3302       "luminance",
3303       "match-source, match-source",
3304       "match-source, alpha",
3305       "alpha, luminance, match-source",
3306     ],
3307     invalid_values: ["match-source match-source", "alpha match-source"],
3308   },
3309   "mask-origin": {
3310     domProp: "maskOrigin",
3311     inherited: false,
3312     type: CSS_TYPE_LONGHAND,
3313     initial_values: ["border-box"],
3314     other_values: [
3315       "padding-box",
3316       "content-box",
3317       "fill-box",
3318       "stroke-box",
3319       "view-box",
3320       "border-box, padding-box",
3321       "padding-box, padding-box, padding-box",
3322       "border-box, border-box",
3323     ],
3324     invalid_values: ["padding-box padding-box", "no-clip", "margin-box"],
3325   },
3326   "mask-position": {
3327     domProp: "maskPosition",
3328     inherited: false,
3329     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3330     initial_values: [
3331       "top 0% left 0%",
3332       "top left",
3333       "left top",
3334       "0% 0%",
3335       "0% top",
3336       "left 0%",
3337     ],
3338     other_values: [
3339       "top",
3340       "left",
3341       "right",
3342       "bottom",
3343       "center",
3344       "center bottom",
3345       "bottom center",
3346       "center right",
3347       "right center",
3348       "center top",
3349       "top center",
3350       "center left",
3351       "left center",
3352       "right bottom",
3353       "bottom right",
3354       "50%",
3355       "top left, top left",
3356       "top left, top right",
3357       "top right, top left",
3358       "left top, 0% 0%",
3359       "10% 20%, 30%, 40%",
3360       "top left, bottom right",
3361       "right bottom, left top",
3362       "0%",
3363       "0px",
3364       "30px",
3365       "0%, 10%, 20%, 30%",
3366       "top, top, top, top, top",
3367       "calc(20px)",
3368       "calc(20px) 10px",
3369       "10px calc(20px)",
3370       "calc(20px) 25%",
3371       "25% calc(20px)",
3372       "calc(20px) calc(20px)",
3373       "calc(20px + 1em) calc(20px / 2)",
3374       "calc(20px + 50%) calc(50% - 10px)",
3375       "calc(-20px) calc(-50%)",
3376       "calc(-20%) calc(-50%)",
3377       "0px 0px",
3378       "right 20px top 60px",
3379       "right 20px bottom 60px",
3380       "left 20px top 60px",
3381       "left 20px bottom 60px",
3382       "right -50px top -50px",
3383       "left -50px bottom -50px",
3384       "right 20px top -50px",
3385       "right -20px top 50px",
3386       "right 3em bottom 10px",
3387       "bottom 3em right 10px",
3388       "top 3em right 10px",
3389       "left 15px",
3390       "10px top",
3391       "left 20%",
3392       "right 20%",
3393     ],
3394     subproperties: ["mask-position-x", "mask-position-y"],
3395     invalid_values: [
3396       "center 10px center 4px",
3397       "center 10px center",
3398       "top 20%",
3399       "bottom 20%",
3400       "50% left",
3401       "top 50%",
3402       "50% bottom 10%",
3403       "right 10% 50%",
3404       "left right",
3405       "top bottom",
3406       "left 10% right",
3407       "top 20px bottom 20px",
3408       "left left",
3409       "0px calc(0px + rubbish)",
3410       "left top 15px",
3411       "left 10px top",
3412     ],
3413   },
3414   "mask-position-x": {
3415     domProp: "maskPositionX",
3416     inherited: false,
3417     type: CSS_TYPE_LONGHAND,
3418     initial_values: ["left", "0%"],
3419     other_values: [
3420       "right",
3421       "center",
3422       "50%",
3423       "center, center",
3424       "center, right",
3425       "right, center",
3426       "center, 50%",
3427       "10%, 20%, 40%",
3428       "1px",
3429       "30px",
3430       "50%, 10%, 20%, 30%",
3431       "center, center, center, center, center",
3432       "calc(20px)",
3433       "calc(20px + 1em)",
3434       "calc(20px / 2)",
3435       "calc(20px + 50%)",
3436       "calc(50% - 10px)",
3437       "calc(-20px)",
3438       "calc(-50%)",
3439       "calc(-20%)",
3440       "right 20px",
3441       "left 20px",
3442       "right -50px",
3443       "left -50px",
3444       "right 20px",
3445       "right 3em",
3446     ],
3447     invalid_values: [
3448       "center 10px",
3449       "right 10% 50%",
3450       "left right",
3451       "left left",
3452       "bottom 20px",
3453       "top 10%",
3454       "bottom 3em",
3455       "top",
3456       "bottom",
3457       "top, top",
3458       "top, bottom",
3459       "bottom, top",
3460       "top, 0%",
3461       "top, top, top, top, top",
3462       "calc(0px + rubbish)",
3463       "center 0%",
3464     ],
3465   },
3466   "mask-position-y": {
3467     domProp: "maskPositionY",
3468     inherited: false,
3469     type: CSS_TYPE_LONGHAND,
3470     initial_values: ["top", "0%"],
3471     other_values: [
3472       "bottom",
3473       "center",
3474       "50%",
3475       "center, center",
3476       "center, bottom",
3477       "bottom, center",
3478       "center, 0%",
3479       "10%, 20%, 40%",
3480       "1px",
3481       "30px",
3482       "50%, 10%, 20%, 30%",
3483       "center, center, center, center, center",
3484       "calc(20px)",
3485       "calc(20px + 1em)",
3486       "calc(20px / 2)",
3487       "calc(20px + 50%)",
3488       "calc(50% - 10px)",
3489       "calc(-20px)",
3490       "calc(-50%)",
3491       "calc(-20%)",
3492       "bottom 20px",
3493       "top 20px",
3494       "bottom -50px",
3495       "top -50px",
3496       "bottom 20px",
3497       "bottom 3em",
3498     ],
3499     invalid_values: [
3500       "center 10px",
3501       "bottom 10% 50%",
3502       "top bottom",
3503       "top top",
3504       "right 20px",
3505       "left 10%",
3506       "right 3em",
3507       "left",
3508       "right",
3509       "left, left",
3510       "left, right",
3511       "right, left",
3512       "left, 0%",
3513       "left, left, left, left, left",
3514       "calc(0px + rubbish)",
3515       "center 0%",
3516     ],
3517   },
3518   "mask-repeat": {
3519     domProp: "maskRepeat",
3520     inherited: false,
3521     type: CSS_TYPE_LONGHAND,
3522     initial_values: ["repeat", "repeat repeat"],
3523     other_values: [
3524       "repeat-x",
3525       "repeat-y",
3526       "no-repeat",
3527       "repeat-x, repeat-x",
3528       "repeat, no-repeat",
3529       "repeat-y, no-repeat, repeat-y",
3530       "repeat, repeat, repeat",
3531       "repeat no-repeat",
3532       "no-repeat repeat",
3533       "no-repeat no-repeat",
3534       "repeat no-repeat",
3535       "no-repeat no-repeat, no-repeat no-repeat",
3536     ],
3537     invalid_values: [
3538       "repeat repeat repeat",
3539       "repeat-x repeat-y",
3540       "repeat repeat-x",
3541       "repeat repeat-y",
3542       "repeat-x repeat",
3543       "repeat-y repeat",
3544     ],
3545   },
3546   "mask-size": {
3547     domProp: "maskSize",
3548     inherited: false,
3549     type: CSS_TYPE_LONGHAND,
3550     initial_values: ["auto", "auto auto"],
3551     other_values: [
3552       "contain",
3553       "cover",
3554       "100px auto",
3555       "auto 100px",
3556       "100% auto",
3557       "auto 100%",
3558       "25% 50px",
3559       "3em 40%",
3560       "calc(20px)",
3561       "calc(20px) 10px",
3562       "10px calc(20px)",
3563       "calc(20px) 25%",
3564       "25% calc(20px)",
3565       "calc(20px) calc(20px)",
3566       "calc(20px + 1em) calc(20px / 2)",
3567       "calc(20px + 50%) calc(50% - 10px)",
3568       "calc(-20px) calc(-50%)",
3569       "calc(-20%) calc(-50%)",
3570     ],
3571     invalid_values: [
3572       "contain contain",
3573       "cover cover",
3574       "cover auto",
3575       "auto cover",
3576       "contain cover",
3577       "cover contain",
3578       "-5px 3px",
3579       "3px -5px",
3580       "auto -5px",
3581       "-5px auto",
3582       "5 3",
3583       "10px calc(10px + rubbish)",
3584     ],
3585   },
3586   "mask-type": {
3587     domProp: "maskType",
3588     inherited: false,
3589     type: CSS_TYPE_LONGHAND,
3590     initial_values: ["luminance"],
3591     other_values: ["alpha"],
3592     invalid_values: [],
3593   },
3594   "padding-inline-end": {
3595     domProp: "paddingInlineEnd",
3596     inherited: false,
3597     type: CSS_TYPE_LONGHAND,
3598     applies_to_first_letter: true,
3599     // No applies_to_placeholder because we have a !important rule in forms.css.
3600     logical: true,
3601     /* no subproperties */
3602     initial_values: [
3603       "0",
3604       "0px",
3605       "0%",
3606       "0em",
3607       "0ex",
3608       "calc(0pt)",
3609       "calc(0% + 0px)",
3610       "calc(-3px)",
3611       "calc(-1%)",
3612     ],
3613     other_values: [
3614       "1px",
3615       "3em",
3616       "5%",
3617       "calc(2px)",
3618       "calc(50%)",
3619       "calc(3*25px)",
3620       "calc(25px*3)",
3621       "calc(3*25px + 50%)",
3622     ],
3623     invalid_values: ["5"],
3624   },
3625   "padding-inline-start": {
3626     domProp: "paddingInlineStart",
3627     inherited: false,
3628     type: CSS_TYPE_LONGHAND,
3629     applies_to_first_letter: true,
3630     // No applies_to_placeholder because we have a !important rule in forms.css.
3631     logical: true,
3632     /* no subproperties */
3633     initial_values: [
3634       "0",
3635       "0px",
3636       "0%",
3637       "0em",
3638       "0ex",
3639       "calc(0pt)",
3640       "calc(0% + 0px)",
3641       "calc(-3px)",
3642       "calc(-1%)",
3643     ],
3644     other_values: [
3645       "1px",
3646       "3em",
3647       "5%",
3648       "calc(2px)",
3649       "calc(50%)",
3650       "calc(3*25px)",
3651       "calc(25px*3)",
3652       "calc(3*25px + 50%)",
3653     ],
3654     invalid_values: ["5"],
3655   },
3656   resize: {
3657     domProp: "resize",
3658     inherited: false,
3659     type: CSS_TYPE_LONGHAND,
3660     // No applies_to_placeholder because we have a !important rule in forms.css.
3661     prerequisites: { display: "block", overflow: "auto" },
3662     initial_values: ["none"],
3663     other_values: ["both", "horizontal", "vertical", "inline", "block"],
3664     invalid_values: [],
3665   },
3666   "tab-size": {
3667     domProp: "tabSize",
3668     inherited: true,
3669     type: CSS_TYPE_LONGHAND,
3670     initial_values: ["8"],
3671     other_values: [
3672       "0",
3673       "2.5",
3674       "3",
3675       "99",
3676       "12000",
3677       "0px",
3678       "1em",
3679       "calc(1px + 1em)",
3680       "calc(1px - 2px)",
3681       "calc(1 + 1)",
3682       "calc(-2.5)",
3683     ],
3684     invalid_values: [
3685       "9%",
3686       "calc(9% + 1px)",
3687       "calc(1 + 1em)",
3688       "-1",
3689       "-808",
3690       "auto",
3691     ],
3692   },
3693   "-moz-text-size-adjust": {
3694     domProp: "MozTextSizeAdjust",
3695     inherited: true,
3696     type: CSS_TYPE_LONGHAND,
3697     initial_values: ["auto"],
3698     other_values: ["none"],
3699     invalid_values: ["-5%", "0", "100", "0%", "50%", "100%", "220.3%"],
3700   },
3701   transform: {
3702     domProp: "transform",
3703     inherited: false,
3704     type: CSS_TYPE_LONGHAND,
3705     prerequisites: { width: "300px", height: "50px" },
3706     initial_values: ["none"],
3707     other_values: [
3708       "translatex(1px)",
3709       "translatex(4em)",
3710       "translatex(-4px)",
3711       "translatex(3px)",
3712       "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
3713       "translatey(4em)",
3714       "translate(3px)",
3715       "translate(10px, -3px)",
3716       "rotate(45deg)",
3717       "rotate(45grad)",
3718       "rotate(45rad)",
3719       "rotate(0.25turn)",
3720       "rotate(0)",
3721       "scalex(10)",
3722       "scalex(10%)",
3723       "scalex(-10)",
3724       "scalex(-10%)",
3725       "scaley(10)",
3726       "scaley(10%)",
3727       "scaley(-10)",
3728       "scaley(-10%)",
3729       "scale(10)",
3730       "scale(10%)",
3731       "scale(10, 20)",
3732       "scale(10%, 20%)",
3733       "scale(-10)",
3734       "scale(-10%)",
3735       "scale(-10, 20)",
3736       "scale(10%, -20%)",
3737       "scale(10, 20%)",
3738       "scale(-10, 20%)",
3739       "skewx(30deg)",
3740       "skewx(0)",
3741       "skewy(0)",
3742       "skewx(30grad)",
3743       "skewx(30rad)",
3744       "skewx(0.08turn)",
3745       "skewy(30deg)",
3746       "skewy(30grad)",
3747       "skewy(30rad)",
3748       "skewy(0.08turn)",
3749       "rotate(45deg) scale(2, 1)",
3750       "skewx(45deg) skewx(-50grad)",
3751       "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
3752       "translatex(50%)",
3753       "translatey(50%)",
3754       "translate(50%)",
3755       "translate(3%, 5px)",
3756       "translate(5px, 3%)",
3757       "matrix(1, 2, 3, 4, 5, 6)",
3758       /* valid calc() values */
3759       "translatex(calc(5px + 10%))",
3760       "translatey(calc(0.25 * 5px + 10% / 3))",
3761       "translate(calc(5px - 10% * 3))",
3762       "translate(calc(5px - 3 * 10%), 50px)",
3763       "translate(-50px, calc(5px - 10% * 3))",
3764       "translate(10px, calc(min(5px,10%)))",
3765       "translate(calc(max(5px,10%)), 10%)",
3766       "translate(max(5px,10%), 10%)",
3767       "translatez(1px)",
3768       "translatez(4em)",
3769       "translatez(-4px)",
3770       "translatez(0px)",
3771       "translatez(2px) translatez(5px)",
3772       "translate3d(3px, 4px, 5px)",
3773       "translate3d(2em, 3px, 1em)",
3774       "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
3775       "scale3d(4, 4, 4)",
3776       "scale3d(4%, 4%, 4%)",
3777       "scale3d(-2, 3, -7)",
3778       "scale3d(-2%, 3%, -7%)",
3779       "scalez(4)",
3780       "scalez(4%)",
3781       "scalez(-6)",
3782       "scalez(-6%)",
3783       "rotate3d(2, 3, 4, 45deg)",
3784       "rotate3d(-3, 7, 0, 12rad)",
3785       "rotatex(15deg)",
3786       "rotatey(-12grad)",
3787       "rotatez(72rad)",
3788       "rotatex(0.125turn)",
3789       "rotate3d(0, 0, 0, 0rad)",
3790       "perspective(0px)",
3791       "perspective(1000px)",
3792       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
3793     ],
3794     invalid_values: [
3795       "1px",
3796       "#0000ff",
3797       "red",
3798       "auto",
3799       "translatex(1)",
3800       "translatey(1)",
3801       "translate(2)",
3802       "translate(-3, -4)",
3803       "translatex(1px 1px)",
3804       "translatex(translatex(1px))",
3805       "translatex(#0000ff)",
3806       "translatex(red)",
3807       "translatey()",
3808       "matrix(1px, 2px, 3px, 4px, 5px, 6px)",
3809       "skewx(red)",
3810       "matrix(1%, 0, 0, 0, 0px, 0px)",
3811       "matrix(0, 1%, 2, 3, 4px,5px)",
3812       "matrix(0, 1, 2%, 3, 4px, 5px)",
3813       "matrix(0, 1, 2, 3%, 4%, 5%)",
3814       "matrix(1, 2, 3, 4, 5px, 6%)",
3815       "matrix(1, 2, 3, 4, 5%, 6px)",
3816       "matrix(1, 2, 3, 4, 5%, 6%)",
3817       "matrix(1, 2, 3, 4, 5px, 6em)",
3818       /* invalid calc() values */
3819       "translatey(-moz-min(5px,10%))",
3820       "translatex(-moz-max(5px,10%))",
3821       "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
3822       "perspective(-10px)",
3823       "matrix3d(dinosaur)",
3824       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
3825       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
3826       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
3827       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
3828       "rotatey(words)",
3829       "rotatex(7)",
3830       "translate3d(3px, 4px, 1px, 7px)",
3831       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
3832       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)",
3833     ],
3834   },
3835   "transform-box": {
3836     domProp: "transformBox",
3837     inherited: false,
3838     type: CSS_TYPE_LONGHAND,
3839     initial_values: ["view-box"],
3840     other_values: ["fill-box", "border-box"],
3841     invalid_values: ["padding-box", "margin-box"],
3842   },
3843   "transform-origin": {
3844     domProp: "transformOrigin",
3845     inherited: false,
3846     type: CSS_TYPE_LONGHAND,
3847     /* no subproperties */
3848     prerequisites: { width: "10px", height: "10px", display: "block" },
3849     initial_values: ["50% 50%", "center", "center center"],
3850     other_values: [
3851       "25% 25%",
3852       "6px 5px",
3853       "20% 3em",
3854       "0 0",
3855       "0in 1in",
3856       "top",
3857       "bottom",
3858       "top left",
3859       "top right",
3860       "top center",
3861       "center left",
3862       "center right",
3863       "bottom left",
3864       "bottom right",
3865       "bottom center",
3866       "20% center",
3867       "6px center",
3868       "13in bottom",
3869       "left 50px",
3870       "right 13%",
3871       "center 40px",
3872       "calc(20px)",
3873       "calc(20px) 10px",
3874       "10px calc(20px)",
3875       "calc(20px) 25%",
3876       "25% calc(20px)",
3877       "calc(20px) calc(20px)",
3878       "calc(20px + 1em) calc(20px / 2)",
3879       "calc(20px + 50%) calc(50% - 10px)",
3880       "calc(-20px) calc(-50%)",
3881       "calc(-20%) calc(-50%)",
3882       "6px 5px 5px",
3883       "top center 10px",
3884     ],
3885     invalid_values: [
3886       "red",
3887       "auto",
3888       "none",
3889       "0.5 0.5",
3890       "40px #0000ff",
3891       "border",
3892       "center red",
3893       "right diagonal",
3894       "#00ffff bottom",
3895       "0px calc(0px + rubbish)",
3896       "0px 0px calc(0px + rubbish)",
3897     ],
3898   },
3899   "perspective-origin": {
3900     domProp: "perspectiveOrigin",
3901     inherited: false,
3902     type: CSS_TYPE_LONGHAND,
3903     /* no subproperties */
3904     prerequisites: { width: "10px", height: "10px", display: "block" },
3905     initial_values: ["50% 50%", "center", "center center"],
3906     other_values: [
3907       "25% 25%",
3908       "6px 5px",
3909       "20% 3em",
3910       "0 0",
3911       "0in 1in",
3912       "top",
3913       "bottom",
3914       "top left",
3915       "top right",
3916       "top center",
3917       "center left",
3918       "center right",
3919       "bottom left",
3920       "bottom right",
3921       "bottom center",
3922       "20% center",
3923       "6px center",
3924       "13in bottom",
3925       "left 50px",
3926       "right 13%",
3927       "center 40px",
3928       "calc(20px)",
3929       "calc(20px) 10px",
3930       "10px calc(20px)",
3931       "calc(20px) 25%",
3932       "25% calc(20px)",
3933       "calc(20px) calc(20px)",
3934       "calc(20px + 1em) calc(20px / 2)",
3935       "calc(20px + 50%) calc(50% - 10px)",
3936       "calc(-20px) calc(-50%)",
3937       "calc(-20%) calc(-50%)",
3938     ],
3939     invalid_values: [
3940       "red",
3941       "auto",
3942       "none",
3943       "0.5 0.5",
3944       "40px #0000ff",
3945       "border",
3946       "center red",
3947       "right diagonal",
3948       "#00ffff bottom",
3949     ],
3950   },
3951   perspective: {
3952     domProp: "perspective",
3953     inherited: false,
3954     type: CSS_TYPE_LONGHAND,
3955     initial_values: ["none"],
3956     other_values: ["1000px", "500.2px", "0", "0px"],
3957     invalid_values: ["pants", "200", "-100px", "-27.2em"],
3958   },
3959   "backface-visibility": {
3960     domProp: "backfaceVisibility",
3961     inherited: false,
3962     type: CSS_TYPE_LONGHAND,
3963     initial_values: ["visible"],
3964     other_values: ["hidden"],
3965     invalid_values: ["collapse"],
3966   },
3967   "transform-style": {
3968     domProp: "transformStyle",
3969     inherited: false,
3970     type: CSS_TYPE_LONGHAND,
3971     initial_values: ["flat"],
3972     other_values: ["preserve-3d"],
3973     invalid_values: [],
3974   },
3975   "-moz-user-input": {
3976     domProp: "MozUserInput",
3977     inherited: true,
3978     type: CSS_TYPE_LONGHAND,
3979     initial_values: ["auto"],
3980     other_values: ["none"],
3981     invalid_values: [],
3982   },
3983   "-moz-user-select": {
3984     domProp: "MozUserSelect",
3985     inherited: false,
3986     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3987     alias_for: "user-select",
3988     subproperties: ["user-select"],
3989   },
3990   "user-select": {
3991     domProp: "userSelect",
3992     inherited: false,
3993     type: CSS_TYPE_LONGHAND,
3994     initial_values: ["auto"],
3995     other_values: ["none", "text", "all", "-moz-none"],
3996     invalid_values: [],
3997   },
3998   background: {
3999     domProp: "background",
4000     inherited: false,
4001     type: CSS_TYPE_TRUE_SHORTHAND,
4002     subproperties: [
4003       "background-attachment",
4004       "background-color",
4005       "background-image",
4006       "background-position-x",
4007       "background-position-y",
4008       "background-repeat",
4009       "background-clip",
4010       "background-origin",
4011       "background-size",
4012     ],
4013     initial_values: [
4014       "transparent",
4015       "none",
4016       "repeat",
4017       "scroll",
4018       "0% 0%",
4019       "top left",
4020       "left top",
4021       "0% 0% / auto",
4022       "top left / auto",
4023       "left top / auto",
4024       "0% 0% / auto auto",
4025       "transparent none",
4026       "top left none",
4027       "left top none",
4028       "none left top",
4029       "none top left",
4030       "none 0% 0%",
4031       "left top / auto none",
4032       "left top / auto auto none",
4033       "transparent none repeat scroll top left",
4034       "left top repeat none scroll transparent",
4035       "transparent none repeat scroll top left / auto",
4036       "left top / auto repeat none scroll transparent",
4037       "none repeat scroll 0% 0% / auto auto transparent",
4038       "padding-box border-box",
4039     ],
4040     other_values: [
4041       /* without multiple backgrounds */
4042       "green",
4043       "none green repeat scroll left top",
4044       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4045       "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll",
4046       "repeat-x",
4047       "repeat-y",
4048       "no-repeat",
4049       "none repeat-y transparent scroll 0% 0%",
4050       "fixed",
4051       "0% top transparent fixed repeat none",
4052       "top",
4053       "left",
4054       "50% 50%",
4055       "center",
4056       "top / 100px",
4057       "left / contain",
4058       "left / cover",
4059       "10px / 10%",
4060       "10em / calc(20px)",
4061       "top left / 100px 100px",
4062       "top left / 100px auto",
4063       "top left / 100px 10%",
4064       "top left / 100px calc(20px)",
4065       "bottom right 8px scroll none transparent repeat",
4066       "50% transparent",
4067       "transparent 50%",
4068       "50%",
4069       "radial-gradient(at 10% bottom, #ffffff, black) scroll no-repeat",
4070       "repeating-radial-gradient(at 10% bottom, #ffffff, black) scroll no-repeat",
4071       "-moz-element(#test) lime",
4072       /* multiple backgrounds */
4073       "url(404.png), url(404.png)",
4074       "url(404.png), url(404.png) transparent",
4075       "url(404.png), url(404.png) red",
4076       "repeat-x, fixed, none",
4077       "0% top url(404.png), url(404.png) 0% top",
4078       "fixed repeat-y top left url(404.png), repeat-x green",
4079       "top left / contain, bottom right / cover",
4080       /* test cases with clip+origin in the shorthand */
4081       "url(404.png) green padding-box",
4082       "url(404.png) border-box transparent",
4083       "content-box url(404.png) blue",
4084       "url(404.png) green padding-box padding-box",
4085       "url(404.png) green padding-box border-box",
4086       "content-box border-box url(404.png) blue",
4087       "url(404.png) green padding-box text",
4088       "content-box text url(404.png) blue",
4089       /* clip and origin separated in the shorthand */
4090       "url(404.png) padding-box green border-box",
4091       "url(404.png) padding-box green padding-box",
4092       "transparent padding-box url(404.png) border-box",
4093       "transparent padding-box url(404.png) padding-box",
4094       /* text */
4095       "text",
4096       "text border-box",
4097     ],
4098     invalid_values: [
4099       /* mixes with keywords have to be in correct order */
4100       "50% left",
4101       "top 50%",
4102       /* no quirks mode colors */
4103       "radial-gradient(at 10% bottom, ffffff, black) scroll no-repeat",
4104       /* no quirks mode lengths */
4105       "linear-gradient(red -99, yellow, green, blue 120%)",
4106       /* bug 258080: don't accept background-position separated */
4107       "left url(404.png) top",
4108       "top url(404.png) left",
4109       /* not allowed to have color in non-bottom layer */
4110       "url(404.png) transparent, url(404.png)",
4111       "url(404.png) red, url(404.png)",
4112       "url(404.png) transparent, url(404.png) transparent",
4113       "url(404.png) transparent red, url(404.png) transparent red",
4114       "url(404.png) red, url(404.png) red",
4115       "url(404.png) rgba(0, 0, 0, 0), url(404.png)",
4116       "url(404.png) rgb(255, 0, 0), url(404.png)",
4117       "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)",
4118       "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)",
4119       "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)",
4120       /* error inside functions */
4121       "-moz-element(#a rubbish) black",
4122       "content-box text text",
4123       "padding-box text url(404.png) text",
4124     ],
4125   },
4126   "background-attachment": {
4127     domProp: "backgroundAttachment",
4128     inherited: false,
4129     type: CSS_TYPE_LONGHAND,
4130     applies_to_first_letter: true,
4131     applies_to_first_line: true,
4132     applies_to_placeholder: true,
4133     applies_to_cue: true,
4134     initial_values: ["scroll"],
4135     other_values: [
4136       "fixed",
4137       "local",
4138       "scroll,scroll",
4139       "fixed, scroll",
4140       "scroll, fixed, local, scroll",
4141       "fixed, fixed",
4142     ],
4143     invalid_values: [],
4144   },
4145   "background-blend-mode": {
4146     domProp: "backgroundBlendMode",
4147     inherited: false,
4148     type: CSS_TYPE_LONGHAND,
4149     applies_to_first_letter: true,
4150     applies_to_first_line: true,
4151     applies_to_placeholder: true,
4152     applies_to_cue: true,
4153     initial_values: ["normal"],
4154     other_values: [
4155       "multiply",
4156       "screen",
4157       "overlay",
4158       "darken",
4159       "lighten",
4160       "color-dodge",
4161       "color-burn",
4162       "hard-light",
4163       "soft-light",
4164       "difference",
4165       "exclusion",
4166       "hue",
4167       "saturation",
4168       "color",
4169       "luminosity",
4170     ],
4171     invalid_values: ["none", "10px", "multiply multiply", "plus-lighter"],
4172   },
4173   "background-clip": {
4174     /*
4175      * When we rename this to 'background-clip', we also
4176      * need to rename the values to match the spec.
4177      */
4178     domProp: "backgroundClip",
4179     inherited: false,
4180     type: CSS_TYPE_LONGHAND,
4181     applies_to_first_letter: true,
4182     applies_to_first_line: true,
4183     applies_to_placeholder: true,
4184     applies_to_cue: true,
4185     initial_values: ["border-box"],
4186     other_values: [
4187       "content-box",
4188       "padding-box",
4189       "border-box, padding-box",
4190       "padding-box, padding-box, padding-box",
4191       "border-box, border-box",
4192       "text",
4193       "content-box, text",
4194       "text, border-box",
4195       "text, text",
4196     ],
4197     invalid_values: [
4198       "margin-box",
4199       "border-box border-box",
4200       "fill-box",
4201       "stroke-box",
4202       "view-box",
4203       "no-clip",
4204     ],
4205   },
4206   "background-color": {
4207     domProp: "backgroundColor",
4208     inherited: false,
4209     type: CSS_TYPE_LONGHAND,
4210     applies_to_first_letter: true,
4211     applies_to_first_line: true,
4212     applies_to_placeholder: true,
4213     applies_to_cue: true,
4214     initial_values: ["transparent", "rgba(0, 0, 0, 0)"],
4215     other_values: [
4216       "green",
4217       "rgb(255, 0, 128)",
4218       "#fc2",
4219       "#96ed2a",
4220       "black",
4221       "rgba(255,255,0,3)",
4222       "hsl(240, 50%, 50%)",
4223       "rgb(50%, 50%, 50%)",
4224       "-moz-default-background-color",
4225       "rgb(100, 100.0, 100)",
4226       "rgba(255, 127, 15, 0)",
4227       "hsla(240, 97%, 50%, 0.0)",
4228       "rgba(255,255,255,-3.7)",
4229     ],
4230     invalid_values: [
4231       "#0",
4232       "#00",
4233       "#00000",
4234       "#0000000",
4235       "#000000000",
4236       "rgb(100, 100%, 100)",
4237     ],
4238     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4239   },
4240   "background-image": {
4241     domProp: "backgroundImage",
4242     inherited: false,
4243     type: CSS_TYPE_LONGHAND,
4244     applies_to_first_letter: true,
4245     applies_to_first_line: true,
4246     applies_to_placeholder: true,
4247     applies_to_cue: true,
4248     initial_values: ["none"],
4249     other_values: [
4250       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4251       "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
4252       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
4253       "none, none",
4254       "none, none, none, none, none",
4255       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
4256       "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
4257       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4258     ].concat(validNonUrlImageValues),
4259     invalid_values: [].concat(invalidNonUrlImageValues),
4260     unbalanced_values: [].concat(unbalancedGradientAndElementValues),
4261   },
4262   "background-origin": {
4263     domProp: "backgroundOrigin",
4264     inherited: false,
4265     type: CSS_TYPE_LONGHAND,
4266     applies_to_first_letter: true,
4267     applies_to_first_line: true,
4268     applies_to_placeholder: true,
4269     applies_to_cue: true,
4270     initial_values: ["padding-box"],
4271     other_values: [
4272       "border-box",
4273       "content-box",
4274       "border-box, padding-box",
4275       "padding-box, padding-box, padding-box",
4276       "border-box, border-box",
4277     ],
4278     invalid_values: [
4279       "margin-box",
4280       "padding-box padding-box",
4281       "fill-box",
4282       "stroke-box",
4283       "view-box",
4284       "no-clip",
4285     ],
4286   },
4287   "background-position": {
4288     domProp: "backgroundPosition",
4289     inherited: false,
4290     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4291     applies_to_first_letter: true,
4292     applies_to_first_line: true,
4293     applies_to_placeholder: true,
4294     applies_to_cue: true,
4295     initial_values: [
4296       "top 0% left 0%",
4297       "top 0% left",
4298       "top left",
4299       "left top",
4300       "0% 0%",
4301       "0% top",
4302       "left 0%",
4303     ],
4304     other_values: [
4305       "top",
4306       "left",
4307       "right",
4308       "bottom",
4309       "center",
4310       "center bottom",
4311       "bottom center",
4312       "center right",
4313       "right center",
4314       "center top",
4315       "top center",
4316       "center left",
4317       "left center",
4318       "right bottom",
4319       "bottom right",
4320       "50%",
4321       "top left, top left",
4322       "top left, top right",
4323       "top right, top left",
4324       "left top, 0% 0%",
4325       "10% 20%, 30%, 40%",
4326       "top left, bottom right",
4327       "right bottom, left top",
4328       "0%",
4329       "0px",
4330       "30px",
4331       "0%, 10%, 20%, 30%",
4332       "top, top, top, top, top",
4333       "calc(20px)",
4334       "calc(20px) 10px",
4335       "10px calc(20px)",
4336       "calc(20px) 25%",
4337       "25% calc(20px)",
4338       "calc(20px) calc(20px)",
4339       "calc(20px + 1em) calc(20px / 2)",
4340       "calc(20px + 50%) calc(50% - 10px)",
4341       "calc(-20px) calc(-50%)",
4342       "calc(-20%) calc(-50%)",
4343       "0px 0px",
4344       "right 20px top 60px",
4345       "right 20px bottom 60px",
4346       "left 20px top 60px",
4347       "left 20px bottom 60px",
4348       "right -50px top -50px",
4349       "left -50px bottom -50px",
4350       "right 20px top -50px",
4351       "right -20px top 50px",
4352       "right 3em bottom 10px",
4353       "bottom 3em right 10px",
4354       "top 3em right 10px",
4355       "left 15px",
4356       "10px top",
4357       "left top 15px",
4358       "left 10px top",
4359       "left 20%",
4360       "right 20%",
4361     ],
4362     subproperties: ["background-position-x", "background-position-y"],
4363     invalid_values: [
4364       "center 10px center 4px",
4365       "center 10px center",
4366       "top 20%",
4367       "bottom 20%",
4368       "50% left",
4369       "top 50%",
4370       "50% bottom 10%",
4371       "right 10% 50%",
4372       "left right",
4373       "top bottom",
4374       "left 10% right",
4375       "top 20px bottom 20px",
4376       "left left",
4377       "0px calc(0px + rubbish)",
4378     ],
4379     quirks_values: {
4380       "20 20": "20px 20px",
4381       "10 5px": "10px 5px",
4382       "7px 2": "7px 2px",
4383     },
4384   },
4385   "background-position-x": {
4386     domProp: "backgroundPositionX",
4387     inherited: false,
4388     type: CSS_TYPE_LONGHAND,
4389     applies_to_first_letter: true,
4390     applies_to_first_line: true,
4391     applies_to_placeholder: true,
4392     applies_to_cue: true,
4393     initial_values: ["left 0%", "left", "0%"],
4394     other_values: [
4395       "right",
4396       "center",
4397       "50%",
4398       "left, left",
4399       "left, right",
4400       "right, left",
4401       "left, 0%",
4402       "10%, 20%, 40%",
4403       "0px",
4404       "30px",
4405       "0%, 10%, 20%, 30%",
4406       "left, left, left, left, left",
4407       "calc(20px)",
4408       "calc(20px + 1em)",
4409       "calc(20px / 2)",
4410       "calc(20px + 50%)",
4411       "calc(50% - 10px)",
4412       "calc(-20px)",
4413       "calc(-50%)",
4414       "calc(-20%)",
4415       "right 20px",
4416       "left 20px",
4417       "right -50px",
4418       "left -50px",
4419       "right 20px",
4420       "right 3em",
4421     ],
4422     invalid_values: [
4423       "center 10px",
4424       "right 10% 50%",
4425       "left right",
4426       "left left",
4427       "bottom 20px",
4428       "top 10%",
4429       "bottom 3em",
4430       "top",
4431       "bottom",
4432       "top, top",
4433       "top, bottom",
4434       "bottom, top",
4435       "top, 0%",
4436       "top, top, top, top, top",
4437       "calc(0px + rubbish)",
4438     ],
4439   },
4440   "background-position-y": {
4441     domProp: "backgroundPositionY",
4442     inherited: false,
4443     type: CSS_TYPE_LONGHAND,
4444     applies_to_first_letter: true,
4445     applies_to_first_line: true,
4446     applies_to_placeholder: true,
4447     applies_to_cue: true,
4448     initial_values: ["top 0%", "top", "0%"],
4449     other_values: [
4450       "bottom",
4451       "center",
4452       "50%",
4453       "top, top",
4454       "top, bottom",
4455       "bottom, top",
4456       "top, 0%",
4457       "10%, 20%, 40%",
4458       "0px",
4459       "30px",
4460       "0%, 10%, 20%, 30%",
4461       "top, top, top, top, top",
4462       "calc(20px)",
4463       "calc(20px + 1em)",
4464       "calc(20px / 2)",
4465       "calc(20px + 50%)",
4466       "calc(50% - 10px)",
4467       "calc(-20px)",
4468       "calc(-50%)",
4469       "calc(-20%)",
4470       "bottom 20px",
4471       "top 20px",
4472       "bottom -50px",
4473       "top -50px",
4474       "bottom 20px",
4475       "bottom 3em",
4476     ],
4477     invalid_values: [
4478       "center 10px",
4479       "bottom 10% 50%",
4480       "top bottom",
4481       "top top",
4482       "right 20px",
4483       "left 10%",
4484       "right 3em",
4485       "left",
4486       "right",
4487       "left, left",
4488       "left, right",
4489       "right, left",
4490       "left, 0%",
4491       "left, left, left, left, left",
4492       "calc(0px + rubbish)",
4493     ],
4494   },
4495   "background-repeat": {
4496     domProp: "backgroundRepeat",
4497     inherited: false,
4498     type: CSS_TYPE_LONGHAND,
4499     applies_to_first_letter: true,
4500     applies_to_first_line: true,
4501     applies_to_placeholder: true,
4502     applies_to_cue: true,
4503     initial_values: ["repeat", "repeat repeat"],
4504     other_values: [
4505       "repeat-x",
4506       "repeat-y",
4507       "no-repeat",
4508       "repeat-x, repeat-x",
4509       "repeat, no-repeat",
4510       "repeat-y, no-repeat, repeat-y",
4511       "repeat, repeat, repeat",
4512       "repeat no-repeat",
4513       "no-repeat repeat",
4514       "no-repeat no-repeat",
4515       "repeat repeat, repeat repeat",
4516       "round, repeat",
4517       "round repeat, repeat-x",
4518       "round no-repeat, repeat-y",
4519       "round round",
4520       "space, repeat",
4521       "space repeat, repeat-x",
4522       "space no-repeat, repeat-y",
4523       "space space",
4524       "space round",
4525     ],
4526     invalid_values: [
4527       "repeat repeat repeat",
4528       "repeat-x repeat-y",
4529       "repeat repeat-x",
4530       "repeat repeat-y",
4531       "repeat-x repeat",
4532       "repeat-y repeat",
4533       "round round round",
4534       "repeat-x round",
4535       "round repeat-x",
4536       "repeat-y round",
4537       "round repeat-y",
4538       "space space space",
4539       "repeat-x space",
4540       "space repeat-x",
4541       "repeat-y space",
4542       "space repeat-y",
4543     ],
4544   },
4545   "background-size": {
4546     domProp: "backgroundSize",
4547     inherited: false,
4548     type: CSS_TYPE_LONGHAND,
4549     applies_to_first_letter: true,
4550     applies_to_first_line: true,
4551     applies_to_placeholder: true,
4552     applies_to_cue: true,
4553     initial_values: ["auto", "auto auto"],
4554     other_values: [
4555       "contain",
4556       "cover",
4557       "100px auto",
4558       "auto 100px",
4559       "100% auto",
4560       "auto 100%",
4561       "25% 50px",
4562       "3em 40%",
4563       "calc(20px)",
4564       "calc(20px) 10px",
4565       "10px calc(20px)",
4566       "calc(20px) 25%",
4567       "25% calc(20px)",
4568       "calc(20px) calc(20px)",
4569       "calc(20px + 1em) calc(20px / 2)",
4570       "calc(20px + 50%) calc(50% - 10px)",
4571       "calc(-20px) calc(-50%)",
4572       "calc(-20%) calc(-50%)",
4573     ],
4574     invalid_values: [
4575       "contain contain",
4576       "cover cover",
4577       "cover auto",
4578       "auto cover",
4579       "contain cover",
4580       "cover contain",
4581       "-5px 3px",
4582       "3px -5px",
4583       "auto -5px",
4584       "-5px auto",
4585       "5 3",
4586       "10px calc(10px + rubbish)",
4587     ],
4588   },
4589   border: {
4590     domProp: "border",
4591     inherited: false,
4592     type: CSS_TYPE_TRUE_SHORTHAND,
4593     subproperties: [
4594       "border-bottom-color",
4595       "border-bottom-style",
4596       "border-bottom-width",
4597       "border-left-color",
4598       "border-left-style",
4599       "border-left-width",
4600       "border-right-color",
4601       "border-right-style",
4602       "border-right-width",
4603       "border-top-color",
4604       "border-top-style",
4605       "border-top-width",
4606       "border-image-source",
4607       "border-image-slice",
4608       "border-image-width",
4609       "border-image-outset",
4610       "border-image-repeat",
4611     ],
4612     initial_values: [
4613       "none",
4614       "medium",
4615       "currentColor",
4616       "thin",
4617       "none medium currentcolor",
4618       "calc(4px - 1px) none",
4619     ],
4620     other_values: [
4621       "solid",
4622       "medium solid",
4623       "green solid",
4624       "10px solid",
4625       "thick solid",
4626       "calc(2px) solid blue",
4627     ],
4628     invalid_values: ["5%", "medium solid ff00ff", "5 solid green"],
4629   },
4630   "border-bottom": {
4631     domProp: "borderBottom",
4632     inherited: false,
4633     type: CSS_TYPE_TRUE_SHORTHAND,
4634     subproperties: [
4635       "border-bottom-color",
4636       "border-bottom-style",
4637       "border-bottom-width",
4638     ],
4639     initial_values: [
4640       "none",
4641       "medium",
4642       "currentColor",
4643       "thin",
4644       "none medium currentcolor",
4645     ],
4646     other_values: [
4647       "solid",
4648       "green",
4649       "medium solid",
4650       "green solid",
4651       "10px solid",
4652       "thick solid",
4653       "5px green none",
4654     ],
4655     invalid_values: ["5%", "5", "5 solid green"],
4656   },
4657   "border-bottom-color": {
4658     domProp: "borderBottomColor",
4659     inherited: false,
4660     type: CSS_TYPE_LONGHAND,
4661     applies_to_first_letter: true,
4662     prerequisites: { color: "black" },
4663     initial_values: ["currentColor"],
4664     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4665     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4666     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4667   },
4668   "border-bottom-style": {
4669     domProp: "borderBottomStyle",
4670     inherited: false,
4671     type: CSS_TYPE_LONGHAND,
4672     applies_to_first_letter: true,
4673     /* XXX hidden is sometimes the same as initial */
4674     initial_values: ["none"],
4675     other_values: [
4676       "solid",
4677       "dashed",
4678       "dotted",
4679       "double",
4680       "outset",
4681       "inset",
4682       "groove",
4683       "ridge",
4684     ],
4685     invalid_values: [],
4686   },
4687   "border-bottom-width": {
4688     domProp: "borderBottomWidth",
4689     inherited: false,
4690     type: CSS_TYPE_LONGHAND,
4691     applies_to_first_letter: true,
4692     prerequisites: { "border-bottom-style": "solid" },
4693     initial_values: ["medium", "3px", "calc(4px - 1px)"],
4694     other_values: [
4695       "thin",
4696       "thick",
4697       "1px",
4698       "2em",
4699       "calc(2px)",
4700       "calc(-2px)",
4701       "calc(0em)",
4702       "calc(0px)",
4703       "calc(5em)",
4704       "calc(3*25px)",
4705       "calc(25px*3)",
4706       "calc(3*25px + 5em)",
4707     ],
4708     invalid_values: ["5%"],
4709     quirks_values: { 5: "5px" },
4710   },
4711   "border-collapse": {
4712     domProp: "borderCollapse",
4713     inherited: true,
4714     type: CSS_TYPE_LONGHAND,
4715     initial_values: ["separate"],
4716     other_values: ["collapse"],
4717     invalid_values: [],
4718   },
4719   "border-color": {
4720     domProp: "borderColor",
4721     inherited: false,
4722     type: CSS_TYPE_TRUE_SHORTHAND,
4723     subproperties: [
4724       "border-top-color",
4725       "border-right-color",
4726       "border-bottom-color",
4727       "border-left-color",
4728     ],
4729     initial_values: [
4730       "currentColor",
4731       "currentColor currentColor",
4732       "currentColor currentColor currentColor",
4733       "currentColor currentColor currentcolor CURRENTcolor",
4734     ],
4735     other_values: [
4736       "green",
4737       "currentColor green",
4738       "currentColor currentColor green",
4739       "currentColor currentColor currentColor green",
4740       "rgba(255,128,0,0.5)",
4741       "transparent",
4742     ],
4743     invalid_values: [
4744       "#0",
4745       "#00",
4746       "#00000",
4747       "#0000000",
4748       "#000000000",
4749       "red rgb(nonsense)",
4750       "red 1px",
4751     ],
4752     unbalanced_values: ["red rgb("],
4753     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4754   },
4755   "border-left": {
4756     domProp: "borderLeft",
4757     inherited: false,
4758     type: CSS_TYPE_TRUE_SHORTHAND,
4759     subproperties: [
4760       "border-left-color",
4761       "border-left-style",
4762       "border-left-width",
4763     ],
4764     initial_values: [
4765       "none",
4766       "medium",
4767       "currentColor",
4768       "thin",
4769       "none medium currentcolor",
4770     ],
4771     other_values: [
4772       "solid",
4773       "green",
4774       "medium solid",
4775       "green solid",
4776       "10px solid",
4777       "thick solid",
4778       "5px green none",
4779     ],
4780     invalid_values: [
4781       "5%",
4782       "5",
4783       "5 solid green",
4784       "calc(5px + rubbish) green solid",
4785       "5px rgb(0, rubbish, 0) solid",
4786     ],
4787   },
4788   "border-left-color": {
4789     domProp: "borderLeftColor",
4790     inherited: false,
4791     type: CSS_TYPE_LONGHAND,
4792     applies_to_first_letter: true,
4793     prerequisites: { color: "black" },
4794     initial_values: ["currentColor"],
4795     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4796     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4797     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4798   },
4799   "border-left-style": {
4800     domProp: "borderLeftStyle",
4801     inherited: false,
4802     type: CSS_TYPE_LONGHAND,
4803     applies_to_first_letter: true,
4804     /* XXX hidden is sometimes the same as initial */
4805     initial_values: ["none"],
4806     other_values: [
4807       "solid",
4808       "dashed",
4809       "dotted",
4810       "double",
4811       "outset",
4812       "inset",
4813       "groove",
4814       "ridge",
4815     ],
4816     invalid_values: [],
4817   },
4818   "border-left-width": {
4819     domProp: "borderLeftWidth",
4820     inherited: false,
4821     type: CSS_TYPE_LONGHAND,
4822     applies_to_first_letter: true,
4823     prerequisites: { "border-left-style": "solid" },
4824     initial_values: ["medium", "3px", "calc(4px - 1px)"],
4825     other_values: [
4826       "thin",
4827       "thick",
4828       "1px",
4829       "2em",
4830       "calc(2px)",
4831       "calc(-2px)",
4832       "calc(0em)",
4833       "calc(0px)",
4834       "calc(5em)",
4835       "calc(3*25px)",
4836       "calc(25px*3)",
4837       "calc(3*25px + 5em)",
4838     ],
4839     invalid_values: ["5%"],
4840     quirks_values: { 5: "5px" },
4841   },
4842   "border-right": {
4843     domProp: "borderRight",
4844     inherited: false,
4845     type: CSS_TYPE_TRUE_SHORTHAND,
4846     subproperties: [
4847       "border-right-color",
4848       "border-right-style",
4849       "border-right-width",
4850     ],
4851     initial_values: [
4852       "none",
4853       "medium",
4854       "currentColor",
4855       "thin",
4856       "none medium currentcolor",
4857     ],
4858     other_values: [
4859       "solid",
4860       "green",
4861       "medium solid",
4862       "green solid",
4863       "10px solid",
4864       "thick solid",
4865       "5px green none",
4866     ],
4867     invalid_values: ["5%", "5", "5 solid green"],
4868   },
4869   "border-right-color": {
4870     domProp: "borderRightColor",
4871     inherited: false,
4872     type: CSS_TYPE_LONGHAND,
4873     applies_to_first_letter: true,
4874     prerequisites: { color: "black" },
4875     initial_values: ["currentColor"],
4876     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4877     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4878     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4879   },
4880   "border-right-style": {
4881     domProp: "borderRightStyle",
4882     inherited: false,
4883     type: CSS_TYPE_LONGHAND,
4884     applies_to_first_letter: true,
4885     /* XXX hidden is sometimes the same as initial */
4886     initial_values: ["none"],
4887     other_values: [
4888       "solid",
4889       "dashed",
4890       "dotted",
4891       "double",
4892       "outset",
4893       "inset",
4894       "groove",
4895       "ridge",
4896     ],
4897     invalid_values: [],
4898   },
4899   "border-right-width": {
4900     domProp: "borderRightWidth",
4901     inherited: false,
4902     type: CSS_TYPE_LONGHAND,
4903     applies_to_first_letter: true,
4904     prerequisites: { "border-right-style": "solid" },
4905     initial_values: ["medium", "3px", "calc(4px - 1px)"],
4906     other_values: [
4907       "thin",
4908       "thick",
4909       "1px",
4910       "2em",
4911       "calc(2px)",
4912       "calc(-2px)",
4913       "calc(0em)",
4914       "calc(0px)",
4915       "calc(5em)",
4916       "calc(3*25px)",
4917       "calc(25px*3)",
4918       "calc(3*25px + 5em)",
4919     ],
4920     invalid_values: ["5%"],
4921     quirks_values: { 5: "5px" },
4922   },
4923   "border-spacing": {
4924     domProp: "borderSpacing",
4925     inherited: true,
4926     type: CSS_TYPE_LONGHAND,
4927     initial_values: [
4928       "0",
4929       "0 0",
4930       "0px",
4931       "0 0px",
4932       "calc(0px)",
4933       "calc(0px) calc(0em)",
4934       "calc(2em - 2em) calc(3px + 7px - 10px)",
4935       "calc(-5px)",
4936       "calc(-5px) calc(-5px)",
4937     ],
4938     other_values: [
4939       "3px",
4940       "4em 2px",
4941       "4em 0",
4942       "0px 2px",
4943       "calc(7px)",
4944       "0 calc(7px)",
4945       "calc(7px) 0",
4946       "calc(0px) calc(7px)",
4947       "calc(7px) calc(0px)",
4948       "7px calc(0px)",
4949       "calc(0px) 7px",
4950       "7px calc(0px)",
4951       "3px calc(2em)",
4952     ],
4953     invalid_values: [
4954       "0%",
4955       "0 0%",
4956       "-5px",
4957       "-5px -5px",
4958       "0 -5px",
4959       "-5px 0",
4960       "0 calc(0px + rubbish)",
4961     ],
4962     quirks_values: {
4963       "2px 5": "2px 5px",
4964       7: "7px",
4965       "3 4px": "3px 4px",
4966     },
4967   },
4968   "border-style": {
4969     domProp: "borderStyle",
4970     inherited: false,
4971     type: CSS_TYPE_TRUE_SHORTHAND,
4972     subproperties: [
4973       "border-top-style",
4974       "border-right-style",
4975       "border-bottom-style",
4976       "border-left-style",
4977     ],
4978     /* XXX hidden is sometimes the same as initial */
4979     initial_values: [
4980       "none",
4981       "none none",
4982       "none none none",
4983       "none none none none",
4984     ],
4985     other_values: [
4986       "solid",
4987       "dashed",
4988       "dotted",
4989       "double",
4990       "outset",
4991       "inset",
4992       "groove",
4993       "ridge",
4994       "none solid",
4995       "none none solid",
4996       "none none none solid",
4997       "groove none none none",
4998       "none ridge none none",
4999       "none none double none",
5000       "none none none dotted",
5001     ],
5002     invalid_values: [],
5003   },
5004   "border-top": {
5005     domProp: "borderTop",
5006     inherited: false,
5007     type: CSS_TYPE_TRUE_SHORTHAND,
5008     subproperties: ["border-top-color", "border-top-style", "border-top-width"],
5009     initial_values: [
5010       "none",
5011       "medium",
5012       "currentColor",
5013       "thin",
5014       "none medium currentcolor",
5015     ],
5016     other_values: [
5017       "solid",
5018       "green",
5019       "medium solid",
5020       "green solid",
5021       "10px solid",
5022       "thick solid",
5023       "5px green none",
5024     ],
5025     invalid_values: ["5%", "5", "5 solid green"],
5026   },
5027   "border-top-color": {
5028     domProp: "borderTopColor",
5029     inherited: false,
5030     type: CSS_TYPE_LONGHAND,
5031     applies_to_first_letter: true,
5032     prerequisites: { color: "black" },
5033     initial_values: ["currentColor"],
5034     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
5035     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
5036     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
5037   },
5038   "border-top-style": {
5039     domProp: "borderTopStyle",
5040     inherited: false,
5041     type: CSS_TYPE_LONGHAND,
5042     applies_to_first_letter: true,
5043     /* XXX hidden is sometimes the same as initial */
5044     initial_values: ["none"],
5045     other_values: [
5046       "solid",
5047       "dashed",
5048       "dotted",
5049       "double",
5050       "outset",
5051       "inset",
5052       "groove",
5053       "ridge",
5054     ],
5055     invalid_values: [],
5056   },
5057   "border-top-width": {
5058     domProp: "borderTopWidth",
5059     inherited: false,
5060     type: CSS_TYPE_LONGHAND,
5061     applies_to_first_letter: true,
5062     prerequisites: { "border-top-style": "solid" },
5063     initial_values: ["medium", "3px", "calc(4px - 1px)"],
5064     other_values: [
5065       "thin",
5066       "thick",
5067       "1px",
5068       "2em",
5069       "calc(2px)",
5070       "calc(-2px)",
5071       "calc(0em)",
5072       "calc(0px)",
5073       "calc(5em)",
5074       "calc(3*25px)",
5075       "calc(25px*3)",
5076       "calc(3*25px + 5em)",
5077     ],
5078     invalid_values: ["5%"],
5079     quirks_values: { 5: "5px" },
5080   },
5081   "border-width": {
5082     domProp: "borderWidth",
5083     inherited: false,
5084     type: CSS_TYPE_TRUE_SHORTHAND,
5085     subproperties: [
5086       "border-top-width",
5087       "border-right-width",
5088       "border-bottom-width",
5089       "border-left-width",
5090     ],
5091     prerequisites: { "border-style": "solid" },
5092     initial_values: [
5093       "medium",
5094       "3px",
5095       "medium medium",
5096       "3px medium medium",
5097       "medium 3px medium medium",
5098       "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)",
5099     ],
5100     other_values: ["thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)"],
5101     invalid_values: ["5%", "1px calc(nonsense)", "1px red"],
5102     unbalanced_values: ["1px calc("],
5103     quirks_values: { 5: "5px" },
5104   },
5105   bottom: {
5106     domProp: "bottom",
5107     inherited: false,
5108     type: CSS_TYPE_LONGHAND,
5109     /* FIXME: run tests with multiple prerequisites */
5110     prerequisites: { position: "relative" },
5111     /* XXX 0 may or may not be equal to auto */
5112     initial_values: ["auto"],
5113     other_values: [
5114       "32px",
5115       "-3em",
5116       "12%",
5117       "calc(2px)",
5118       "calc(-2px)",
5119       "calc(50%)",
5120       "calc(3*25px)",
5121       "calc(25px*3)",
5122       "calc(3*25px + 50%)",
5123     ],
5124     invalid_values: [],
5125     quirks_values: { 5: "5px" },
5126   },
5127   "box-shadow": {
5128     domProp: "boxShadow",
5129     inherited: false,
5130     type: CSS_TYPE_LONGHAND,
5131     applies_to_first_letter: true,
5132     initial_values: ["none"],
5133     prerequisites: { color: "blue" },
5134     other_values: [
5135       "2px 2px",
5136       "2px 2px 1px",
5137       "2px 2px 2px 2px",
5138       "blue 3px 2px",
5139       "2px 2px 1px 5px green",
5140       "2px 2px red",
5141       "green 2px 2px 1px",
5142       "green 2px 2px, blue 1px 3px 4px",
5143       "currentColor 3px 3px",
5144       "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange",
5145       "3px 0 0 0",
5146       "inset 2px 2px 3px 4px black",
5147       "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px",
5148       /* calc() values */
5149       "2px 2px calc(-5px)" /* clamped */,
5150       "calc(3em - 2px) 2px green",
5151       "green calc(3em - 2px) 2px",
5152       "2px calc(2px + 0.2em)",
5153       "blue 2px calc(2px + 0.2em)",
5154       "2px calc(2px + 0.2em) blue",
5155       "calc(-2px) calc(-2px)",
5156       "-2px -2px",
5157       "calc(2px) calc(2px)",
5158       "calc(2px) calc(2px) calc(2px)",
5159       "calc(2px) calc(2px) calc(2px) calc(2px)",
5160     ],
5161     invalid_values: [
5162       "3% 3%",
5163       "1px 1px 1px 1px 1px",
5164       "2px 2px, none",
5165       "red 2px 2px blue",
5166       "inherit, 2px 2px",
5167       "2px 2px, inherit",
5168       "2px 2px -5px",
5169       "inset 4px 4px black inset",
5170       "inset inherit",
5171       "inset none",
5172       "3 3",
5173       "3px 3",
5174       "3 3px",
5175       "3px 3px 3",
5176       "3px 3px 3px 3",
5177       "3px calc(3px + rubbish)",
5178       "3px 3px calc(3px + rubbish)",
5179       "3px 3px 3px calc(3px + rubbish)",
5180       "3px 3px 3px 3px rgb(0, rubbish, 0)",
5181       "unset, 2px 2px",
5182       "2px 2px, unset",
5183       "inset unset",
5184     ],
5185   },
5186   "caption-side": {
5187     domProp: "captionSide",
5188     inherited: true,
5189     type: CSS_TYPE_LONGHAND,
5190     initial_values: ["top"],
5191     other_values: ["bottom"],
5192     invalid_values: ["right", "left", "top-outside", "bottom-outside"],
5193   },
5194   "caret-color": {
5195     domProp: "caretColor",
5196     inherited: true,
5197     type: CSS_TYPE_LONGHAND,
5198     prerequisites: { color: "black" },
5199     // Though "auto" is an independent computed-value time keyword value,
5200     // it is not distinguishable from currentcolor because getComputedStyle
5201     // always returns used value for <color>.
5202     initial_values: ["auto", "currentcolor", "black", "rgb(0,0,0)"],
5203     other_values: ["green", "transparent", "rgba(128,128,128,.5)", "#123"],
5204     invalid_values: ["#0", "#00", "#00000", "cc00ff"],
5205   },
5206   clear: {
5207     domProp: "clear",
5208     inherited: false,
5209     type: CSS_TYPE_LONGHAND,
5210     initial_values: ["none"],
5211     other_values: ["left", "right", "both", "inline-start", "inline-end"],
5212     invalid_values: [],
5213   },
5214   clip: {
5215     domProp: "clip",
5216     inherited: false,
5217     type: CSS_TYPE_LONGHAND,
5218     initial_values: ["auto"],
5219     other_values: [
5220       "rect(0 0 0 0)",
5221       "rect(auto,auto,auto,auto)",
5222       "rect(3px, 4px, 4em, 0)",
5223       "rect(auto, 3em, 4pt, 2px)",
5224       "rect(2px 3px 4px 5px)",
5225     ],
5226     invalid_values: ["rect(auto, 3em, 2%, 5px)"],
5227     quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" },
5228   },
5229   color: {
5230     domProp: "color",
5231     inherited: true,
5232     type: CSS_TYPE_LONGHAND,
5233     applies_to_first_letter: true,
5234     applies_to_first_line: true,
5235     applies_to_marker: true,
5236     applies_to_placeholder: true,
5237     applies_to_cue: true,
5238     /* XXX should test currentColor, but may or may not be initial */
5239     initial_values: [
5240       "black",
5241       "#000",
5242       "#000f",
5243       "#000000ff",
5244       "-moz-default-color",
5245       "rgb(0, 0, 0)",
5246       "rgb(0%, 0%, 0%)",
5247       /* css-color-4: */
5248       /* rgb() and rgba() are aliases of each other. */
5249       "rgb(0, 0, 0)",
5250       "rgba(0, 0, 0)",
5251       "rgb(0, 0, 0, 1)",
5252       "rgba(0, 0, 0, 1)",
5253       /* hsl() and hsla() are aliases of each other. */
5254       "hsl(0, 0%, 0%)",
5255       "hsla(0, 0%, 0%)",
5256       "hsl(0, 0%, 0%, 1)",
5257       "hsla(0, 0%, 0%, 1)",
5258       /* rgb() and rgba() functions now accept <number> rather than <integer>. */
5259       "rgb(0.0, 0.0, 0.0)",
5260       "rgba(0.0, 0.0, 0.0)",
5261       "rgb(0.0, 0.0, 0.0, 1)",
5262       "rgba(0.0, 0.0, 0.0, 1)",
5263       /* <alpha-value> now accepts <percentage> as well as <number> in rgba() and hsla(). */
5264       "rgb(0.0, 0.0, 0.0, 100%)",
5265       "hsl(0, 0%, 0%, 100%)",
5266       /* rgb() and hsl() now support comma-less expression. */
5267       "rgb(0 0 0)",
5268       "rgb(0 0 0 / 1)",
5269       "rgb(0/* comment */0/* comment */0)",
5270       "rgb(0/* comment */0/* comment*/0/1.0)",
5271       "hsl(0 0% 0%)",
5272       "hsl(0 0% 0% / 1)",
5273       "hsl(0/* comment */0%/* comment */0%)",
5274       "hsl(0/* comment */0%/* comment */0%/1)",
5275       /* Support <angle> for hsl() hue component. */
5276       "hsl(0deg, 0%, 0%)",
5277       "hsl(360deg, 0%, 0%)",
5278       "hsl(0grad, 0%, 0%)",
5279       "hsl(400grad, 0%, 0%)",
5280       "hsl(0rad, 0%, 0%)",
5281       "hsl(0turn, 0%, 0%)",
5282       "hsl(1turn, 0%, 0%)",
5283       /* CSS4 System Colors */
5284       "canvastext",
5285       /* Preserve previously available specially prefixed colors */
5286       "-moz-default-color",
5287     ],
5288     other_values: [
5289       "green",
5290       "#f3c",
5291       "#fed292",
5292       "rgba(45,300,12,2)",
5293       "transparent",
5294       "LinkText",
5295       "rgba(255,128,0,0.5)",
5296       "#e0fc",
5297       "#10fcee72",
5298       /* css-color-4: */
5299       "rgb(100, 100.0, 100)",
5300       "rgb(300 300 300 / 200%)",
5301       "rgb(300.0 300.0 300.0 / 2.0)",
5302       "hsl(720, 200%, 200%, 2.0)",
5303       "hsla(720 200% 200% / 200%)",
5304       "hsl(480deg, 20%, 30%, 0.3)",
5305       "hsl(55grad, 400%, 30%)",
5306       "hsl(0.5grad 400% 500% / 9.0)",
5307       "hsl(33rad 100% 90% / 4)",
5308       "hsl(0.33turn, 40%, 40%, 10%)",
5309       "hsl(63e292, 41%, 34%)",
5310       /* CSS4 System Colors */
5311       "canvas",
5312       "linktext",
5313       "visitedtext",
5314       "activetext",
5315       "buttonface",
5316       "field",
5317       "highlight",
5318       "graytext",
5319       /* Preserve previously available specially prefixed colors */
5320       "-moz-activehyperlinktext",
5321       "-moz-default-background-color",
5322       "-moz-hyperlinktext",
5323       "-moz-visitedhyperlinktext",
5324       /* color-mix */
5325       "color-mix(in srgb, red, blue)",
5326       "color-mix(in srgb, highlight, rgba(0, 0, 0, .5))",
5327       "color-mix(in srgb, color-mix(in srgb, red 10%, blue), green)",
5328       "color-mix(in srgb, blue, red 80%)",
5329       "color-mix(in srgb, rgba(0, 200, 32, .5) 90%, red 50%)",
5330       "color-mix(in srgb, currentColor, red)",
5331     ],
5332     invalid_values: [
5333       "#f",
5334       "#ff",
5335       "#fffff",
5336       "#fffffff",
5337       "#fffffffff",
5338       "rgb(100%, 0, 100%)",
5339       "rgba(100, 0, 100%, 30%)",
5340       "hsl(0, 0, 0%)",
5341       "hsla(0%, 0%, 0%, 0.1)",
5342       /* trailing commas */
5343       "rgb(0, 0, 0,)",
5344       "rgba(0, 0, 0, 0,)",
5345       "hsl(0, 0%, 0%,)",
5346       "hsla(0, 0%, 0%, 1,)",
5347       /* css-color-4: */
5348       /* comma and comma-less expressions should not mix together. */
5349       "rgb(0, 0, 0 / 1)",
5350       "rgb(0 0 0, 1)",
5351       "rgb(0, 0 0, 1)",
5352       "rgb(0 0, 0 / 1)",
5353       "hsl(0, 0%, 0% / 1)",
5354       "hsl(0 0% 0%, 1)",
5355       "hsl(0 0% 0%, 1)",
5356       "hsl(0 0%, 0% / 1)",
5357       /* trailing slash */
5358       "rgb(0 0 0 /)",
5359       "rgb(0, 0, 0 /)",
5360       "hsl(0 0% 0% /)",
5361       "hsl(0, 0%, 0% /)",
5362       /* color-mix */
5363       "color-mix(red, blue)",
5364       "color-mix(red blue)",
5365       "color-mix(in srgb, red blue)",
5366       "color-mix(in srgb, red 10% blue)",
5367     ],
5368     quirks_values: {
5369       "000000": "#000000",
5370       "96ed2a": "#96ed2a",
5371       fff: "#ffffff",
5372       ffffff: "#ffffff",
5373     },
5374   },
5375   content: {
5376     domProp: "content",
5377     inherited: false,
5378     type: CSS_TYPE_LONGHAND,
5379     applies_to_marker: true,
5380     // XXX This really depends on pseudo-element-ness.
5381     initial_values: ["normal", "none"],
5382     other_values: [
5383       '""',
5384       "''",
5385       '"hello"',
5386       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
5387       "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
5388       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
5389       "counter(foo)",
5390       "counter(bar, upper-roman)",
5391       'counters(foo, ".")',
5392       "counters(bar, '-', lower-greek)",
5393       "'-' counter(foo) '.'",
5394       "attr(title)",
5395       "open-quote",
5396       "close-quote",
5397       "no-open-quote",
5398       "no-close-quote",
5399       "close-quote attr(title) counters(foo, '.', upper-alpha)",
5400       "attr(\\32)",
5401       "attr(\\2)",
5402       "attr(-\\2)",
5403       "attr(-\\32)",
5404       'attr(title, "fallback")',
5405       'attr(\\32, "fallback")',
5406       'attr(-\\32, "fallback")',
5407       "counter(\\2)",
5408       "counters(\\32, '.')",
5409       "counter(-\\32, upper-roman)",
5410       "counters(-\\2, '-', lower-greek)",
5411       "counter(\\()",
5412       "counters(a\\+b, '.')",
5413       "counter(\\}, upper-alpha)",
5414       "counter(foo, symbols('*'))",
5415       "counter(foo, symbols(numeric '0' '1'))",
5416       "counters(foo, '.', symbols('*'))",
5417       "counters(foo, '.', symbols(numeric '0' '1'))",
5418       "image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==))",
5419     ].concat(validNonUrlImageValues),
5420     invalid_values: [
5421       "counter(foo, none)",
5422       "counters(bar, '.', none)",
5423       "counters(foo)",
5424       'counter(foo, ".")',
5425       'attr("title")',
5426       "attr('title')",
5427       "attr(2)",
5428       "attr(-2)",
5429       "counter(2)",
5430       "counters(-2, '.')",
5431       "-moz-alt-content",
5432       "-moz-alt-content 'foo'",
5433       "'foo' -moz-alt-content",
5434       "counter(one, two, three) 'foo'",
5435     ].concat(invalidNonUrlImageValues),
5436   },
5437   "counter-increment": {
5438     domProp: "counterIncrement",
5439     inherited: false,
5440     type: CSS_TYPE_LONGHAND,
5441     initial_values: ["none"],
5442     other_values: [
5443       "foo 1",
5444       "bar",
5445       "foo 3 bar baz 2",
5446       "\\32  1",
5447       "-\\32  1",
5448       "-c 1",
5449       "\\32 1",
5450       "-\\32 1",
5451       "\\2  1",
5452       "-\\2  1",
5453       "-c 1",
5454       "\\2 1",
5455       "-\\2 1",
5456       "-\\7f \\9e 1",
5457     ],
5458     invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5459     unbalanced_values: ["foo 1 ("],
5460   },
5461   "counter-reset": {
5462     domProp: "counterReset",
5463     inherited: false,
5464     type: CSS_TYPE_LONGHAND,
5465     initial_values: ["none"],
5466     other_values: [
5467       "foo 1",
5468       "bar",
5469       "foo 3 bar baz 2",
5470       "\\32  1",
5471       "-\\32  1",
5472       "-c 1",
5473       "\\32 1",
5474       "-\\32 1",
5475       "\\2  1",
5476       "-\\2  1",
5477       "-c 1",
5478       "\\2 1",
5479       "-\\2 1",
5480       "-\\7f \\9e 1",
5481     ],
5482     invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5483   },
5484   "counter-set": {
5485     domProp: "counterSet",
5486     inherited: false,
5487     type: CSS_TYPE_LONGHAND,
5488     initial_values: ["none"],
5489     other_values: [
5490       "foo 1",
5491       "bar",
5492       "foo 3 bar baz 2",
5493       "\\32  1",
5494       "-\\32  1",
5495       "-c 1",
5496       "\\32 1",
5497       "-\\32 1",
5498       "\\2  1",
5499       "-\\2  1",
5500       "-c 1",
5501       "\\2 1",
5502       "-\\2 1",
5503       "-\\7f \\9e 1",
5504     ],
5505     invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5506   },
5507   cursor: {
5508     domProp: "cursor",
5509     inherited: true,
5510     type: CSS_TYPE_LONGHAND,
5511     initial_values: ["auto"],
5512     other_values: [
5513       "crosshair",
5514       "default",
5515       "pointer",
5516       "move",
5517       "e-resize",
5518       "ne-resize",
5519       "nw-resize",
5520       "n-resize",
5521       "se-resize",
5522       "sw-resize",
5523       "s-resize",
5524       "w-resize",
5525       "text",
5526       "wait",
5527       "help",
5528       "progress",
5529       "copy",
5530       "alias",
5531       "context-menu",
5532       "cell",
5533       "not-allowed",
5534       "col-resize",
5535       "row-resize",
5536       "no-drop",
5537       "vertical-text",
5538       "all-scroll",
5539       "nesw-resize",
5540       "nwse-resize",
5541       "ns-resize",
5542       "ew-resize",
5543       "none",
5544       "grab",
5545       "grabbing",
5546       "zoom-in",
5547       "zoom-out",
5548       "-moz-grab",
5549       "-moz-grabbing",
5550       "-moz-zoom-in",
5551       "-moz-zoom-out",
5552       "url(foo.png), move",
5553       "url(foo.png) 5 7, move",
5554       "url(foo.png) 12 3, url(bar.png), no-drop",
5555       "url(foo.png), url(bar.png) 7 2, wait",
5556       "url(foo.png) 3 2, url(bar.png) 7 9, pointer",
5557       "url(foo.png) calc(1 + 2) calc(3), pointer",
5558       "image-set(url(foo.png)), auto",
5559     ],
5560     invalid_values: [
5561       "url(foo.png)",
5562       "url(foo.png) 5 5",
5563       "image-set(linear-gradient(red, blue)), auto",
5564       // Gradients are supported per spec, but we don't have support for it yet
5565       "linear-gradient(red, blue), auto",
5566     ],
5567   },
5568   direction: {
5569     domProp: "direction",
5570     inherited: true,
5571     type: CSS_TYPE_LONGHAND,
5572     applies_to_marker: true,
5573     initial_values: ["ltr"],
5574     other_values: ["rtl"],
5575     invalid_values: [],
5576   },
5577   display: {
5578     domProp: "display",
5579     inherited: false,
5580     type: CSS_TYPE_LONGHAND,
5581     // No applies_to_placeholder because we have a !important rule in forms.css.
5582     initial_values: ["inline"],
5583     /* XXX none will really mess with other properties */
5584     prerequisites: { float: "none", position: "static", contain: "none" },
5585     other_values: [
5586       "block",
5587       "flex",
5588       "inline-flex",
5589       "list-item",
5590       "inline list-item",
5591       "inline flow-root list-item",
5592       "inline-block",
5593       "table",
5594       "inline-table",
5595       "table-row-group",
5596       "table-header-group",
5597       "table-footer-group",
5598       "table-row",
5599       "table-column-group",
5600       "table-column",
5601       "table-cell",
5602       "table-caption",
5603       "block ruby",
5604       "ruby",
5605       "ruby-base",
5606       "ruby-base-container",
5607       "ruby-text",
5608       "ruby-text-container",
5609       "contents",
5610       "none",
5611     ],
5612     invalid_values: [],
5613   },
5614   "empty-cells": {
5615     domProp: "emptyCells",
5616     inherited: true,
5617     type: CSS_TYPE_LONGHAND,
5618     initial_values: ["show"],
5619     other_values: ["hide"],
5620     invalid_values: [],
5621   },
5622   float: {
5623     domProp: "cssFloat",
5624     inherited: false,
5625     type: CSS_TYPE_LONGHAND,
5626     applies_to_first_letter: true,
5627     initial_values: ["none"],
5628     other_values: ["left", "right", "inline-start", "inline-end"],
5629     invalid_values: [],
5630   },
5631   font: {
5632     domProp: "font",
5633     inherited: true,
5634     type: CSS_TYPE_TRUE_SHORTHAND,
5635     prerequisites: { "writing-mode": "initial" },
5636     subproperties: [
5637       "font-style",
5638       "font-variant",
5639       "font-weight",
5640       "font-size",
5641       "line-height",
5642       "font-family",
5643       "font-stretch",
5644       "font-size-adjust",
5645       "font-feature-settings",
5646       "font-language-override",
5647       "font-kerning",
5648       "font-variant-alternates",
5649       "font-variant-caps",
5650       "font-variant-east-asian",
5651       "font-variant-ligatures",
5652       "font-variant-numeric",
5653       "font-variant-position",
5654     ],
5655     initial_values: [
5656       gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif",
5657     ],
5658     other_values: [
5659       "large serif",
5660       "9px fantasy",
5661       "condensed bold italic small-caps 24px/1.4 Times New Roman, serif",
5662       "small inherit roman",
5663       "small roman inherit",
5664       // system fonts
5665       "caption",
5666       "icon",
5667       "menu",
5668       "message-box",
5669       "small-caption",
5670       "status-bar",
5671       // line-height with calc()
5672       "condensed bold italic small-caps 24px/calc(2px) Times New Roman, serif",
5673       "condensed bold italic small-caps 24px/calc(50%) Times New Roman, serif",
5674       "condensed bold italic small-caps 24px/calc(3*25px) Times New Roman, serif",
5675       "condensed bold italic small-caps 24px/calc(25px*3) Times New Roman, serif",
5676       "condensed bold italic small-caps 24px/calc(3*25px + 50%) Times New Roman, serif",
5677       "condensed bold italic small-caps 24px/calc(1 + 2*3/4) Times New Roman, serif",
5678     ],
5679     invalid_values: [
5680       "9 fantasy",
5681       "-2px fantasy",
5682       // line-height with calc()
5683       "condensed bold italic small-caps 24px/calc(1 + 2px) Times New Roman, serif",
5684       "condensed bold italic small-caps 24px/calc(100% + 0.1) Times New Roman, serif",
5685     ],
5686   },
5687   "font-family": {
5688     domProp: "fontFamily",
5689     inherited: true,
5690     type: CSS_TYPE_LONGHAND,
5691     applies_to_first_letter: true,
5692     applies_to_first_line: true,
5693     applies_to_marker: true,
5694     applies_to_placeholder: true,
5695     applies_to_cue: true,
5696     initial_values: [gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif"],
5697     other_values: [
5698       gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif",
5699       "Times New Roman, serif",
5700       "'Times New Roman', serif",
5701       "cursive",
5702       "fantasy",
5703       '\\"Times New Roman',
5704       '"Times New Roman"',
5705       'Times, \\"Times New Roman',
5706       'Times, "Times New Roman"',
5707       "-no-such-font-installed",
5708       "inherit roman",
5709       "roman inherit",
5710       "Times, inherit roman",
5711       "inherit roman, Times",
5712       "roman inherit, Times",
5713       "Times, roman inherit",
5714     ],
5715     invalid_values: [
5716       '"Times New" Roman',
5717       '"Times New Roman\n',
5718       'Times, "Times New Roman\n',
5719     ],
5720   },
5721   "font-feature-settings": {
5722     domProp: "fontFeatureSettings",
5723     inherited: true,
5724     type: CSS_TYPE_LONGHAND,
5725     applies_to_first_letter: true,
5726     applies_to_first_line: true,
5727     applies_to_marker: true,
5728     applies_to_placeholder: true,
5729     applies_to_cue: true,
5730     initial_values: ["normal"],
5731     other_values: [
5732       "'liga' on",
5733       "'liga'",
5734       '"liga" 1',
5735       "'liga', 'clig' 1",
5736       '"liga" off',
5737       '"liga" 0',
5738       '"cv01" 3, "cv02" 4',
5739       '"cswh", "smcp" off, "salt" 4',
5740       '"cswh" 1, "smcp" off, "salt" 4',
5741       '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4',
5742       '"liga"        ,"smcp" 0         , "blah"',
5743       '"ab\\"c"',
5744       '"ab\\\\c"',
5745       "'vert' calc(2)",
5746     ],
5747     invalid_values: [
5748       "liga",
5749       "liga 1",
5750       "liga normal",
5751       '"liga" normal',
5752       "normal liga",
5753       'normal "liga"',
5754       'normal, "liga"',
5755       '"liga=1"',
5756       "'foobar' on",
5757       '"blahblah" 0',
5758       '"liga" 3.14',
5759       '"liga" 1 3.14',
5760       '"liga" 1 normal',
5761       '"liga" 1 off',
5762       '"liga" on off',
5763       '"liga" , 0 "smcp"',
5764       '"liga" "smcp"',
5765     ],
5766   },
5767   "font-kerning": {
5768     domProp: "fontKerning",
5769     inherited: true,
5770     type: CSS_TYPE_LONGHAND,
5771     applies_to_first_letter: true,
5772     applies_to_first_line: true,
5773     applies_to_marker: true,
5774     applies_to_placeholder: true,
5775     applies_to_cue: true,
5776     initial_values: ["auto"],
5777     other_values: ["normal", "none"],
5778     invalid_values: ["on"],
5779   },
5780   "font-language-override": {
5781     domProp: "fontLanguageOverride",
5782     inherited: true,
5783     type: CSS_TYPE_LONGHAND,
5784     applies_to_first_letter: true,
5785     applies_to_first_line: true,
5786     applies_to_marker: true,
5787     applies_to_placeholder: true,
5788     applies_to_cue: true,
5789     initial_values: ["normal"],
5790     other_values: ["'ENG'", "'TRK'", '"TRK"', "'N\\'Ko'"],
5791     invalid_values: ["TRK", "ja"],
5792   },
5793   "font-size": {
5794     domProp: "fontSize",
5795     inherited: true,
5796     type: CSS_TYPE_LONGHAND,
5797     applies_to_first_letter: true,
5798     applies_to_first_line: true,
5799     applies_to_marker: true,
5800     applies_to_placeholder: true,
5801     applies_to_cue: true,
5802     initial_values: [
5803       "medium",
5804       "1rem",
5805       "calc(1rem)",
5806       "calc(0.75rem + 200% - 125% + 0.25rem - 75%)",
5807     ],
5808     other_values: [
5809       "large",
5810       "2em",
5811       "50%",
5812       "xx-small",
5813       "xxx-large",
5814       "36pt",
5815       "8px",
5816       "larger",
5817       "smaller",
5818       "0px",
5819       "0%",
5820       "calc(2em)",
5821       "calc(36pt + 75% + (30% + 2em + 2px))",
5822       "calc(-2em)",
5823       "calc(-50%)",
5824       "calc(-1px)",
5825     ],
5826     invalid_values: ["-2em", "-50%", "-1px"],
5827     quirks_values: { 5: "5px" },
5828   },
5829   "font-size-adjust": {
5830     domProp: "fontSizeAdjust",
5831     inherited: true,
5832     type: CSS_TYPE_LONGHAND,
5833     applies_to_first_letter: true,
5834     applies_to_first_line: true,
5835     applies_to_marker: true,
5836     applies_to_placeholder: true,
5837     applies_to_cue: true,
5838     initial_values: ["none"],
5839     other_values: [
5840       "0.7",
5841       "0.0",
5842       "0",
5843       "3",
5844       "from-font",
5845       "cap-height 0.8",
5846       "ch-width 0.4",
5847       "ic-width 0.4",
5848       "ic-height 0.9",
5849       "ch-width from-font",
5850     ],
5851     invalid_values: [
5852       "-0.3",
5853       "-1",
5854       "normal",
5855       "none none",
5856       "cap-height none",
5857       "none from-font",
5858       "from-font none",
5859       "0.5 from-font",
5860       "0.5 cap-height",
5861       "cap-height, 0.8",
5862     ],
5863   },
5864   "font-stretch": {
5865     domProp: "fontStretch",
5866     inherited: true,
5867     type: CSS_TYPE_LONGHAND,
5868     applies_to_first_letter: true,
5869     applies_to_first_line: true,
5870     applies_to_marker: true,
5871     applies_to_placeholder: true,
5872     applies_to_cue: true,
5873     initial_values: ["normal"],
5874     other_values: [
5875       "ultra-condensed",
5876       "extra-condensed",
5877       "condensed",
5878       "semi-condensed",
5879       "semi-expanded",
5880       "expanded",
5881       "extra-expanded",
5882       "ultra-expanded",
5883     ],
5884     invalid_values: ["narrower", "wider"],
5885   },
5886   "font-style": {
5887     domProp: "fontStyle",
5888     inherited: true,
5889     type: CSS_TYPE_LONGHAND,
5890     applies_to_first_letter: true,
5891     applies_to_first_line: true,
5892     applies_to_marker: true,
5893     applies_to_placeholder: true,
5894     applies_to_cue: true,
5895     initial_values: ["normal"],
5896     other_values: ["italic", "oblique"],
5897     invalid_values: [],
5898   },
5899   "font-synthesis": {
5900     domProp: "fontSynthesis",
5901     inherited: true,
5902     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
5903     subproperties: [
5904       "font-synthesis-weight",
5905       "font-synthesis-style",
5906       "font-synthesis-small-caps",
5907       "font-synthesis-position",
5908     ],
5909     applies_to_first_letter: true,
5910     applies_to_first_line: true,
5911     applies_to_marker: true,
5912     applies_to_placeholder: true,
5913     applies_to_cue: true,
5914     initial_values: [
5915       "weight style small-caps position",
5916       "weight small-caps style position",
5917       "small-caps weight position style",
5918       "small-caps style position weight",
5919       "style position weight small-caps",
5920       "style position small-caps weight",
5921     ],
5922     other_values: [
5923       "none",
5924       "weight",
5925       "style",
5926       "small-caps",
5927       "position",
5928       "weight style",
5929       "style weight",
5930       "weight small-caps",
5931       "small-caps weight",
5932       "weight position",
5933       "position weight",
5934       "style small-caps",
5935       "small-caps style",
5936       "style position",
5937       "position style",
5938       "small-caps position",
5939       "position small-caps",
5940       "weight style small-caps",
5941       "small-caps weight style",
5942       "weight style position",
5943       "position weight style",
5944       "weight small-caps position",
5945       "position weight small-caps",
5946     ],
5947     invalid_values: [
5948       "10px",
5949       "weight none",
5950       "style none",
5951       "none style",
5952       "none 10px",
5953       "weight 10px",
5954       "weight weight",
5955       "style style",
5956       "small-caps none",
5957       "small-caps small-caps",
5958       "position none",
5959       "position position",
5960     ],
5961   },
5962   "font-synthesis-weight": {
5963     domProp: "fontSynthesisWeight",
5964     inherited: true,
5965     type: CSS_TYPE_LONGHAND,
5966     applies_to_first_letter: true,
5967     applies_to_first_line: true,
5968     applies_to_marker: true,
5969     applies_to_placeholder: true,
5970     applies_to_cue: true,
5971     initial_values: ["auto"],
5972     other_values: ["none"],
5973     invalid_values: ["auto none", "weight", "normal", "0"],
5974   },
5975   "font-synthesis-style": {
5976     domProp: "fontSynthesisStyle",
5977     inherited: true,
5978     type: CSS_TYPE_LONGHAND,
5979     applies_to_first_letter: true,
5980     applies_to_first_line: true,
5981     applies_to_marker: true,
5982     applies_to_placeholder: true,
5983     applies_to_cue: true,
5984     initial_values: ["auto"],
5985     other_values: ["none"],
5986     invalid_values: ["auto none", "style", "normal", "0"],
5987   },
5988   "font-synthesis-small-caps": {
5989     domProp: "fontSynthesisSmallCaps",
5990     inherited: true,
5991     type: CSS_TYPE_LONGHAND,
5992     applies_to_first_letter: true,
5993     applies_to_first_line: true,
5994     applies_to_marker: true,
5995     applies_to_placeholder: true,
5996     applies_to_cue: true,
5997     initial_values: ["auto"],
5998     other_values: ["none"],
5999     invalid_values: ["auto none", "small-caps", "normal", "0"],
6000   },
6001   "font-synthesis-position": {
6002     domProp: "fontSynthesisPosition",
6003     inherited: true,
6004     type: CSS_TYPE_LONGHAND,
6005     applies_to_first_letter: true,
6006     applies_to_first_line: true,
6007     applies_to_marker: true,
6008     applies_to_placeholder: true,
6009     applies_to_cue: true,
6010     initial_values: ["auto"],
6011     other_values: ["none"],
6012     invalid_values: ["auto none", "position", "normal", "0"],
6013   },
6014   "font-variant": {
6015     domProp: "fontVariant",
6016     inherited: true,
6017     type: CSS_TYPE_TRUE_SHORTHAND,
6018     subproperties: [
6019       "font-variant-alternates",
6020       "font-variant-caps",
6021       "font-variant-east-asian",
6022       "font-variant-ligatures",
6023       "font-variant-numeric",
6024       "font-variant-position",
6025     ],
6026     initial_values: ["normal"],
6027     other_values: [
6028       "small-caps",
6029       "none",
6030       "traditional oldstyle-nums",
6031       "all-small-caps",
6032       "common-ligatures no-discretionary-ligatures",
6033       "proportional-nums oldstyle-nums",
6034       "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal",
6035       "traditional historical-forms styleset(ok-alt-a, ok-alt-b)",
6036       "styleset(potato)",
6037     ],
6038     invalid_values: [
6039       "small-caps normal",
6040       "small-caps small-caps",
6041       "none common-ligatures",
6042       "common-ligatures none",
6043       "small-caps potato",
6044       "small-caps jis83 all-small-caps",
6045       "super historical-ligatures sub",
6046       "stacked-fractions diagonal-fractions historical-ligatures",
6047       "common-ligatures traditional common-ligatures",
6048       "lining-nums traditional slashed-zero ordinal normal",
6049       "traditional historical-forms styleset(ok-alt-a, ok-alt-b) historical-forms",
6050       "historical-forms styleset(ok-alt-a, ok-alt-b) traditional styleset(potato)",
6051       "annotation(a,b,c)",
6052     ],
6053   },
6054   "font-variant-alternates": {
6055     domProp: "fontVariantAlternates",
6056     inherited: true,
6057     type: CSS_TYPE_LONGHAND,
6058     applies_to_first_letter: true,
6059     applies_to_first_line: true,
6060     applies_to_marker: true,
6061     applies_to_placeholder: true,
6062     applies_to_cue: true,
6063     initial_values: ["normal"],
6064     other_values: [
6065       "historical-forms",
6066       "styleset(alt-a, alt-b)",
6067       "character-variant(a, b, c)",
6068       "annotation(circled)",
6069       "swash(squishy)",
6070       "styleset(complex\\ blob, a)",
6071       "annotation(\\62 lah)",
6072     ],
6073     invalid_values: [
6074       "historical-forms normal",
6075       "historical-forms historical-forms",
6076       "swash",
6077       "swash(3)",
6078       "annotation(a, b)",
6079       "ornaments(a,b)",
6080       "styleset(1234blah)",
6081       "annotation(a), annotation(b)",
6082       "annotation(a) normal",
6083     ],
6084   },
6085   "font-variant-caps": {
6086     domProp: "fontVariantCaps",
6087     inherited: true,
6088     type: CSS_TYPE_LONGHAND,
6089     applies_to_first_letter: true,
6090     applies_to_first_line: true,
6091     applies_to_marker: true,
6092     applies_to_placeholder: true,
6093     applies_to_cue: true,
6094     initial_values: ["normal"],
6095     other_values: [
6096       "small-caps",
6097       "all-small-caps",
6098       "petite-caps",
6099       "all-petite-caps",
6100       "titling-caps",
6101       "unicase",
6102     ],
6103     invalid_values: [
6104       "normal small-caps",
6105       "petite-caps normal",
6106       "unicase unicase",
6107     ],
6108   },
6109   "font-variant-east-asian": {
6110     domProp: "fontVariantEastAsian",
6111     inherited: true,
6112     type: CSS_TYPE_LONGHAND,
6113     applies_to_first_letter: true,
6114     applies_to_first_line: true,
6115     applies_to_marker: true,
6116     applies_to_placeholder: true,
6117     applies_to_cue: true,
6118     initial_values: ["normal"],
6119     other_values: [
6120       "jis78",
6121       "jis83",
6122       "jis90",
6123       "jis04",
6124       "simplified",
6125       "traditional",
6126       "full-width",
6127       "proportional-width",
6128       "ruby",
6129       "jis78 full-width",
6130       "jis78 full-width ruby",
6131       "simplified proportional-width",
6132       "ruby simplified",
6133     ],
6134     invalid_values: [
6135       "jis78 normal",
6136       "jis90 jis04",
6137       "simplified traditional",
6138       "full-width proportional-width",
6139       "ruby simplified ruby",
6140       "jis78 ruby simplified",
6141     ],
6142   },
6143   "font-variant-ligatures": {
6144     domProp: "fontVariantLigatures",
6145     inherited: true,
6146     type: CSS_TYPE_LONGHAND,
6147     applies_to_first_letter: true,
6148     applies_to_first_line: true,
6149     applies_to_marker: true,
6150     applies_to_placeholder: true,
6151     applies_to_cue: true,
6152     initial_values: ["normal"],
6153     other_values: [
6154       "none",
6155       "common-ligatures",
6156       "no-common-ligatures",
6157       "discretionary-ligatures",
6158       "no-discretionary-ligatures",
6159       "historical-ligatures",
6160       "no-historical-ligatures",
6161       "contextual",
6162       "no-contextual",
6163       "common-ligatures no-discretionary-ligatures",
6164       "contextual no-discretionary-ligatures",
6165       "historical-ligatures no-common-ligatures",
6166       "no-historical-ligatures discretionary-ligatures",
6167       "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual",
6168     ],
6169     invalid_values: [
6170       "common-ligatures normal",
6171       "common-ligatures no-common-ligatures",
6172       "common-ligatures common-ligatures",
6173       "no-historical-ligatures historical-ligatures",
6174       "no-discretionary-ligatures discretionary-ligatures",
6175       "no-contextual contextual",
6176       "common-ligatures no-discretionary-ligatures no-common-ligatures",
6177       "common-ligatures none",
6178       "no-discretionary-ligatures none",
6179       "none common-ligatures",
6180     ],
6181   },
6182   "font-variant-numeric": {
6183     domProp: "fontVariantNumeric",
6184     inherited: true,
6185     type: CSS_TYPE_LONGHAND,
6186     applies_to_first_letter: true,
6187     applies_to_first_line: true,
6188     applies_to_marker: true,
6189     applies_to_placeholder: true,
6190     applies_to_cue: true,
6191     initial_values: ["normal"],
6192     other_values: [
6193       "lining-nums",
6194       "oldstyle-nums",
6195       "proportional-nums",
6196       "tabular-nums",
6197       "diagonal-fractions",
6198       "stacked-fractions",
6199       "slashed-zero",
6200       "ordinal",
6201       "lining-nums diagonal-fractions",
6202       "tabular-nums stacked-fractions",
6203       "tabular-nums slashed-zero stacked-fractions",
6204       "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal",
6205     ],
6206     invalid_values: [
6207       "lining-nums normal",
6208       "lining-nums oldstyle-nums",
6209       "lining-nums normal slashed-zero ordinal",
6210       "proportional-nums tabular-nums",
6211       "diagonal-fractions stacked-fractions",
6212       "slashed-zero diagonal-fractions slashed-zero",
6213       "lining-nums slashed-zero diagonal-fractions oldstyle-nums",
6214       "diagonal-fractions diagonal-fractions",
6215     ],
6216   },
6217   "font-variant-position": {
6218     domProp: "fontVariantPosition",
6219     inherited: true,
6220     type: CSS_TYPE_LONGHAND,
6221     applies_to_first_letter: true,
6222     applies_to_first_line: true,
6223     applies_to_marker: true,
6224     applies_to_placeholder: true,
6225     applies_to_cue: true,
6226     initial_values: ["normal"],
6227     other_values: ["super", "sub"],
6228     invalid_values: ["normal sub", "super sub"],
6229   },
6230   "font-weight": {
6231     domProp: "fontWeight",
6232     inherited: true,
6233     type: CSS_TYPE_LONGHAND,
6234     applies_to_first_letter: true,
6235     applies_to_first_line: true,
6236     applies_to_marker: true,
6237     applies_to_placeholder: true,
6238     applies_to_cue: true,
6239     initial_values: ["normal", "400"],
6240     other_values: [
6241       "bold",
6242       "100",
6243       "200",
6244       "300",
6245       "500",
6246       "600",
6247       "700",
6248       "800",
6249       "900",
6250       "bolder",
6251       "lighter",
6252       "10.5",
6253       "calc(10 + 10)",
6254       "calc(10 - 99)",
6255       "100.0",
6256       "107",
6257       "399",
6258       "401",
6259       "699",
6260       "710",
6261       "1000",
6262     ],
6263     invalid_values: ["0", "1001", "calc(10%)"],
6264   },
6265   height: {
6266     domProp: "height",
6267     inherited: false,
6268     type: CSS_TYPE_LONGHAND,
6269     /* FIXME: test zero, and test calc clamping */
6270     initial_values: [" auto"],
6271     /* computed value tests for height test more with display:block */
6272     prerequisites: { display: "block" },
6273     other_values: [
6274       "15px",
6275       "3em",
6276       "15%",
6277       "max-content",
6278       "min-content",
6279       "fit-content",
6280       "stretch",
6281       "-moz-max-content",
6282       "-moz-min-content",
6283       "-moz-fit-content",
6284       "-moz-available",
6285       "-webkit-fill-available",
6286       "calc(2px)",
6287       "calc(50%)",
6288       "calc(3*25px)",
6289       "calc(25px*3)",
6290       "calc(3*25px + 50%)",
6291       "fit-content(100px)",
6292       "fit-content(10%)",
6293       "fit-content(calc(3*25px + 50%))",
6294     ],
6295     invalid_values: ["none"],
6296     quirks_values: { 5: "5px" },
6297   },
6298   "ime-mode": {
6299     domProp: "imeMode",
6300     inherited: false,
6301     type: CSS_TYPE_LONGHAND,
6302     initial_values: ["auto"],
6303     other_values: ["normal", "disabled", "active", "inactive"],
6304     invalid_values: ["none", "enabled", "1px"],
6305   },
6306   left: {
6307     domProp: "left",
6308     inherited: false,
6309     type: CSS_TYPE_LONGHAND,
6310     /* FIXME: run tests with multiple prerequisites */
6311     prerequisites: { position: "relative" },
6312     /* XXX 0 may or may not be equal to auto */
6313     initial_values: ["auto"],
6314     other_values: [
6315       "32px",
6316       "-3em",
6317       "12%",
6318       "calc(2px)",
6319       "calc(-2px)",
6320       "calc(50%)",
6321       "calc(3*25px)",
6322       "calc(25px*3)",
6323       "calc(3*25px + 50%)",
6324     ],
6325     invalid_values: [],
6326     quirks_values: { 5: "5px" },
6327   },
6328   "letter-spacing": {
6329     domProp: "letterSpacing",
6330     inherited: true,
6331     type: CSS_TYPE_LONGHAND,
6332     applies_to_first_letter: true,
6333     applies_to_first_line: true,
6334     applies_to_placeholder: true,
6335     initial_values: ["normal", "0", "0px", "calc(0px)"],
6336     other_values: [
6337       "1em",
6338       "2px",
6339       "-3px",
6340       "calc(1em)",
6341       "calc(1em + 3px)",
6342       "calc(15px / 2)",
6343       "calc(15px/2)",
6344       "calc(-3px)",
6345     ],
6346     invalid_values: [],
6347     quirks_values: { 5: "5px" },
6348   },
6349   "line-break": {
6350     domProp: "lineBreak",
6351     inherited: true,
6352     type: CSS_TYPE_LONGHAND,
6353     initial_values: ["auto"],
6354     other_values: ["loose", "normal", "strict", "anywhere"],
6355     invalid_values: [],
6356   },
6357   "line-height": {
6358     domProp: "lineHeight",
6359     inherited: true,
6360     type: CSS_TYPE_LONGHAND,
6361     applies_to_marker: true,
6362     applies_to_first_letter: true,
6363     applies_to_first_line: true,
6364     applies_to_placeholder: true,
6365     applies_to_cue: true,
6366     /*
6367      * Inheritance tests require consistent font size, since
6368      * getComputedStyle (which uses the CSS2 computed value, or
6369      * CSS2.1 used value) doesn't match what the CSS2.1 computed
6370      * value is.  And they even require consistent font metrics for
6371      * computation of 'normal'.
6372      */
6373     prerequisites: {
6374       "font-size": "19px",
6375       "font-size-adjust": "none",
6376       "font-family": "serif",
6377       "font-weight": "normal",
6378       "font-style": "normal",
6379       height: "18px",
6380       display: "block",
6381       "writing-mode": "initial",
6382     },
6384     initial_values: ["normal"],
6385     other_values: [
6386       "1.0",
6387       "1",
6388       "1em",
6389       "47px",
6390       "calc(2px)",
6391       "calc(50%)",
6392       "calc(3*25px)",
6393       "calc(25px*3)",
6394       "calc(3*25px + 50%)",
6395       "calc(1 + 2*3/4)",
6396     ],
6397     invalid_values: ["calc(1 + 2px)", "calc(100% + 0.1)"],
6398   },
6399   "list-style": {
6400     domProp: "listStyle",
6401     inherited: true,
6402     type: CSS_TYPE_TRUE_SHORTHAND,
6403     subproperties: [
6404       "list-style-type",
6405       "list-style-position",
6406       "list-style-image",
6407     ],
6408     initial_values: [
6409       "outside",
6410       "disc",
6411       "disc outside",
6412       "outside disc",
6413       "disc none",
6414       "none disc",
6415       "none disc outside",
6416       "none outside disc",
6417       "disc none outside",
6418       "disc outside none",
6419       "outside none disc",
6420       "outside disc none",
6421     ],
6422     other_values: [
6423       "inside none",
6424       "none inside",
6425       "none none inside",
6426       "square",
6427       "none",
6428       "none none",
6429       "outside none none",
6430       "none outside none",
6431       "none none outside",
6432       "none outside",
6433       "outside none",
6434       "outside outside",
6435       "outside inside",
6436       "\\32 style",
6437       "\\32 style inside",
6438       '"-"',
6439       "'-'",
6440       "inside '-'",
6441       "'-' outside",
6442       "none '-'",
6443       "inside none '-'",
6444       'symbols("*" "\\2020" "\\2021" "\\A7")',
6445       'symbols(cyclic "*" "\\2020" "\\2021" "\\A7")',
6446       'inside symbols("*" "\\2020" "\\2021" "\\A7")',
6447       'symbols("*" "\\2020" "\\2021" "\\A7") outside',
6448       'none symbols("*" "\\2020" "\\2021" "\\A7")',
6449       'inside none symbols("*" "\\2020" "\\2021" "\\A7")',
6450       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6451       'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6452       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
6453       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
6454       'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6455       'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6456       'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
6457       'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
6458       'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6459       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none',
6460       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside',
6461     ],
6462     invalid_values: [
6463       "disc disc",
6464       "unknown value",
6465       "none none none",
6466       "none disc url(404.png)",
6467       "none url(404.png) disc",
6468       "disc none url(404.png)",
6469       "disc url(404.png) none",
6470       "url(404.png) none disc",
6471       "url(404.png) disc none",
6472       "none disc outside url(404.png)",
6473     ],
6474   },
6475   "list-style-image": {
6476     domProp: "listStyleImage",
6477     inherited: true,
6478     type: CSS_TYPE_LONGHAND,
6479     initial_values: ["none"],
6480     other_values: [
6481       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6482       // Add some tests for interesting url() values here to test serialization, etc.
6483       "url('data:text/plain,\"')",
6484       'url("data:text/plain,\'")',
6485       "url('data:text/plain,\\'')",
6486       'url("data:text/plain,\\"")',
6487       "url('data:text/plain,\\\"')",
6488       'url("data:text/plain,\\\'")',
6489       "url(data:text/plain,\\\\)",
6490     ].concat(validNonUrlImageValues),
6491     invalid_values: ["url('border.png') url('border.png')"].concat(
6492       invalidNonUrlImageValues
6493     ),
6494     unbalanced_values: [].concat(unbalancedGradientAndElementValues),
6495   },
6496   "list-style-position": {
6497     domProp: "listStylePosition",
6498     inherited: true,
6499     type: CSS_TYPE_LONGHAND,
6500     initial_values: ["outside"],
6501     other_values: ["inside"],
6502     invalid_values: [],
6503   },
6504   "list-style-type": {
6505     domProp: "listStyleType",
6506     inherited: true,
6507     type: CSS_TYPE_LONGHAND,
6508     initial_values: ["disc"],
6509     other_values: [
6510       "none",
6511       "circle",
6512       "square",
6513       "disclosure-closed",
6514       "disclosure-open",
6515       "decimal",
6516       "decimal-leading-zero",
6517       "lower-roman",
6518       "upper-roman",
6519       "lower-greek",
6520       "lower-alpha",
6521       "lower-latin",
6522       "upper-alpha",
6523       "upper-latin",
6524       "hebrew",
6525       "armenian",
6526       "georgian",
6527       "cjk-decimal",
6528       "cjk-ideographic",
6529       "hiragana",
6530       "katakana",
6531       "hiragana-iroha",
6532       "katakana-iroha",
6533       "japanese-informal",
6534       "japanese-formal",
6535       "korean-hangul-formal",
6536       "korean-hanja-informal",
6537       "korean-hanja-formal",
6538       "simp-chinese-informal",
6539       "simp-chinese-formal",
6540       "trad-chinese-informal",
6541       "trad-chinese-formal",
6542       "ethiopic-numeric",
6543       "-moz-cjk-heavenly-stem",
6544       "-moz-cjk-earthly-branch",
6545       "-moz-trad-chinese-informal",
6546       "-moz-trad-chinese-formal",
6547       "-moz-simp-chinese-informal",
6548       "-moz-simp-chinese-formal",
6549       "-moz-japanese-informal",
6550       "-moz-japanese-formal",
6551       "-moz-arabic-indic",
6552       "-moz-persian",
6553       "-moz-urdu",
6554       "-moz-devanagari",
6555       "-moz-gurmukhi",
6556       "-moz-gujarati",
6557       "-moz-oriya",
6558       "-moz-kannada",
6559       "-moz-malayalam",
6560       "-moz-bengali",
6561       "-moz-tamil",
6562       "-moz-telugu",
6563       "-moz-thai",
6564       "-moz-lao",
6565       "-moz-myanmar",
6566       "-moz-khmer",
6567       "-moz-hangul",
6568       "-moz-hangul-consonant",
6569       "-moz-ethiopic-halehame",
6570       "-moz-ethiopic-numeric",
6571       "-moz-ethiopic-halehame-am",
6572       "-moz-ethiopic-halehame-ti-er",
6573       "-moz-ethiopic-halehame-ti-et",
6574       "other-style",
6575       "inside",
6576       "outside",
6577       "\\32 style",
6578       '"-"',
6579       "'-'",
6580       'symbols("*" "\\2020" "\\2021" "\\A7")',
6581       "symbols(cyclic '*' '\\2020' '\\2021' '\\A7')",
6582     ],
6583     invalid_values: [],
6584   },
6585   margin: {
6586     domProp: "margin",
6587     inherited: false,
6588     type: CSS_TYPE_TRUE_SHORTHAND,
6589     subproperties: [
6590       "margin-top",
6591       "margin-right",
6592       "margin-bottom",
6593       "margin-left",
6594     ],
6595     initial_values: ["0", "0px 0 0em", "0% 0px 0em 0pt"],
6596     other_values: [
6597       "3px 0",
6598       "2em 4px 2pt",
6599       "1em 2em 3px 4px",
6600       "1em calc(2em + 3px) 4ex 5cm",
6601     ],
6602     invalid_values: ["1px calc(nonsense)", "1px red"],
6603     unbalanced_values: ["1px calc("],
6604     quirks_values: { 5: "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
6605   },
6606   "margin-bottom": {
6607     domProp: "marginBottom",
6608     inherited: false,
6609     type: CSS_TYPE_LONGHAND,
6610     applies_to_first_letter: true,
6611     /* XXX testing auto has prerequisites */
6612     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6613     other_values: [
6614       "1px",
6615       "2em",
6616       "5%",
6617       "calc(2px)",
6618       "calc(-2px)",
6619       "calc(50%)",
6620       "calc(3*25px)",
6621       "calc(25px*3)",
6622       "calc(3*25px + 50%)",
6623     ],
6624     invalid_values: [],
6625     quirks_values: { 5: "5px" },
6626   },
6627   "margin-left": {
6628     domProp: "marginLeft",
6629     inherited: false,
6630     type: CSS_TYPE_LONGHAND,
6631     applies_to_first_letter: true,
6632     /* XXX testing auto has prerequisites */
6633     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6634     other_values: [
6635       "1px",
6636       "2em",
6637       "5%",
6638       ".5px",
6639       "+32px",
6640       "+.789px",
6641       "-.328px",
6642       "+0.56px",
6643       "-0.974px",
6644       "237px",
6645       "-289px",
6646       "-056px",
6647       "1987.45px",
6648       "-84.32px",
6649       "calc(2px)",
6650       "calc(-2px)",
6651       "calc(50%)",
6652       "calc(3*25px)",
6653       "calc(25px*3)",
6654       "calc(3*25px + 50%)",
6655     ],
6656     invalid_values: [
6657       "..25px",
6658       ".+5px",
6659       ".px",
6660       "-.px",
6661       "++5px",
6662       "-+4px",
6663       "+-3px",
6664       "--7px",
6665       "+-.6px",
6666       "-+.5px",
6667       "++.7px",
6668       "--.4px",
6669     ],
6670     quirks_values: { 5: "5px" },
6671   },
6672   "margin-right": {
6673     domProp: "marginRight",
6674     inherited: false,
6675     type: CSS_TYPE_LONGHAND,
6676     applies_to_first_letter: true,
6677     /* XXX testing auto has prerequisites */
6678     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6679     other_values: [
6680       "1px",
6681       "2em",
6682       "5%",
6683       "calc(2px)",
6684       "calc(-2px)",
6685       "calc(50%)",
6686       "calc(3*25px)",
6687       "calc(25px*3)",
6688       "calc(3*25px + 50%)",
6689     ],
6690     invalid_values: [],
6691     quirks_values: { 5: "5px" },
6692   },
6693   "margin-top": {
6694     domProp: "marginTop",
6695     inherited: false,
6696     type: CSS_TYPE_LONGHAND,
6697     applies_to_first_letter: true,
6698     /* XXX testing auto has prerequisites */
6699     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6700     other_values: [
6701       "1px",
6702       "2em",
6703       "5%",
6704       "calc(2px)",
6705       "calc(-2px)",
6706       "calc(50%)",
6707       "calc(3*25px)",
6708       "calc(25px*3)",
6709       "calc(3*25px + 50%)",
6710     ],
6711     invalid_values: [],
6712     quirks_values: { 5: "5px" },
6713   },
6714   "max-height": {
6715     domProp: "maxHeight",
6716     inherited: false,
6717     type: CSS_TYPE_LONGHAND,
6718     prerequisites: { display: "block" },
6719     initial_values: ["none"],
6720     other_values: [
6721       "30px",
6722       "50%",
6723       "0",
6724       "max-content",
6725       "min-content",
6726       "fit-content",
6727       "stretch",
6728       "-moz-max-content",
6729       "-moz-min-content",
6730       "-moz-fit-content",
6731       "-moz-available",
6732       "-webkit-fill-available",
6733       "calc(2px)",
6734       "calc(-2px)",
6735       "calc(0px)",
6736       "calc(50%)",
6737       "calc(3*25px)",
6738       "calc(25px*3)",
6739       "calc(3*25px + 50%)",
6740       "fit-content(100px)",
6741       "fit-content(10%)",
6742       "fit-content(calc(3*25px + 50%))",
6743     ],
6744     invalid_values: ["auto"],
6745     quirks_values: { 5: "5px" },
6746   },
6747   "max-width": {
6748     domProp: "maxWidth",
6749     inherited: false,
6750     type: CSS_TYPE_LONGHAND,
6751     prerequisites: { display: "block" },
6752     initial_values: ["none"],
6753     other_values: [
6754       "30px",
6755       "50%",
6756       "0",
6757       "max-content",
6758       "min-content",
6759       "fit-content",
6760       "stretch",
6761       "-moz-max-content",
6762       "-moz-min-content",
6763       "-moz-fit-content",
6764       "-moz-available",
6765       "-webkit-fill-available",
6766       "calc(2px)",
6767       "calc(-2px)",
6768       "calc(0px)",
6769       "calc(50%)",
6770       "calc(3*25px)",
6771       "calc(25px*3)",
6772       "calc(3*25px + 50%)",
6773       "fit-content(100px)",
6774       "fit-content(10%)",
6775       "fit-content(calc(3*25px + 50%))",
6776     ],
6777     invalid_values: ["auto"],
6778     quirks_values: { 5: "5px" },
6779   },
6780   "min-height": {
6781     domProp: "minHeight",
6782     inherited: false,
6783     type: CSS_TYPE_LONGHAND,
6784     prerequisites: { display: "block" },
6785     initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
6786     other_values: [
6787       "30px",
6788       "50%",
6789       "max-content",
6790       "min-content",
6791       "fit-content",
6792       "stretch",
6793       "-moz-max-content",
6794       "-moz-min-content",
6795       "-moz-fit-content",
6796       "-moz-available",
6797       "-webkit-fill-available",
6798       "calc(-1%)",
6799       "calc(2px)",
6800       "calc(50%)",
6801       "calc(3*25px)",
6802       "calc(25px*3)",
6803       "calc(3*25px + 50%)",
6804       "fit-content(100px)",
6805       "fit-content(10%)",
6806       "fit-content(calc(3*25px + 50%))",
6807     ],
6808     invalid_values: ["none"],
6809     quirks_values: { 5: "5px" },
6810   },
6811   "min-width": {
6812     domProp: "minWidth",
6813     inherited: false,
6814     type: CSS_TYPE_LONGHAND,
6815     prerequisites: { display: "block" },
6816     initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
6817     other_values: [
6818       "30px",
6819       "50%",
6820       "max-content",
6821       "min-content",
6822       "fit-content",
6823       "stretch",
6824       "-moz-max-content",
6825       "-moz-min-content",
6826       "-moz-fit-content",
6827       "-moz-available",
6828       "-webkit-fill-available",
6829       "calc(-1%)",
6830       "calc(2px)",
6831       "calc(50%)",
6832       "calc(3*25px)",
6833       "calc(25px*3)",
6834       "calc(3*25px + 50%)",
6835       "fit-content(100px)",
6836       "fit-content(10%)",
6837       "fit-content(calc(3*25px + 50%))",
6838     ],
6839     invalid_values: ["none"],
6840     quirks_values: { 5: "5px" },
6841   },
6842   "object-fit": {
6843     domProp: "objectFit",
6844     inherited: false,
6845     type: CSS_TYPE_LONGHAND,
6846     initial_values: ["fill"],
6847     other_values: ["contain", "cover", "none", "scale-down"],
6848     invalid_values: ["auto", "5px", "100%"],
6849   },
6850   "object-position": {
6851     domProp: "objectPosition",
6852     inherited: false,
6853     type: CSS_TYPE_LONGHAND,
6854     initial_values: ["50% 50%", "50%", "center", "center center"],
6855     other_values: [
6856       "calc(20px)",
6857       "calc(20px) 10px",
6858       "10px calc(20px)",
6859       "calc(20px) 25%",
6860       "25% calc(20px)",
6861       "calc(20px) calc(20px)",
6862       "calc(20px + 1em) calc(20px / 2)",
6863       "calc(20px + 50%) calc(50% - 10px)",
6864       "calc(-20px) calc(-50%)",
6865       "calc(-20%) calc(-50%)",
6866       "0px 0px",
6867       "right 20px top 60px",
6868       "right 20px bottom 60px",
6869       "left 20px top 60px",
6870       "left 20px bottom 60px",
6871       "right -50px top -50px",
6872       "left -50px bottom -50px",
6873       "right 20px top -50px",
6874       "right -20px top 50px",
6875       "right 3em bottom 10px",
6876       "bottom 3em right 10px",
6877       "top 3em right 10px",
6878       "left 15px",
6879       "10px top",
6880       "left 20%",
6881       "right 20%",
6882     ],
6883     invalid_values: [
6884       "center 10px center 4px",
6885       "center 10px center",
6886       "top 20%",
6887       "bottom 20%",
6888       "50% left",
6889       "top 50%",
6890       "50% bottom 10%",
6891       "right 10% 50%",
6892       "left right",
6893       "top bottom",
6894       "left 10% right",
6895       "top 20px bottom 20px",
6896       "left left",
6897       "20 20",
6898       "left top 15px",
6899       "left 10px top",
6900     ],
6901   },
6902   offset: {
6903     domProp: "offset",
6904     inherited: false,
6905     type: CSS_TYPE_TRUE_SHORTHAND,
6906     subproperties: [
6907       "offset-path",
6908       "offset-distance",
6909       "offset-rotate",
6910       "offset-anchor",
6911       "offset-position",
6912     ],
6913     initial_values: ["none"],
6914     other_values: [
6915       "none 30deg reverse",
6916       "none 50px reverse 30deg",
6917       "none calc(10px + 20%) auto",
6918       "none reverse",
6919       "none / left center",
6920       "path('M 0 0 H 1') -200% auto",
6921       "path('M 0 0 H 1') -200%",
6922       "path('M 0 0 H 1') 50px",
6923       "path('M 0 0 H 1') auto",
6924       "path('M 0 0 H 1') reverse 30deg 50px",
6925       "path('M 0 0 H 1')",
6926       "path('m 20 0 h 100') -7rad 8px / auto",
6927       "path('m 0 30 v 100') -7rad 8px / left top",
6928       "path('m 0 0 h 100') -7rad 8px",
6929       "path('M 0 0 H 100') 100px 0deg",
6930       "top right / top left",
6931       "top right ray(45deg closest-side)",
6932       "50% 50% ray(0rad farthest-side)",
6933     ],
6934     invalid_values: [
6935       "100px 0deg path('m 0 0 h 100')",
6936       "30deg",
6937       "auto 30deg 100px",
6938       "auto / none",
6939       "none /",
6940       "none / 100px 20px 30deg",
6941       "path('M 20 30 A 60 70 80') bottom",
6942       "path('M 20 30 A 60 70 80') bottom top",
6943       "path('M 20 30 A 60 70 80') 100px 200px",
6944       "path('M 20 30 A 60 70 80') reverse auto",
6945       "path('M 20 30 A 60 70 80') reverse 10px 30deg",
6946       "path('M 20 30 A 60 70 80') /",
6947     ],
6948   },
6949   "offset-anchor": {
6950     domProp: "offsetAnchor",
6951     inherited: false,
6952     type: CSS_TYPE_LONGHAND,
6953     initial_values: ["auto"],
6954     other_values: [
6955       "left bottom",
6956       "center center",
6957       "calc(20% + 10px) center",
6958       "right 30em",
6959       "10px 20%",
6960       "left -10px top -20%",
6961       "right 10% bottom 20em",
6962     ],
6963     invalid_values: ["none", "10deg", "left 10% top"],
6964   },
6965   "offset-distance": {
6966     domProp: "offsetDistance",
6967     inherited: false,
6968     type: CSS_TYPE_LONGHAND,
6969     initial_values: ["0"],
6970     other_values: ["10px", "10%", "190%", "-280%", "calc(30px + 40%)"],
6971     invalid_values: ["none", "45deg"],
6972   },
6973   "offset-path": {
6974     domProp: "offsetPath",
6975     inherited: false,
6976     type: CSS_TYPE_LONGHAND,
6977     initial_values: ["none"],
6978     other_values: [
6979       "ray(0deg)",
6980       "ray(45deg closest-side)",
6981       "ray(0rad farthest-side)",
6982       "ray(0.5turn closest-corner contain)",
6983       "ray(200grad farthest-corner)",
6984       "ray(sides 180deg)",
6985       "ray(contain farthest-side 180deg)",
6986       "ray(calc(180deg - 45deg) farthest-side)",
6987       "ray(0deg at center center)",
6988       "ray(at 10% 10% 1rad)",
6989     ]
6990       .concat(pathValues.other_values)
6991       .concat(basicShapeOtherValues)
6992       .concat(basicShapeXywhRectValues)
6993       .concat(basicShapeShapeValues),
6994     invalid_values: [
6995       "path('')",
6996       "ray(closest-side)",
6997       "ray(0deg, closest-side)",
6998       "ray(contain 0deg closest-side contain)",
6999     ].concat(pathValues.invalid_values),
7000   },
7001   "offset-position": {
7002     domProp: "offsetPosition",
7003     inherited: false,
7004     type: CSS_TYPE_LONGHAND,
7005     initial_values: ["normal"],
7006     other_values: [
7007       "auto",
7008       "left bottom",
7009       "center center",
7010       "calc(20% + 10px) center",
7011       "right 30em",
7012       "10px 20%",
7013       "left -10px top -20%",
7014       "right 10% bottom 20em",
7015     ],
7016     invalid_values: ["none", "10deg", "left 10% top"],
7017   },
7018   "offset-rotate": {
7019     domProp: "offsetRotate",
7020     inherited: false,
7021     type: CSS_TYPE_LONGHAND,
7022     initial_values: ["auto"],
7023     other_values: ["reverse", "0deg", "0rad reverse", "-45deg", "5turn auto"],
7024     invalid_values: ["none", "10px", "reverse 0deg reverse", "reverse auto"],
7025   },
7026   opacity: {
7027     domProp: "opacity",
7028     inherited: false,
7029     type: CSS_TYPE_LONGHAND,
7030     applies_to_first_letter: true,
7031     applies_to_first_line: true,
7032     applies_to_placeholder: true,
7033     applies_to_cue: true,
7034     initial_values: [
7035       "1",
7036       "17",
7037       "397.376",
7038       "3e1",
7039       "3e+1",
7040       "3e0",
7041       "3e+0",
7042       "3e-0",
7043       "300%",
7044     ],
7045     other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"],
7046     invalid_values: ["0px", "1px"],
7047   },
7048   "-moz-orient": {
7049     domProp: "MozOrient",
7050     inherited: false,
7051     type: CSS_TYPE_LONGHAND,
7052     initial_values: ["inline"],
7053     other_values: ["horizontal", "vertical", "block"],
7054     invalid_values: ["none"],
7055   },
7056   outline: {
7057     domProp: "outline",
7058     inherited: false,
7059     type: CSS_TYPE_TRUE_SHORTHAND,
7060     subproperties: ["outline-color", "outline-style", "outline-width"],
7061     initial_values: [
7062       "none",
7063       "medium",
7064       "thin",
7065       // XXX Should be invert, but currently currentcolor.
7066       //"invert", "none medium invert"
7067       "currentColor",
7068       "none medium currentcolor",
7069     ],
7070     other_values: [
7071       "solid",
7072       "medium solid",
7073       "green solid",
7074       "10px solid",
7075       "thick solid",
7076     ],
7077     invalid_values: ["5%", "5", "5 solid green"],
7078   },
7079   "outline-color": {
7080     domProp: "outlineColor",
7081     inherited: false,
7082     type: CSS_TYPE_LONGHAND,
7083     applies_to_cue: true,
7084     prerequisites: { color: "black" },
7085     initial_values: ["currentColor"], // XXX should be invert
7086     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
7087     invalid_values: [
7088       "#0",
7089       "#00",
7090       "#00000",
7091       "#0000000",
7092       "#000000000",
7093       "000000",
7094       "cc00ff",
7095     ],
7096   },
7097   "outline-offset": {
7098     domProp: "outlineOffset",
7099     inherited: false,
7100     type: CSS_TYPE_LONGHAND,
7101     initial_values: [
7102       "0",
7103       "0px",
7104       "-0",
7105       "calc(0px)",
7106       "calc(3em + 2px - 2px - 3em)",
7107       "calc(-0em)",
7108     ],
7109     other_values: [
7110       "-3px",
7111       "1em",
7112       "calc(3em)",
7113       "calc(7pt + 3 * 2em)",
7114       "calc(-3px)",
7115     ],
7116     invalid_values: ["5%"],
7117   },
7118   "outline-style": {
7119     domProp: "outlineStyle",
7120     inherited: false,
7121     type: CSS_TYPE_LONGHAND,
7122     applies_to_cue: true,
7123     // XXX Should 'hidden' be the same as initial?
7124     initial_values: ["none"],
7125     other_values: [
7126       "solid",
7127       "dashed",
7128       "dotted",
7129       "double",
7130       "outset",
7131       "inset",
7132       "groove",
7133       "ridge",
7134       "auto",
7135     ],
7136     invalid_values: [],
7137   },
7138   "outline-width": {
7139     domProp: "outlineWidth",
7140     inherited: false,
7141     type: CSS_TYPE_LONGHAND,
7142     applies_to_cue: true,
7143     prerequisites: { "outline-style": "solid" },
7144     initial_values: ["medium", "3px", "calc(4px - 1px)"],
7145     other_values: [
7146       "thin",
7147       "thick",
7148       "1px",
7149       "2em",
7150       "calc(2px)",
7151       "calc(-2px)",
7152       "calc(0px)",
7153       "calc(0px)",
7154       "calc(5em)",
7155       "calc(3*25px)",
7156       "calc(25px*3)",
7157       "calc(3*25px + 5em)",
7158     ],
7159     invalid_values: ["5%", "5"],
7160   },
7161   overflow: {
7162     domProp: "overflow",
7163     inherited: false,
7164     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
7165     prerequisites: { display: "block", contain: "none" },
7166     subproperties: ["overflow-x", "overflow-y"],
7167     initial_values: ["visible"],
7168     other_values: [
7169       "auto",
7170       "scroll",
7171       "hidden",
7172       "clip",
7173       "auto auto",
7174       "auto scroll",
7175       "hidden scroll",
7176       "auto hidden",
7177       "clip clip",
7178       "overlay",
7179       "overlay overlay",
7180     ],
7181     invalid_values: [
7182       "clip -moz-scrollbars-none",
7183       "-moz-scrollbars-none",
7184       "-moz-scrollbars-horizontal",
7185       "-moz-scrollbars-vertical",
7186     ],
7187   },
7188   "overflow-x": {
7189     domProp: "overflowX",
7190     inherited: false,
7191     type: CSS_TYPE_LONGHAND,
7192     // No applies_to_placeholder because we have a !important rule in forms.css.
7193     prerequisites: {
7194       display: "block",
7195       "overflow-y": "visible",
7196       contain: "none",
7197     },
7198     initial_values: ["visible"],
7199     other_values: ["auto", "scroll", "hidden", "clip", "overlay"],
7200     invalid_values: [],
7201   },
7202   "overflow-y": {
7203     domProp: "overflowY",
7204     inherited: false,
7205     type: CSS_TYPE_LONGHAND,
7206     // No applies_to_placeholder because we have a !important rule in forms.css.
7207     prerequisites: {
7208       display: "block",
7209       "overflow-x": "visible",
7210       contain: "none",
7211     },
7212     initial_values: ["visible"],
7213     other_values: ["auto", "scroll", "hidden", "clip", "overlay"],
7214     invalid_values: [],
7215   },
7216   "overflow-inline": {
7217     domProp: "overflowInline",
7218     inherited: false,
7219     type: CSS_TYPE_LONGHAND,
7220     logical: true,
7221     // No applies_to_placeholder because we have a !important rule in forms.css.
7222     prerequisites: {
7223       display: "block",
7224       "overflow-block": "visible",
7225       contain: "none",
7226     },
7227     initial_values: ["visible"],
7228     other_values: ["auto", "scroll", "hidden", "clip"],
7229     invalid_values: [],
7230   },
7231   "overflow-block": {
7232     domProp: "overflowBlock",
7233     inherited: false,
7234     type: CSS_TYPE_LONGHAND,
7235     logical: true,
7236     // No applies_to_placeholder because we have a !important rule in forms.css.
7237     prerequisites: {
7238       display: "block",
7239       "overflow-inline": "visible",
7240       contain: "none",
7241     },
7242     initial_values: ["visible"],
7243     other_values: ["auto", "scroll", "hidden", "clip"],
7244     invalid_values: [],
7245   },
7246   "overflow-clip-margin": {
7247     domProp: "overflowClipMargin",
7248     inherited: false,
7249     type: CSS_TYPE_LONGHAND,
7250     initial_values: ["0px"],
7251     other_values: ["1px", "2em", "calc(10px + 1vh)"],
7252     invalid_values: ["-10px"],
7253   },
7254   padding: {
7255     domProp: "padding",
7256     inherited: false,
7257     type: CSS_TYPE_TRUE_SHORTHAND,
7258     subproperties: [
7259       "padding-top",
7260       "padding-right",
7261       "padding-bottom",
7262       "padding-left",
7263     ],
7264     initial_values: [
7265       "0",
7266       "0px 0 0em",
7267       "0% 0px 0em 0pt",
7268       "calc(0px) calc(0em) calc(-2px) calc(-1%)",
7269     ],
7270     other_values: ["3px 0", "2em 4px 2pt", "1em 2em 3px 4px"],
7271     invalid_values: ["1px calc(nonsense)", "1px red", "-1px"],
7272     unbalanced_values: ["1px calc("],
7273     quirks_values: { 5: "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
7274   },
7275   "padding-block": {
7276     domProp: "paddingBlock",
7277     inherited: false,
7278     type: CSS_TYPE_TRUE_SHORTHAND,
7279     subproperties: ["padding-block-start", "padding-block-end"],
7280     initial_values: ["0", "0px 0em"],
7281     other_values: ["3px 0", "2% 4px", "1em", "calc(1px) calc(-1%)"],
7282     invalid_values: ["1px calc(nonsense)", "1px red", "-1px", "auto", "none"],
7283     unbalanced_values: ["1px calc("],
7284   },
7285   "padding-inline": {
7286     domProp: "paddingInline",
7287     inherited: false,
7288     type: CSS_TYPE_TRUE_SHORTHAND,
7289     subproperties: ["padding-inline-start", "padding-inline-end"],
7290     initial_values: ["0", "0px 0em"],
7291     other_values: ["3px 0", "2% 4px", "1em", "calc(1px) calc(-1%)"],
7292     invalid_values: ["1px calc(nonsense)", "1px red", "-1px", "auto", "none"],
7293     unbalanced_values: ["1px calc("],
7294   },
7295   "padding-bottom": {
7296     domProp: "paddingBottom",
7297     inherited: false,
7298     type: CSS_TYPE_LONGHAND,
7299     applies_to_first_letter: true,
7300     // No applies_to_placeholder because we have a !important rule in forms.css.
7301     initial_values: [
7302       "0",
7303       "0px",
7304       "0%",
7305       "calc(0pt)",
7306       "calc(0% + 0px)",
7307       "calc(-3px)",
7308       "calc(-1%)",
7309     ],
7310     other_values: [
7311       "1px",
7312       "2em",
7313       "5%",
7314       "calc(2px)",
7315       "calc(50%)",
7316       "calc(3*25px)",
7317       "calc(25px*3)",
7318       "calc(3*25px + 50%)",
7319     ],
7320     invalid_values: [],
7321     quirks_values: { 5: "5px" },
7322   },
7323   "padding-left": {
7324     domProp: "paddingLeft",
7325     inherited: false,
7326     type: CSS_TYPE_LONGHAND,
7327     applies_to_first_letter: true,
7328     // No applies_to_placeholder because we have a !important rule in forms.css.
7329     initial_values: [
7330       "0",
7331       "0px",
7332       "0%",
7333       "calc(0pt)",
7334       "calc(0% + 0px)",
7335       "calc(-3px)",
7336       "calc(-1%)",
7337     ],
7338     other_values: [
7339       "1px",
7340       "2em",
7341       "5%",
7342       "calc(2px)",
7343       "calc(50%)",
7344       "calc(3*25px)",
7345       "calc(25px*3)",
7346       "calc(3*25px + 50%)",
7347     ],
7348     invalid_values: [],
7349     quirks_values: { 5: "5px" },
7350   },
7351   "padding-right": {
7352     domProp: "paddingRight",
7353     inherited: false,
7354     type: CSS_TYPE_LONGHAND,
7355     applies_to_first_letter: true,
7356     // No applies_to_placeholder because we have a !important rule in forms.css.
7357     initial_values: [
7358       "0",
7359       "0px",
7360       "0%",
7361       "calc(0pt)",
7362       "calc(0% + 0px)",
7363       "calc(-3px)",
7364       "calc(-1%)",
7365     ],
7366     other_values: [
7367       "1px",
7368       "2em",
7369       "5%",
7370       "calc(2px)",
7371       "calc(50%)",
7372       "calc(3*25px)",
7373       "calc(25px*3)",
7374       "calc(3*25px + 50%)",
7375     ],
7376     invalid_values: [],
7377     quirks_values: { 5: "5px" },
7378   },
7379   "padding-top": {
7380     domProp: "paddingTop",
7381     inherited: false,
7382     type: CSS_TYPE_LONGHAND,
7383     applies_to_first_letter: true,
7384     // No applies_to_placeholder because we have a !important rule in forms.css.
7385     initial_values: [
7386       "0",
7387       "0px",
7388       "0%",
7389       "calc(0pt)",
7390       "calc(0% + 0px)",
7391       "calc(-3px)",
7392       "calc(-1%)",
7393     ],
7394     other_values: [
7395       "1px",
7396       "2em",
7397       "5%",
7398       "calc(2px)",
7399       "calc(50%)",
7400       "calc(3*25px)",
7401       "calc(25px*3)",
7402       "calc(3*25px + 50%)",
7403     ],
7404     invalid_values: [],
7405     quirks_values: { 5: "5px" },
7406   },
7407   "page-break-after": {
7408     domProp: "pageBreakAfter",
7409     inherited: false,
7410     type: CSS_TYPE_LEGACY_SHORTHAND,
7411     alias_for: "break-after",
7412     subproperties: ["break-after"],
7413     initial_values: ["auto"],
7414     other_values: ["always", "avoid", "left", "right"],
7415     legacy_mapping: {
7416       always: "page",
7417     },
7418     invalid_values: ["page", "column"],
7419   },
7420   "page-break-before": {
7421     domProp: "pageBreakBefore",
7422     inherited: false,
7423     type: CSS_TYPE_LEGACY_SHORTHAND,
7424     alias_for: "break-before",
7425     subproperties: ["break-before"],
7426     initial_values: ["auto"],
7427     other_values: ["always", "avoid", "left", "right"],
7428     legacy_mapping: {
7429       always: "page",
7430     },
7431     invalid_values: ["page", "column"],
7432   },
7433   "break-after": {
7434     domProp: "breakAfter",
7435     inherited: false,
7436     type: CSS_TYPE_LONGHAND,
7437     initial_values: ["auto"],
7438     other_values: ["always", "page", "avoid", "left", "right"],
7439     invalid_values: [],
7440   },
7441   "break-before": {
7442     domProp: "breakBefore",
7443     inherited: false,
7444     type: CSS_TYPE_LONGHAND,
7445     initial_values: ["auto"],
7446     other_values: ["always", "page", "avoid", "left", "right"],
7447     invalid_values: [],
7448   },
7449   "break-inside": {
7450     domProp: "breakInside",
7451     inherited: false,
7452     type: CSS_TYPE_LONGHAND,
7453     initial_values: ["auto"],
7454     other_values: ["avoid", "avoid-page", "avoid-column"],
7455     invalid_values: ["left", "right", "always"],
7456   },
7457   "page-break-inside": {
7458     domProp: "pageBreakInside",
7459     inherited: false,
7460     type: CSS_TYPE_LEGACY_SHORTHAND,
7461     alias_for: "break-inside",
7462     subproperties: ["break-inside"],
7463     initial_values: ["auto"],
7464     other_values: ["avoid"],
7465     invalid_values: ["avoid-page", "avoid-column"],
7466   },
7467   "paint-order": {
7468     domProp: "paintOrder",
7469     inherited: true,
7470     type: CSS_TYPE_LONGHAND,
7471     applies_to_first_letter: true,
7472     applies_to_first_line: true,
7473     initial_values: ["normal"],
7474     other_values: [
7475       "fill",
7476       "fill stroke",
7477       "fill stroke markers",
7478       "stroke markers fill",
7479     ],
7480     invalid_values: ["fill stroke markers fill", "fill normal"],
7481   },
7482   "pointer-events": {
7483     domProp: "pointerEvents",
7484     inherited: true,
7485     type: CSS_TYPE_LONGHAND,
7486     // No applies_to_placeholder because we have a !important rule in forms.css.
7487     initial_values: ["auto"],
7488     other_values: [
7489       "visiblePainted",
7490       "visibleFill",
7491       "visibleStroke",
7492       "visible",
7493       "painted",
7494       "fill",
7495       "stroke",
7496       "all",
7497       "none",
7498     ],
7499     invalid_values: [],
7500   },
7501   position: {
7502     domProp: "position",
7503     inherited: false,
7504     type: CSS_TYPE_LONGHAND,
7505     initial_values: ["static"],
7506     other_values: ["relative", "absolute", "fixed", "sticky"],
7507     invalid_values: [],
7508   },
7509   quotes: {
7510     domProp: "quotes",
7511     inherited: true,
7512     type: CSS_TYPE_LONGHAND,
7513     initial_values: ["auto"],
7514     other_values: [
7515       "none",
7516       "'\"' '\"'",
7517       "'' ''",
7518       '"\u201C" "\u201D" "\u2018" "\u2019"',
7519       '"\\201C" "\\201D" "\\2018" "\\2019"',
7520     ],
7521     invalid_values: ["'\"'", '"" "" ""'],
7522   },
7523   right: {
7524     domProp: "right",
7525     inherited: false,
7526     type: CSS_TYPE_LONGHAND,
7527     /* FIXME: run tests with multiple prerequisites */
7528     prerequisites: { position: "relative" },
7529     /* XXX 0 may or may not be equal to auto */
7530     initial_values: ["auto"],
7531     other_values: [
7532       "32px",
7533       "-3em",
7534       "12%",
7535       "calc(2px)",
7536       "calc(-2px)",
7537       "calc(50%)",
7538       "calc(3*25px)",
7539       "calc(25px*3)",
7540       "calc(3*25px + 50%)",
7541     ],
7542     invalid_values: [],
7543     quirks_values: { 5: "5px" },
7544   },
7545   "ruby-align": {
7546     domProp: "rubyAlign",
7547     inherited: true,
7548     type: CSS_TYPE_LONGHAND,
7549     initial_values: ["space-around"],
7550     other_values: ["start", "center", "space-between"],
7551     invalid_values: ["end", "1", "10px", "50%", "start center"],
7552   },
7553   "ruby-position": {
7554     domProp: "rubyPosition",
7555     inherited: true,
7556     type: CSS_TYPE_LONGHAND,
7557     applies_to_cue: true,
7558     initial_values: ["alternate", "alternate over", "over alternate"],
7559     other_values: ["over", "under", "alternate under", "under alternate"],
7560     invalid_values: [
7561       "left",
7562       "right",
7563       "auto",
7564       "none",
7565       "not_a_position",
7566       "over left",
7567       "right under",
7568       "over under",
7569       "alternate alternate",
7570       "0",
7571       "100px",
7572       "50%",
7573     ],
7574   },
7575   "scroll-behavior": {
7576     domProp: "scrollBehavior",
7577     inherited: false,
7578     type: CSS_TYPE_LONGHAND,
7579     initial_values: ["auto"],
7580     other_values: ["smooth"],
7581     invalid_values: ["none", "1px"],
7582   },
7583   "scroll-snap-stop": {
7584     domProp: "scrollSnapStop",
7585     inherited: false,
7586     type: CSS_TYPE_LONGHAND,
7587     initial_values: ["normal"],
7588     other_values: ["always"],
7589     invalid_values: ["auto", "none", "1px"],
7590   },
7591   "scroll-snap-type": {
7592     domProp: "scrollSnapType",
7593     inherited: false,
7594     type: CSS_TYPE_LONGHAND,
7595     initial_values: ["none"],
7596     other_values: [
7597       "both mandatory",
7598       "y mandatory",
7599       "inline proximity",
7600       "both",
7601       "x",
7602       "y",
7603       "block",
7604       "inline",
7605     ],
7606     invalid_values: [
7607       "auto",
7608       "1px",
7609       "x y",
7610       "block mandatory inline",
7611       "mandatory",
7612       "proximity",
7613       "mandatory inline",
7614       "proximity both",
7615       "mandatory x",
7616       "proximity y",
7617       "mandatory block",
7618       "proximity mandatory",
7619     ],
7620   },
7621   "scroll-snap-align": {
7622     domProp: "scrollSnapAlign",
7623     inherited: false,
7624     type: CSS_TYPE_LONGHAND,
7625     initial_values: ["none"],
7626     other_values: [
7627       "start",
7628       "end",
7629       "center",
7630       "start none",
7631       "center end",
7632       "start start",
7633     ],
7634     invalid_values: ["auto", "start invalid", "start end center"],
7635   },
7636   "scroll-margin": {
7637     domProp: "scrollMargin",
7638     inherited: false,
7639     type: CSS_TYPE_TRUE_SHORTHAND,
7640     subproperties: [
7641       "scroll-margin-top",
7642       "scroll-margin-right",
7643       "scroll-margin-bottom",
7644       "scroll-margin-left",
7645     ],
7646     initial_values: ["0"],
7647     other_values: [
7648       "-10px",
7649       "calc(2em + 3ex)",
7650       "1px 2px",
7651       "1px 2px 3px",
7652       "1px 2px 3px 4px",
7653     ],
7654     invalid_values: ["auto", "20%", "-30%", "1px 2px 3px 4px 5px"],
7655   },
7656   "scroll-margin-top": {
7657     domProp: "scrollMarginTop",
7658     inherited: false,
7659     type: CSS_TYPE_LONGHAND,
7660     initial_values: ["0"],
7661     other_values: ["-10px", "calc(2em + 3ex)"],
7662     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7663   },
7664   "scroll-margin-right": {
7665     domProp: "scrollMarginRight",
7666     inherited: false,
7667     type: CSS_TYPE_LONGHAND,
7668     initial_values: ["0"],
7669     other_values: ["-10px", "calc(2em + 3ex)"],
7670     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7671   },
7672   "scroll-margin-bottom": {
7673     domProp: "scrollMarginBottom",
7674     inherited: false,
7675     type: CSS_TYPE_LONGHAND,
7676     initial_values: ["0"],
7677     other_values: ["-10px", "calc(2em + 3ex)"],
7678     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7679   },
7680   "scroll-margin-left": {
7681     domProp: "scrollMarginLeft",
7682     inherited: false,
7683     type: CSS_TYPE_LONGHAND,
7684     initial_values: ["0"],
7685     other_values: ["-10px", "calc(2em + 3ex)"],
7686     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7687   },
7688   "scroll-margin-inline": {
7689     domProp: "scrollMarginInline",
7690     inherited: false,
7691     type: CSS_TYPE_TRUE_SHORTHAND,
7692     subproperties: ["scroll-margin-inline-start", "scroll-margin-inline-end"],
7693     initial_values: ["0"],
7694     other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
7695     invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
7696   },
7697   "scroll-margin-inline-start": {
7698     domProp: "scrollMarginInlineStart",
7699     inherited: false,
7700     type: CSS_TYPE_LONGHAND,
7701     logical: true,
7702     initial_values: ["0"],
7703     other_values: ["-10px", "calc(2em + 3ex)"],
7704     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7705   },
7706   "scroll-margin-inline-end": {
7707     domProp: "scrollMarginInlineEnd",
7708     inherited: false,
7709     type: CSS_TYPE_LONGHAND,
7710     logical: true,
7711     initial_values: ["0"],
7712     other_values: ["-10px", "calc(2em + 3ex)"],
7713     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7714   },
7715   "scroll-margin-block": {
7716     domProp: "scrollMarginBlock",
7717     inherited: false,
7718     type: CSS_TYPE_TRUE_SHORTHAND,
7719     subproperties: ["scroll-margin-block-start", "scroll-margin-block-end"],
7720     initial_values: ["0"],
7721     other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
7722     invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
7723   },
7724   "scroll-margin-block-start": {
7725     domProp: "scrollMarginBlockStart",
7726     inherited: false,
7727     type: CSS_TYPE_LONGHAND,
7728     logical: true,
7729     initial_values: ["0"],
7730     other_values: ["-10px", "calc(2em + 3ex)"],
7731     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7732   },
7733   "scroll-margin-block-end": {
7734     domProp: "scrollMarginBlockEnd",
7735     inherited: false,
7736     type: CSS_TYPE_LONGHAND,
7737     logical: true,
7738     initial_values: ["0"],
7739     other_values: ["-10px", "calc(2em + 3ex)"],
7740     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7741   },
7742   "scroll-padding": {
7743     domProp: "scrollPadding",
7744     inherited: false,
7745     type: CSS_TYPE_TRUE_SHORTHAND,
7746     subproperties: [
7747       "scroll-padding-top",
7748       "scroll-padding-right",
7749       "scroll-padding-bottom",
7750       "scroll-padding-left",
7751     ],
7752     initial_values: ["auto"],
7753     other_values: [
7754       "10px",
7755       "0",
7756       "20%",
7757       "calc(2em + 3ex)",
7758       "1px 2px",
7759       "1px 2px 3%",
7760       "1px 2px 3% 4px",
7761       "1px auto",
7762     ],
7763     invalid_values: ["20", "-20px"],
7764   },
7765   "scroll-padding-top": {
7766     domProp: "scrollPaddingTop",
7767     inherited: false,
7768     type: CSS_TYPE_LONGHAND,
7769     initial_values: ["auto"],
7770     other_values: [
7771       "0",
7772       "10px",
7773       "20%",
7774       "calc(2em + 3ex)",
7775       "calc(50% + 60px)",
7776       "calc(-50px)",
7777     ],
7778     invalid_values: ["20", "-20px"],
7779   },
7780   "scroll-padding-right": {
7781     domProp: "scrollPaddingRight",
7782     inherited: false,
7783     type: CSS_TYPE_LONGHAND,
7784     initial_values: ["auto"],
7785     other_values: [
7786       "0",
7787       "10px",
7788       "20%",
7789       "calc(2em + 3ex)",
7790       "calc(50% + 60px)",
7791       "calc(-50px)",
7792     ],
7793     invalid_values: ["20", "-20px"],
7794   },
7795   "scroll-padding-bottom": {
7796     domProp: "scrollPaddingBottom",
7797     inherited: false,
7798     type: CSS_TYPE_LONGHAND,
7799     initial_values: ["auto"],
7800     other_values: [
7801       "0",
7802       "10px",
7803       "20%",
7804       "calc(2em + 3ex)",
7805       "calc(50% + 60px)",
7806       "calc(-50px)",
7807     ],
7808     invalid_values: ["20", "-20px"],
7809   },
7810   "scroll-padding-left": {
7811     domProp: "scrollPaddingLeft",
7812     inherited: false,
7813     type: CSS_TYPE_LONGHAND,
7814     initial_values: ["auto"],
7815     other_values: [
7816       "0",
7817       "10px",
7818       "20%",
7819       "calc(2em + 3ex)",
7820       "calc(50% + 60px)",
7821       "calc(-50px)",
7822     ],
7823     invalid_values: ["20", "-20px"],
7824   },
7825   "scroll-padding-inline": {
7826     domProp: "scrollPaddingInline",
7827     inherited: false,
7828     type: CSS_TYPE_TRUE_SHORTHAND,
7829     subproperties: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
7830     initial_values: ["auto", "auto auto"],
7831     other_values: [
7832       "10px",
7833       "0",
7834       "20%",
7835       "calc(2em + 3ex)",
7836       "1px 2px",
7837       "1px auto",
7838     ],
7839     invalid_values: ["20", "-20px"],
7840   },
7841   "scroll-padding-inline-start": {
7842     domProp: "scrollPaddingInlineStart",
7843     inherited: false,
7844     type: CSS_TYPE_LONGHAND,
7845     logical: true,
7846     initial_values: ["auto"],
7847     other_values: [
7848       "0",
7849       "10px",
7850       "20%",
7851       "calc(2em + 3ex)",
7852       "calc(50% + 60px)",
7853       "calc(-50px)",
7854     ],
7855     invalid_values: ["20", "-20px"],
7856   },
7857   "scroll-padding-inline-end": {
7858     domProp: "scrollPaddingInlineEnd",
7859     inherited: false,
7860     type: CSS_TYPE_LONGHAND,
7861     logical: true,
7862     initial_values: ["auto"],
7863     other_values: [
7864       "0",
7865       "10px",
7866       "20%",
7867       "calc(2em + 3ex)",
7868       "calc(50% + 60px)",
7869       "calc(-50px)",
7870     ],
7871     invalid_values: ["20", "-20px"],
7872   },
7873   "scroll-padding-block": {
7874     domProp: "scrollPaddingBlock",
7875     inherited: false,
7876     type: CSS_TYPE_TRUE_SHORTHAND,
7877     subproperties: ["scroll-padding-block-start", "scroll-padding-block-end"],
7878     initial_values: ["auto", "auto auto"],
7879     other_values: [
7880       "10px",
7881       "0",
7882       "20%",
7883       "calc(2em + 3ex)",
7884       "1px 2px",
7885       "1px auto",
7886     ],
7887     invalid_values: ["20", "-20px"],
7888   },
7889   "scroll-padding-block-start": {
7890     domProp: "scrollPaddingBlockStart",
7891     inherited: false,
7892     type: CSS_TYPE_LONGHAND,
7893     logical: true,
7894     initial_values: ["auto"],
7895     other_values: [
7896       "0",
7897       "10px",
7898       "20%",
7899       "calc(2em + 3ex)",
7900       "calc(50% + 60px)",
7901       "calc(-50px)",
7902     ],
7903     invalid_values: ["20", "-20px"],
7904   },
7905   "scroll-padding-block-end": {
7906     domProp: "scrollPaddingBlockEnd",
7907     inherited: false,
7908     type: CSS_TYPE_LONGHAND,
7909     logical: true,
7910     initial_values: ["auto"],
7911     other_values: [
7912       "0",
7913       "10px",
7914       "20%",
7915       "calc(2em + 3ex)",
7916       "calc(50% + 60px)",
7917       "calc(-50px)",
7918     ],
7919     invalid_values: ["20", "-20px"],
7920   },
7921   "table-layout": {
7922     domProp: "tableLayout",
7923     inherited: false,
7924     type: CSS_TYPE_LONGHAND,
7925     initial_values: ["auto"],
7926     other_values: ["fixed"],
7927     invalid_values: [],
7928   },
7929   "text-align": {
7930     domProp: "textAlign",
7931     inherited: true,
7932     type: CSS_TYPE_LONGHAND,
7933     applies_to_placeholder: true,
7934     // don't know whether left and right are same as start
7935     initial_values: ["start"],
7936     other_values: [
7937       "center",
7938       "justify",
7939       "end",
7940       "match-parent",
7941       // At least -webkit-center is needed for compat, see bug 1899042.
7942       "-moz-center",
7943       "-webkit-center",
7944       "-moz-left",
7945       "-webkit-left",
7946       "-moz-right",
7947       "-webkit-right",
7948     ],
7949     invalid_values: [
7950       "true",
7951       "true true",
7952       "char",
7953       "-moz-center-or-inherit",
7954       "true left",
7955       "unsafe left",
7956     ],
7957   },
7958   "text-align-last": {
7959     domProp: "textAlignLast",
7960     inherited: true,
7961     type: CSS_TYPE_LONGHAND,
7962     initial_values: ["auto"],
7963     other_values: ["center", "justify", "start", "end", "left", "right"],
7964     invalid_values: [],
7965   },
7966   "text-combine-upright": {
7967     domProp: "textCombineUpright",
7968     inherited: true,
7969     type: CSS_TYPE_LONGHAND,
7970     applies_to_cue: true,
7971     applies_to_marker: true,
7972     initial_values: ["none"],
7973     other_values: ["all"],
7974     invalid_values: [
7975       "auto",
7976       "all 2",
7977       "none all",
7978       "digits -3",
7979       "digits 0",
7980       "digits 12",
7981       "none 3",
7982       "digits 3.1415",
7983       "digits3",
7984       "digits 1",
7985       "digits 3 all",
7986       "digits foo",
7987       "digits all",
7988       "digits 3.0",
7989     ],
7990   },
7991   "text-decoration": {
7992     domProp: "textDecoration",
7993     inherited: false,
7994     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
7995     applies_to_first_letter: true,
7996     applies_to_first_line: true,
7997     applies_to_placeholder: true,
7998     applies_to_cue: true,
7999     subproperties: [
8000       "text-decoration-color",
8001       "text-decoration-line",
8002       "text-decoration-style",
8003       "text-decoration-thickness",
8004     ],
8005     initial_values: ["none"],
8006     other_values: [
8007       "underline",
8008       "overline",
8009       "line-through",
8010       "blink",
8011       "blink line-through underline",
8012       "underline overline line-through blink",
8013       "underline red solid",
8014       "underline #ff0000",
8015       "solid underline",
8016       "red underline",
8017       "#ff0000 underline",
8018       "dotted underline",
8019       "solid underline 50px",
8020       "underline 50px blue",
8021       "50px dotted line-through purple",
8022       "overline 2em",
8023       "underline from-font",
8024       "red from-font overline",
8025       "5% underline blue",
8026       "dotted line-through 25%",
8027     ],
8028     invalid_values: [
8029       "none none",
8030       "underline none",
8031       "none underline",
8032       "blink none",
8033       "none blink",
8034       "line-through blink line-through",
8035       "underline overline line-through blink none",
8036       "underline overline line-throuh blink blink",
8037       "rgb(0, rubbish, 0) underline",
8038       "from font blue underline",
8039     ],
8040   },
8041   "text-decoration-color": {
8042     domProp: "textDecorationColor",
8043     inherited: false,
8044     type: CSS_TYPE_LONGHAND,
8045     applies_to_first_letter: true,
8046     applies_to_first_line: true,
8047     applies_to_placeholder: true,
8048     applies_to_cue: true,
8049     prerequisites: { color: "black" },
8050     initial_values: ["currentColor"],
8051     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
8052     invalid_values: [
8053       "#0",
8054       "#00",
8055       "#00000",
8056       "#0000000",
8057       "#000000000",
8058       "000000",
8059       "ff00ff",
8060     ],
8061   },
8062   "text-decoration-line": {
8063     domProp: "textDecorationLine",
8064     inherited: false,
8065     type: CSS_TYPE_LONGHAND,
8066     applies_to_first_letter: true,
8067     applies_to_first_line: true,
8068     applies_to_placeholder: true,
8069     applies_to_cue: true,
8070     initial_values: ["none"],
8071     other_values: [
8072       "underline",
8073       "overline",
8074       "line-through",
8075       "blink",
8076       "blink line-through underline",
8077       "underline overline line-through blink",
8078     ],
8079     invalid_values: [
8080       "none none",
8081       "underline none",
8082       "none underline",
8083       "line-through blink line-through",
8084       "underline overline line-through blink none",
8085       "underline overline line-throuh blink blink",
8086     ],
8087   },
8088   "text-decoration-style": {
8089     domProp: "textDecorationStyle",
8090     inherited: false,
8091     type: CSS_TYPE_LONGHAND,
8092     applies_to_first_letter: true,
8093     applies_to_first_line: true,
8094     applies_to_placeholder: true,
8095     applies_to_cue: true,
8096     initial_values: ["solid"],
8097     other_values: ["double", "dotted", "dashed", "wavy", "-moz-none"],
8098     invalid_values: [
8099       "none",
8100       "groove",
8101       "ridge",
8102       "inset",
8103       "outset",
8104       "solid dashed",
8105       "wave",
8106     ],
8107   },
8108   "text-decoration-thickness": {
8109     domProp: "textDecorationThickness",
8110     inherited: false,
8111     type: CSS_TYPE_LONGHAND,
8112     applies_to_first_letter: true,
8113     applies_to_first_line: true,
8114     applies_to_placeholder: true,
8115     applies_to_cue: true,
8116     initial_values: ["auto"],
8117     other_values: [
8118       "from-font",
8119       "0",
8120       "-14px",
8121       "25px",
8122       "100em",
8123       "-45em",
8124       "43%",
8125       "-10%",
8126     ],
8127     invalid_values: ["13", "-25", "rubbish", ",./!@#$", "from font"],
8128   },
8129   "text-decoration-skip-ink": {
8130     domProp: "textDecorationSkipInk",
8131     inherited: true,
8132     type: CSS_TYPE_LONGHAND,
8133     applies_to_first_letter: true,
8134     applies_to_first_line: true,
8135     applies_to_placeholder: true,
8136     initial_values: ["auto"],
8137     other_values: ["none", "all"],
8138     invalid_values: [
8139       "13",
8140       "15%",
8141       "-1",
8142       "0",
8143       "otto",
8144       "trash",
8145       "non",
8146       "nada",
8147       "!@#$%^",
8148       "none auto",
8149       "auto none",
8150     ],
8151   },
8152   "text-underline-offset": {
8153     domProp: "textUnderlineOffset",
8154     inherited: true,
8155     type: CSS_TYPE_LONGHAND,
8156     applies_to_first_letter: true,
8157     applies_to_first_line: true,
8158     applies_to_placeholder: true,
8159     initial_values: ["auto"],
8160     other_values: ["0", "-14px", "25px", "100em", "-45em", "43%", "-10%"],
8161     invalid_values: [
8162       "13",
8163       "-25",
8164       "rubbish",
8165       ",./!@#$",
8166       "from-font",
8167       "from font",
8168     ],
8169   },
8170   "text-underline-position": {
8171     domProp: "textUnderlinePosition",
8172     inherited: true,
8173     type: CSS_TYPE_LONGHAND,
8174     applies_to_first_letter: true,
8175     applies_to_first_line: true,
8176     applies_to_placeholder: true,
8177     initial_values: ["auto"],
8178     other_values: [
8179       "under",
8180       "left",
8181       "right",
8182       "left under",
8183       "under left",
8184       "right under",
8185       "under right",
8186       "from-font",
8187       "from-font left",
8188       "from-font right",
8189       "left from-font",
8190       "right from-font",
8191     ],
8192     invalid_values: [
8193       "none",
8194       "auto from-font",
8195       "auto under",
8196       "under from-font",
8197       "left right",
8198       "right auto",
8199       "0",
8200       "1px",
8201       "10%",
8202       "from font",
8203     ],
8204   },
8205   "text-emphasis": {
8206     domProp: "textEmphasis",
8207     inherited: true,
8208     type: CSS_TYPE_TRUE_SHORTHAND,
8209     prerequisites: { color: "black" },
8210     subproperties: ["text-emphasis-style", "text-emphasis-color"],
8211     initial_values: [
8212       "none currentColor",
8213       "currentColor none",
8214       "none",
8215       "currentColor",
8216       "none black",
8217     ],
8218     other_values: [
8219       "filled dot black",
8220       "#f00 circle open",
8221       "sesame filled rgba(0,0,255,0.5)",
8222       "red",
8223       "green none",
8224       "currentColor filled",
8225       "currentColor open",
8226     ],
8227     invalid_values: [
8228       "filled black dot",
8229       "filled filled red",
8230       "open open circle #000",
8231       "circle dot #f00",
8232       "rubbish",
8233     ],
8234   },
8235   "text-emphasis-color": {
8236     domProp: "textEmphasisColor",
8237     inherited: true,
8238     type: CSS_TYPE_LONGHAND,
8239     prerequisites: { color: "black" },
8240     initial_values: ["currentColor", "black", "rgb(0,0,0)"],
8241     other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
8242     invalid_values: [
8243       "#0",
8244       "#00",
8245       "#00000",
8246       "#0000000",
8247       "#000000000",
8248       "000000",
8249       "ff00ff",
8250       "rgb(255,xxx,255)",
8251     ],
8252   },
8253   "text-emphasis-position": {
8254     domProp: "textEmphasisPosition",
8255     inherited: true,
8256     type: CSS_TYPE_LONGHAND,
8257     initial_values: ["auto"],
8258     other_values: [
8259       "over right",
8260       "right over",
8261       "over",
8262       "over left",
8263       "left over",
8264       "under left",
8265       "left under",
8266       "under right",
8267       "right under",
8268       "under",
8269     ],
8270     invalid_values: [
8271       "auto auto",
8272       "auto over",
8273       "auto right",
8274       "left auto",
8275       "left right",
8276       "over under right",
8277       "over over",
8278       "left left",
8279       "over right left",
8280       "rubbish left",
8281       "over rubbish",
8282     ],
8283   },
8284   "text-emphasis-style": {
8285     domProp: "textEmphasisStyle",
8286     inherited: true,
8287     type: CSS_TYPE_LONGHAND,
8288     initial_values: ["none"],
8289     other_values: [
8290       "filled",
8291       "open",
8292       "dot",
8293       "circle",
8294       "double-circle",
8295       "triangle",
8296       "sesame",
8297       "'#'",
8298       "filled dot",
8299       "filled circle",
8300       "filled double-circle",
8301       "filled triangle",
8302       "filled sesame",
8303       "dot filled",
8304       "circle filled",
8305       "double-circle filled",
8306       "triangle filled",
8307       "sesame filled",
8308       "dot open",
8309       "circle open",
8310       "double-circle open",
8311       "triangle open",
8312       "sesame open",
8313     ],
8314     invalid_values: [
8315       "rubbish",
8316       "dot rubbish",
8317       "rubbish dot",
8318       "open rubbish",
8319       "rubbish open",
8320       "open filled",
8321       "dot circle",
8322       "open '#'",
8323       "'#' filled",
8324       "dot '#'",
8325       "'#' circle",
8326       "1",
8327       "1 open",
8328       "open 1",
8329     ],
8330   },
8331   "text-indent": {
8332     domProp: "textIndent",
8333     inherited: true,
8334     type: CSS_TYPE_LONGHAND,
8335     initial_values: ["0", "calc(3em - 5em + 2px + 2em - 2px)"],
8336     other_values: [
8337       "2em",
8338       "5%",
8339       "-10px",
8340       "calc(2px)",
8341       "calc(-2px)",
8342       "calc(50%)",
8343       "calc(3*25px)",
8344       "calc(25px*3)",
8345       "calc(3*25px + 50%)",
8346     ],
8347     invalid_values: [],
8348     quirks_values: { 5: "5px" },
8349   },
8350   "text-overflow": {
8351     domProp: "textOverflow",
8352     inherited: false,
8353     type: CSS_TYPE_LONGHAND,
8354     applies_to_placeholder: true,
8355     initial_values: ["clip"],
8356     other_values: [
8357       "ellipsis",
8358       '""',
8359       "''",
8360       '"hello"',
8361       "clip clip",
8362       "ellipsis ellipsis",
8363       "clip ellipsis",
8364       'clip ""',
8365       '"hello" ""',
8366       '"" ellipsis',
8367     ],
8368     invalid_values: [
8369       "none",
8370       "auto",
8371       '"hello" inherit',
8372       'inherit "hello"',
8373       "clip initial",
8374       "initial clip",
8375       "initial inherit",
8376       "inherit initial",
8377       "inherit none",
8378       '"hello" unset',
8379       'unset "hello"',
8380       "clip unset",
8381       "unset clip",
8382       "unset inherit",
8383       "unset none",
8384       "initial unset",
8385     ],
8386   },
8387   "text-shadow": {
8388     domProp: "textShadow",
8389     inherited: true,
8390     type: CSS_TYPE_LONGHAND,
8391     applies_to_first_letter: true,
8392     applies_to_first_line: true,
8393     applies_to_placeholder: true,
8394     applies_to_cue: true,
8395     prerequisites: { color: "blue" },
8396     initial_values: ["none"],
8397     other_values: [
8398       "2px 2px",
8399       "2px 2px 1px",
8400       "2px 2px green",
8401       "2px 2px 1px green",
8402       "green 2px 2px",
8403       "green 2px 2px 1px",
8404       "green 2px 2px, blue 1px 3px 4px",
8405       "currentColor 3px 3px",
8406       "blue 2px 2px, currentColor 1px 2px",
8407       /* calc() values */
8408       "2px 2px calc(-5px)" /* clamped */,
8409       "calc(3em - 2px) 2px green",
8410       "green calc(3em - 2px) 2px",
8411       "2px calc(2px + 0.2em)",
8412       "blue 2px calc(2px + 0.2em)",
8413       "2px calc(2px + 0.2em) blue",
8414       "calc(-2px) calc(-2px)",
8415       "-2px -2px",
8416       "calc(2px) calc(2px)",
8417       "calc(2px) calc(2px) calc(2px)",
8418     ],
8419     invalid_values: [
8420       "3% 3%",
8421       "2px 2px -5px",
8422       "2px 2px 2px 2px",
8423       "2px 2px, none",
8424       "none, 2px 2px",
8425       "inherit, 2px 2px",
8426       "2px 2px, inherit",
8427       "2 2px",
8428       "2px 2",
8429       "2px 2px 2",
8430       "2px 2px 2px 2",
8431       "calc(2px) calc(2px) calc(2px) calc(2px)",
8432       "3px 3px calc(3px + rubbish)",
8433       "unset, 2px 2px",
8434       "2px 2px, unset",
8435     ],
8436   },
8437   "text-transform": {
8438     domProp: "textTransform",
8439     inherited: true,
8440     type: CSS_TYPE_LONGHAND,
8441     applies_to_first_letter: true,
8442     applies_to_first_line: true,
8443     applies_to_placeholder: true,
8444     applies_to_marker: true,
8445     initial_values: ["none"],
8446     other_values: [
8447       "capitalize",
8448       "uppercase",
8449       "lowercase",
8450       "full-width",
8451       "full-size-kana",
8452       "uppercase full-width",
8453       "full-size-kana capitalize",
8454       "full-width lowercase full-size-kana",
8455     ],
8456     invalid_values: [
8457       "none none",
8458       "none uppercase",
8459       "full-width none",
8460       "uppercase lowercase",
8461       "full-width capitalize full-width",
8462       "uppercase full-width lowercase",
8463     ],
8464   },
8465   "text-wrap": {
8466     domProp: "textWrap",
8467     inherited: true,
8468     type: CSS_TYPE_TRUE_SHORTHAND,
8469     subproperties: ["text-wrap-mode"],
8470     applies_to_placeholder: true,
8471     applies_to_cue: true,
8472     applies_to_marker: true,
8473     initial_values: ["wrap"],
8474     other_values: ["nowrap"],
8475     invalid_values: [],
8476   },
8477   "text-wrap-mode": {
8478     domProp: "textWrapMode",
8479     inherited: true,
8480     type: CSS_TYPE_LONGHAND,
8481     applies_to_cue: true,
8482     applies_to_placeholder: true,
8483     applies_to_marker: true,
8484     initial_values: ["wrap"],
8485     other_values: ["nowrap"],
8486     invalid_values: ["none", "normal", "on", "off", "wrap nowrap"],
8487   },
8488   top: {
8489     domProp: "top",
8490     inherited: false,
8491     type: CSS_TYPE_LONGHAND,
8492     /* FIXME: run tests with multiple prerequisites */
8493     prerequisites: { position: "relative" },
8494     /* XXX 0 may or may not be equal to auto */
8495     initial_values: ["auto"],
8496     other_values: [
8497       "32px",
8498       "-3em",
8499       "12%",
8500       "calc(2px)",
8501       "calc(-2px)",
8502       "calc(50%)",
8503       "calc(3*25px)",
8504       "calc(25px*3)",
8505       "calc(3*25px + 50%)",
8506     ],
8507     invalid_values: [],
8508     quirks_values: { 5: "5px" },
8509   },
8510   transition: {
8511     domProp: "transition",
8512     inherited: false,
8513     type: CSS_TYPE_TRUE_SHORTHAND,
8514     applies_to_marker: true,
8515     subproperties: [
8516       "transition-property",
8517       "transition-duration",
8518       "transition-timing-function",
8519       "transition-delay",
8520     ],
8521     initial_values: ["all 0s ease 0s", "all", "0s", "0s 0s", "ease"],
8522     other_values: [
8523       "all 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) 0s",
8524       "width 1s linear 2s",
8525       "width 1s 2s linear",
8526       "width linear 1s 2s",
8527       "linear width 1s 2s",
8528       "linear 1s width 2s",
8529       "linear 1s 2s width",
8530       "1s width linear 2s",
8531       "1s width 2s linear",
8532       "1s 2s width linear",
8533       "1s linear width 2s",
8534       "1s linear 2s width",
8535       "1s 2s linear width",
8536       "width linear 1s",
8537       "width 1s linear",
8538       "linear width 1s",
8539       "linear 1s width",
8540       "1s width linear",
8541       "1s linear width",
8542       "1s 2s width",
8543       "1s width 2s",
8544       "width 1s 2s",
8545       "1s 2s linear",
8546       "1s linear 2s",
8547       "linear 1s 2s",
8548       "width 1s",
8549       "1s width",
8550       "linear 1s",
8551       "1s linear",
8552       "1s 2s",
8553       "2s 1s",
8554       "width",
8555       "linear",
8556       "1s",
8557       "height",
8558       "2s",
8559       "ease-in-out",
8560       "2s ease-in",
8561       "opacity linear",
8562       "ease-out 2s",
8563       "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)",
8564       "1s \\32width linear 2s",
8565       "1s -width linear 2s",
8566       "1s -\\32width linear 2s",
8567       "1s \\32 0width linear 2s",
8568       "1s -\\32 0width linear 2s",
8569       "1s \\2width linear 2s",
8570       "1s -\\2width linear 2s",
8571       "2s, 1s width",
8572       "1s width, 2s",
8573       "2s all, 1s width",
8574       "1s width, 2s all",
8575       "2s all, 1s width",
8576       "2s width, 1s all",
8577       "3s --my-color",
8578       "none",
8579       "none 2s linear 2s",
8580     ],
8581     invalid_values: [
8582       "1s width, 2s none",
8583       "2s none, 1s width",
8584       "2s inherit",
8585       "inherit 2s",
8586       "2s width, 1s inherit",
8587       "2s inherit, 1s width",
8588       "2s initial",
8589       "1s width,,2s color",
8590       "1s width, ,2s color",
8591       "bounce 1s cubic-bezier(0, rubbish) 2s",
8592       "bounce 1s steps(rubbish) 2s",
8593       "2s unset",
8594     ],
8595   },
8596   "transition-delay": {
8597     domProp: "transitionDelay",
8598     inherited: false,
8599     type: CSS_TYPE_LONGHAND,
8600     applies_to_marker: true,
8601     initial_values: ["0s", "0ms"],
8602     other_values: ["1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
8603     invalid_values: ["0", "0px"],
8604   },
8605   "transition-duration": {
8606     domProp: "transitionDuration",
8607     inherited: false,
8608     type: CSS_TYPE_LONGHAND,
8609     applies_to_marker: true,
8610     initial_values: ["0s", "0ms"],
8611     other_values: ["1s", "250ms", "1s, 250ms, 2.3s"],
8612     invalid_values: ["0", "0px", "-1ms", "-2s"],
8613   },
8614   "transition-property": {
8615     domProp: "transitionProperty",
8616     inherited: false,
8617     type: CSS_TYPE_LONGHAND,
8618     applies_to_marker: true,
8619     initial_values: ["all"],
8620     other_values: [
8621       "none",
8622       "left",
8623       "top",
8624       "color",
8625       "width, height, opacity",
8626       "foobar",
8627       "auto",
8628       "\\32width",
8629       "-width",
8630       "-\\32width",
8631       "\\32 0width",
8632       "-\\32 0width",
8633       "\\2width",
8634       "-\\2width",
8635       "all, all",
8636       "all, color",
8637       "color, all",
8638       "--my-color",
8639     ],
8640     invalid_values: [
8641       "none, none",
8642       "color, none",
8643       "none, color",
8644       "inherit, color",
8645       "color, inherit",
8646       "initial, color",
8647       "color, initial",
8648       "none, color",
8649       "color, none",
8650       "unset, color",
8651       "color, unset",
8652     ],
8653   },
8654   "transition-timing-function": {
8655     domProp: "transitionTimingFunction",
8656     inherited: false,
8657     type: CSS_TYPE_LONGHAND,
8658     applies_to_marker: true,
8659     initial_values: ["ease"],
8660     other_values: [
8661       "cubic-bezier(0.25, 0.1, 0.25, 1.0)",
8662       "linear",
8663       "ease-in",
8664       "ease-out",
8665       "ease-in-out",
8666       "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)",
8667       "cubic-bezier(0.5, 0.5, 0.5, 0.5)",
8668       "cubic-bezier(0.25, 1.5, 0.75, -0.5)",
8669       "step-start",
8670       "step-end",
8671       "steps(1)",
8672       "steps(2, start)",
8673       "steps(386)",
8674       "steps(3, end)",
8675       "steps(1, jump-start)",
8676       "steps(1, jump-end)",
8677       "steps(2, jump-none)",
8678       "steps(1, jump-both)",
8679     ],
8680     invalid_values: [
8681       "none",
8682       "auto",
8683       "cubic-bezier(0.25, 0.1, 0.25)",
8684       "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)",
8685       "cubic-bezier(-0.5, 0.5, 0.5, 0.5)",
8686       "cubic-bezier(1.5, 0.5, 0.5, 0.5)",
8687       "cubic-bezier(0.5, 0.5, -0.5, 0.5)",
8688       "cubic-bezier(0.5, 0.5, 1.5, 0.5)",
8689       "steps(2, step-end)",
8690       "steps(0)",
8691       "steps(-2)",
8692       "steps(0, step-end, 1)",
8693       "steps(0, jump-start)",
8694       "steps(0, jump-end)",
8695       "steps(1, jump-none)",
8696       "steps(0, jump-both)",
8697     ],
8698   },
8699   "unicode-bidi": {
8700     domProp: "unicodeBidi",
8701     inherited: false,
8702     type: CSS_TYPE_LONGHAND,
8703     applies_to_marker: true,
8704     initial_values: ["normal"],
8705     other_values: [
8706       "embed",
8707       "bidi-override",
8708       "isolate",
8709       "plaintext",
8710       "isolate-override",
8711     ],
8712     invalid_values: [
8713       "auto",
8714       "none",
8715       "-moz-isolate",
8716       "-moz-plaintext",
8717       "-moz-isolate-override",
8718     ],
8719   },
8720   "vertical-align": {
8721     domProp: "verticalAlign",
8722     inherited: false,
8723     type: CSS_TYPE_LONGHAND,
8724     applies_to_first_letter: true,
8725     applies_to_first_line: true,
8726     applies_to_placeholder: true,
8727     initial_values: ["baseline"],
8728     other_values: [
8729       "sub",
8730       "super",
8731       "top",
8732       "text-top",
8733       "middle",
8734       "bottom",
8735       "text-bottom",
8736       "-moz-middle-with-baseline",
8737       "15%",
8738       "3px",
8739       "0.2em",
8740       "-5px",
8741       "-3%",
8742       "calc(2px)",
8743       "calc(-2px)",
8744       "calc(50%)",
8745       "calc(3*25px)",
8746       "calc(25px*3)",
8747       "calc(3*25px + 50%)",
8748     ],
8749     invalid_values: [],
8750     quirks_values: { 5: "5px" },
8751   },
8752   "baseline-source": {
8753     domProp: "baselineSource",
8754     inherited: false,
8755     type: CSS_TYPE_LONGHAND,
8756     applies_to_first_letter: true,
8757     applies_to_first_line: true,
8758     applies_to_placeholder: true,
8759     initial_values: ["auto"],
8760     other_values: ["first", "last"],
8761     invalid_values: [],
8762   },
8763   visibility: {
8764     domProp: "visibility",
8765     inherited: true,
8766     type: CSS_TYPE_LONGHAND,
8767     applies_to_cue: true,
8768     initial_values: ["visible"],
8769     other_values: ["hidden", "collapse"],
8770     invalid_values: [],
8771   },
8772   "white-space": {
8773     domProp: "whiteSpace",
8774     inherited: true,
8775     type: CSS_TYPE_TRUE_SHORTHAND,
8776     subproperties: ["white-space-collapse", "text-wrap-mode"],
8777     applies_to_placeholder: true,
8778     applies_to_cue: true,
8779     applies_to_marker: true,
8780     initial_values: ["normal"],
8781     other_values: [
8782       "pre",
8783       "nowrap",
8784       "pre-wrap",
8785       "pre-line",
8786       "-moz-pre-space",
8787       "break-spaces",
8788     ],
8789     invalid_values: [],
8790   },
8791   "white-space-collapse": {
8792     domProp: "whiteSpaceCollapse",
8793     inherited: true,
8794     type: CSS_TYPE_LONGHAND,
8795     applies_to_placeholder: true,
8796     applies_to_cue: true,
8797     applies_to_marker: true,
8798     initial_values: ["collapse"],
8799     other_values: [
8800       "preserve",
8801       "preserve-breaks",
8802       "preserve-spaces",
8803       "break-spaces",
8804     ],
8805     invalid_values: ["normal", "auto"],
8806   },
8807   width: {
8808     domProp: "width",
8809     inherited: false,
8810     type: CSS_TYPE_LONGHAND,
8811     prerequisites: {
8812       // computed value tests for width test more with display:block
8813       display: "block",
8814       // add some margin to avoid the initial "auto" value getting
8815       // resolved to the same length as the parent element.
8816       "margin-left": "5px",
8817     },
8818     initial_values: [" auto"],
8819     /* XXX these have prerequisites */
8820     other_values: [
8821       "15px",
8822       "3em",
8823       "15%",
8824       "max-content",
8825       "min-content",
8826       "fit-content",
8827       "stretch",
8828       "-moz-max-content",
8829       "-moz-min-content",
8830       "-moz-fit-content",
8831       "-moz-available",
8832       "-webkit-fill-available",
8833       "3e1px",
8834       "3e+1px",
8835       "3e0px",
8836       "3e+0px",
8837       "3e-0px",
8838       "3e-1px",
8839       "3.2e1px",
8840       "3.2e+1px",
8841       "3.2e0px",
8842       "3.2e+0px",
8843       "3.2e-0px",
8844       "3.2e-1px",
8845       "3e1%",
8846       "3e+1%",
8847       "3e0%",
8848       "3e+0%",
8849       "3e-0%",
8850       "3e-1%",
8851       "3.2e1%",
8852       "3.2e+1%",
8853       "3.2e0%",
8854       "3.2e+0%",
8855       "3.2e-0%",
8856       "3.2e-1%",
8857       /* valid calc() values */
8858       "calc(-2px)",
8859       "calc(2px)",
8860       "calc(50%)",
8861       "calc(50% + 2px)",
8862       "calc( 50% + 2px)",
8863       "calc(50% + 2px )",
8864       "calc( 50% + 2px )",
8865       "calc(50% - -2px)",
8866       "calc(2px - -50%)",
8867       "calc(3*25px)",
8868       "calc(3 *25px)",
8869       "calc(3 * 25px)",
8870       "calc(3* 25px)",
8871       "calc(25px*3)",
8872       "calc(25px *3)",
8873       "calc(25px* 3)",
8874       "calc(25px * 3)",
8875       "calc(3*25px + 50%)",
8876       "calc(50% - 3em + 2px)",
8877       "calc(50% - (3em + 2px))",
8878       "calc((50% - 3em) + 2px)",
8879       "calc(2em)",
8880       "calc(50%)",
8881       "calc(50px/2)",
8882       "calc(50px/(2 - 1))",
8883       "calc(min(5px))",
8884       "calc(min(5px,2em))",
8885       "calc(max(5px))",
8886       "calc(max(5px,2em))",
8887       "min(5px)",
8888       "min(5px,2em)",
8889       "max(5px)",
8890       "max(5px,2em)",
8891       "fit-content(100px)",
8892       "fit-content(10%)",
8893       "fit-content(calc(3*25px + 50%))",
8894     ],
8895     invalid_values: [
8896       "none",
8897       "-2px",
8898       "content" /* (valid for 'flex-basis' but not 'width') */,
8899       /* invalid calc() values */
8900       "calc(50%+ 2px)",
8901       "calc(50% +2px)",
8902       "calc(50%+2px)",
8903       "-moz-min()",
8904       "calc(min())",
8905       "-moz-max()",
8906       "calc(max())",
8907       "-moz-min(5px)",
8908       "-moz-max(5px)",
8909       "-moz-min(5px,2em)",
8910       "-moz-max(5px,2em)",
8911       /* If we ever support division by values, which is
8912        * complicated for the reasons described in
8913        * http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html
8914        * , we should support all 4 of these as described in
8915        * http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html
8916        */
8917       "calc((3em / 100%) * 3em)",
8918       "calc(3em / 100% * 3em)",
8919       "calc(3em * (3em / 100%))",
8920       "calc(3em * 3em / 100%)",
8921     ],
8922     quirks_values: { 5: "5px" },
8923   },
8924   "will-change": {
8925     domProp: "willChange",
8926     inherited: false,
8927     type: CSS_TYPE_LONGHAND,
8928     initial_values: ["auto"],
8929     other_values: [
8930       "scroll-position",
8931       "contents",
8932       "transform",
8933       "opacity",
8934       "scroll-position, transform",
8935       "transform, opacity",
8936       "contents, transform",
8937       "property-that-doesnt-exist-yet",
8938     ],
8939     invalid_values: [
8940       "none",
8941       "all",
8942       "default",
8943       "auto, scroll-position",
8944       "scroll-position, auto",
8945       "transform scroll-position",
8946       ",",
8947       "trailing,",
8948       "will-change",
8949       "transform, will-change",
8950     ],
8951   },
8952   "word-break": {
8953     domProp: "wordBreak",
8954     inherited: true,
8955     type: CSS_TYPE_LONGHAND,
8956     initial_values: ["normal"],
8957     other_values: ["break-all", "keep-all"],
8958     invalid_values: [],
8959   },
8960   "word-spacing": {
8961     domProp: "wordSpacing",
8962     inherited: true,
8963     type: CSS_TYPE_LONGHAND,
8964     applies_to_first_letter: true,
8965     applies_to_first_line: true,
8966     applies_to_placeholder: true,
8967     initial_values: ["normal", "0", "0px", "-0em", "calc(-0px)", "calc(0em)"],
8968     other_values: [
8969       "1em",
8970       "2px",
8971       "-3px",
8972       "0%",
8973       "50%",
8974       "-120%",
8975       "calc(1em)",
8976       "calc(1em + 3px)",
8977       "calc(15px / 2)",
8978       "calc(15px/2)",
8979       "calc(-2em)",
8980       "calc(0% + 0px)",
8981       "calc(-10%/2 - 1em)",
8982     ],
8983     invalid_values: [],
8984     quirks_values: { 5: "5px" },
8985   },
8986   "overflow-wrap": {
8987     domProp: "overflowWrap",
8988     inherited: true,
8989     type: CSS_TYPE_LONGHAND,
8990     initial_values: ["normal"],
8991     other_values: ["break-word"],
8992     invalid_values: [],
8993   },
8994   hyphens: {
8995     domProp: "hyphens",
8996     inherited: true,
8997     type: CSS_TYPE_LONGHAND,
8998     initial_values: ["manual"],
8999     other_values: ["none", "auto"],
9000     invalid_values: [],
9001   },
9002   "z-index": {
9003     domProp: "zIndex",
9004     inherited: false,
9005     type: CSS_TYPE_LONGHAND,
9006     /* XXX requires position */
9007     initial_values: ["auto"],
9008     other_values: ["0", "3", "-7000", "12000"],
9009     invalid_values: ["3.0", "17.5", "3e1"],
9010   },
9011   "clip-path": {
9012     domProp: "clipPath",
9013     inherited: false,
9014     type: CSS_TYPE_LONGHAND,
9015     initial_values: ["none"],
9016     other_values: [
9017       "path(nonzero, 'M 10 10 h 100 v 100 h-100 v-100 z')",
9018       "path(evenodd, 'M 10 10 h 100 v 100 h-100 v-100 z')",
9019       "path('M10,30A20,20 0,0,1 50,30A20,20 0,0,1 90,30Q90,60 50,90Q10,60 10,30z')",
9020       "url(#mypath)",
9021       "url('404.svg#mypath')",
9022       "url(#my-clip-path)",
9023       "margin-box",
9024     ]
9025       .concat(basicShapeSVGBoxValues)
9026       .concat(basicShapeOtherValues)
9027       .concat(basicShapeOtherValuesWithFillRule)
9028       .concat(basicShapeXywhRectValues)
9029       .concat(basicShapeShapeValues)
9030       .concat(basicShapeShapeValuesWithFillRule),
9031     invalid_values: [
9032       "path(nonzero)",
9033       "path(abs, 'M 10 10 L 10 10 z')",
9034       "path(evenodd, '')",
9035       "path('')",
9036     ].concat(basicShapeInvalidValues),
9037     unbalanced_values: basicShapeUnbalancedValues,
9038   },
9039   "clip-rule": {
9040     domProp: "clipRule",
9041     inherited: true,
9042     type: CSS_TYPE_LONGHAND,
9043     initial_values: ["nonzero"],
9044     other_values: ["evenodd"],
9045     invalid_values: [],
9046   },
9047   "color-interpolation": {
9048     domProp: "colorInterpolation",
9049     inherited: true,
9050     type: CSS_TYPE_LONGHAND,
9051     initial_values: ["sRGB"],
9052     other_values: ["auto", "linearRGB"],
9053     invalid_values: [],
9054   },
9055   "color-interpolation-filters": {
9056     domProp: "colorInterpolationFilters",
9057     inherited: true,
9058     type: CSS_TYPE_LONGHAND,
9059     initial_values: ["linearRGB"],
9060     other_values: ["sRGB", "auto"],
9061     invalid_values: [],
9062   },
9063   "dominant-baseline": {
9064     domProp: "dominantBaseline",
9065     inherited: true,
9066     type: CSS_TYPE_LONGHAND,
9067     initial_values: ["auto"],
9068     other_values: [
9069       "ideographic",
9070       "alphabetic",
9071       "hanging",
9072       "mathematical",
9073       "central",
9074       "middle",
9075       "text-after-edge",
9076       "text-before-edge",
9077     ],
9078     invalid_values: [],
9079   },
9080   fill: {
9081     domProp: "fill",
9082     inherited: true,
9083     type: CSS_TYPE_LONGHAND,
9084     applies_to_first_letter: true,
9085     applies_to_first_line: true,
9086     prerequisites: { color: "blue" },
9087     initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9088     other_values: [
9089       "green",
9090       "#fc3",
9091       "url('#myserver')",
9092       "url(foo.svg#myserver)",
9093       'url("#myserver") green',
9094       "none",
9095       "currentColor",
9096       "context-fill",
9097       "context-stroke",
9098     ],
9099     invalid_values: ["000000", "ff00ff", "url('#myserver') rgb(0, rubbish, 0)"],
9100   },
9101   "fill-opacity": {
9102     domProp: "fillOpacity",
9103     inherited: true,
9104     type: CSS_TYPE_LONGHAND,
9105     applies_to_first_letter: true,
9106     applies_to_first_line: true,
9107     initial_values: ["1", "2.8", "1.000", "300%"],
9108     other_values: [
9109       "0",
9110       "0.3",
9111       "-7.3",
9112       "-100%",
9113       "50%",
9114       "context-fill-opacity",
9115       "context-stroke-opacity",
9116     ],
9117     invalid_values: [],
9118   },
9119   "fill-rule": {
9120     domProp: "fillRule",
9121     inherited: true,
9122     type: CSS_TYPE_LONGHAND,
9123     applies_to_first_letter: true,
9124     applies_to_first_line: true,
9125     initial_values: ["nonzero"],
9126     other_values: ["evenodd"],
9127     invalid_values: [],
9128   },
9129   filter: {
9130     domProp: "filter",
9131     inherited: false,
9132     type: CSS_TYPE_LONGHAND,
9133     initial_values: ["none"],
9134     other_values: [
9135       // SVG reference filters
9136       "url(#my-filter)",
9137       "url(#my-filter-1) url(#my-filter-2)",
9139       // Filter functions
9140       "opacity(50%) saturate(1.0)",
9141       "invert(50%) sepia(0.1) brightness(90%)",
9143       // Mixed SVG reference filters and filter functions
9144       "grayscale(1) url(#my-filter-1)",
9145       "url(#my-filter-1) brightness(50%) contrast(0.9)",
9147       // Bad URLs
9148       "url('badscheme:badurl')",
9149       "blur(3px) url('badscheme:badurl') grayscale(50%)",
9151       "blur()",
9152       "blur(0)",
9153       "blur(0px)",
9154       "blur(0.5px)",
9155       "blur(3px)",
9156       "blur(100px)",
9157       "blur(0.1em)",
9158       "blur(calc(-1px))", // Parses and becomes blur(0px).
9159       "blur(calc(0px))",
9160       "blur(calc(5px))",
9161       "blur(calc(2 * 5px))",
9163       "brightness()",
9164       "brightness(0)",
9165       "brightness(50%)",
9166       "brightness(1)",
9167       "brightness(1.0)",
9168       "brightness(2)",
9169       "brightness(350%)",
9170       "brightness(4.567)",
9172       "contrast()",
9173       "contrast(0)",
9174       "contrast(50%)",
9175       "contrast(1)",
9176       "contrast(1.0)",
9177       "contrast(2)",
9178       "contrast(350%)",
9179       "contrast(4.567)",
9181       "drop-shadow(2px 2px)",
9182       "drop-shadow(2px 2px 1px)",
9183       "drop-shadow(2px 2px green)",
9184       "drop-shadow(2px 2px 1px green)",
9185       "drop-shadow(green 2px 2px)",
9186       "drop-shadow(green 2px 2px 1px)",
9187       "drop-shadow(currentColor 3px 3px)",
9188       "drop-shadow(2px 2px calc(-5px))" /* clamped */,
9189       "drop-shadow(calc(3em - 2px) 2px green)",
9190       "drop-shadow(green calc(3em - 2px) 2px)",
9191       "drop-shadow(2px calc(2px + 0.2em))",
9192       "drop-shadow(blue 2px calc(2px + 0.2em))",
9193       "drop-shadow(2px calc(2px + 0.2em) blue)",
9194       "drop-shadow(calc(-2px) calc(-2px))",
9195       "drop-shadow(-2px -2px)",
9196       "drop-shadow(calc(2px) calc(2px))",
9197       "drop-shadow(calc(2px) calc(2px) calc(2px))",
9199       "grayscale()",
9200       "grayscale(0)",
9201       "grayscale(50%)",
9202       "grayscale(1)",
9203       "grayscale(1.0)",
9204       "grayscale(2)",
9205       "grayscale(350%)",
9206       "grayscale(4.567)",
9208       "hue-rotate()",
9209       "hue-rotate(0)",
9210       "hue-rotate(0deg)",
9211       "hue-rotate(90deg)",
9212       "hue-rotate(540deg)",
9213       "hue-rotate(-90deg)",
9214       "hue-rotate(10grad)",
9215       "hue-rotate(1.6rad)",
9216       "hue-rotate(-1.6rad)",
9217       "hue-rotate(0.5turn)",
9218       "hue-rotate(-2turn)",
9220       "invert()",
9221       "invert(0)",
9222       "invert(50%)",
9223       "invert(1)",
9224       "invert(1.0)",
9225       "invert(2)",
9226       "invert(350%)",
9227       "invert(4.567)",
9229       "opacity()",
9230       "opacity(0)",
9231       "opacity(50%)",
9232       "opacity(1)",
9233       "opacity(1.0)",
9234       "opacity(2)",
9235       "opacity(350%)",
9236       "opacity(4.567)",
9238       "saturate()",
9239       "saturate(0)",
9240       "saturate(50%)",
9241       "saturate(1)",
9242       "saturate(1.0)",
9243       "saturate(2)",
9244       "saturate(350%)",
9245       "saturate(4.567)",
9247       "sepia()",
9248       "sepia(0)",
9249       "sepia(50%)",
9250       "sepia(1)",
9251       "sepia(1.0)",
9252       "sepia(2)",
9253       "sepia(350%)",
9254       "sepia(4.567)",
9255     ],
9256     invalid_values: [
9257       // none
9258       "none none",
9259       "url(#my-filter) none",
9260       "none url(#my-filter)",
9261       "blur(2px) none url(#my-filter)",
9263       // Nested filters
9264       "grayscale(invert(1.0))",
9266       // Comma delimited filters
9267       "url(#my-filter),",
9268       "invert(50%), url(#my-filter), brightness(90%)",
9270       // Test the following situations for each filter function:
9271       // - Invalid number of arguments
9272       // - Comma delimited arguments
9273       // - Wrong argument type
9274       // - Argument value out of range
9275       "blur(3px 5px)",
9276       "blur(3px,)",
9277       "blur(3px, 5px)",
9278       "blur(#my-filter)",
9279       "blur(0.5)",
9280       "blur(50%)",
9281       "blur(calc(0))", // Unitless zero in calc is not a valid length.
9282       "blur(calc(0.1))",
9283       "blur(calc(10%))",
9284       "blur(calc(20px - 5%))",
9285       "blur(-3px)",
9287       "brightness(0.5 0.5)",
9288       "brightness(0.5,)",
9289       "brightness(0.5, 0.5)",
9290       "brightness(#my-filter)",
9291       "brightness(10px)",
9292       "brightness(-1)",
9294       "contrast(0.5 0.5)",
9295       "contrast(0.5,)",
9296       "contrast(0.5, 0.5)",
9297       "contrast(#my-filter)",
9298       "contrast(10px)",
9299       "contrast(-1)",
9301       "drop-shadow()",
9302       "drop-shadow(3% 3%)",
9303       "drop-shadow(2px 2px -5px)",
9304       "drop-shadow(2px 2px 2px 2px)",
9305       "drop-shadow(2px 2px, none)",
9306       "drop-shadow(none, 2px 2px)",
9307       "drop-shadow(inherit, 2px 2px)",
9308       "drop-shadow(2px 2px, inherit)",
9309       "drop-shadow(2 2px)",
9310       "drop-shadow(2px 2)",
9311       "drop-shadow(2px 2px 2)",
9312       "drop-shadow(2px 2px 2px 2)",
9313       "drop-shadow(calc(2px) calc(2px) calc(2px) calc(2px))",
9314       "drop-shadow(green 2px 2px, blue 1px 3px 4px)",
9315       "drop-shadow(blue 2px 2px, currentColor 1px 2px)",
9316       "drop-shadow(unset, 2px 2px)",
9317       "drop-shadow(2px 2px, unset)",
9319       "grayscale(0.5 0.5)",
9320       "grayscale(0.5,)",
9321       "grayscale(0.5, 0.5)",
9322       "grayscale(#my-filter)",
9323       "grayscale(10px)",
9324       "grayscale(-1)",
9326       "hue-rotate(0.5 0.5)",
9327       "hue-rotate(0.5,)",
9328       "hue-rotate(0.5, 0.5)",
9329       "hue-rotate(#my-filter)",
9330       "hue-rotate(10px)",
9331       "hue-rotate(-1)",
9332       "hue-rotate(45deg,)",
9334       "invert(0.5 0.5)",
9335       "invert(0.5,)",
9336       "invert(0.5, 0.5)",
9337       "invert(#my-filter)",
9338       "invert(10px)",
9339       "invert(-1)",
9341       "opacity(0.5 0.5)",
9342       "opacity(0.5,)",
9343       "opacity(0.5, 0.5)",
9344       "opacity(#my-filter)",
9345       "opacity(10px)",
9346       "opacity(-1)",
9348       "saturate(0.5 0.5)",
9349       "saturate(0.5,)",
9350       "saturate(0.5, 0.5)",
9351       "saturate(#my-filter)",
9352       "saturate(10px)",
9353       "saturate(-1)",
9355       "sepia(0.5 0.5)",
9356       "sepia(0.5,)",
9357       "sepia(0.5, 0.5)",
9358       "sepia(#my-filter)",
9359       "sepia(10px)",
9360       "sepia(-1)",
9361     ],
9362   },
9363   "flood-color": {
9364     domProp: "floodColor",
9365     inherited: false,
9366     type: CSS_TYPE_LONGHAND,
9367     prerequisites: { color: "blue" },
9368     initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9369     other_values: ["green", "#fc3", "currentColor"],
9370     invalid_values: [
9371       "url('#myserver')",
9372       "url(foo.svg#myserver)",
9373       'url("#myserver") green',
9374       "000000",
9375       "ff00ff",
9376     ],
9377   },
9378   "flood-opacity": {
9379     domProp: "floodOpacity",
9380     inherited: false,
9381     type: CSS_TYPE_LONGHAND,
9382     initial_values: ["1", "2.8", "1.000", "300%"],
9383     other_values: ["0", "0.3", "-7.3", "-100%", "50%"],
9384     invalid_values: [],
9385   },
9386   "image-orientation": {
9387     domProp: "imageOrientation",
9388     inherited: true,
9389     type: CSS_TYPE_LONGHAND,
9390     initial_values: ["from-image"],
9391     other_values: ["none"],
9392     invalid_values: ["0", "0deg"],
9393   },
9394   "image-rendering": {
9395     domProp: "imageRendering",
9396     inherited: true,
9397     type: CSS_TYPE_LONGHAND,
9398     initial_values: ["auto"],
9399     other_values: [
9400       "optimizeSpeed",
9401       "optimizeQuality",
9402       "-moz-crisp-edges",
9403       "crisp-edges",
9404       "smooth",
9405       "pixelated",
9406     ],
9407     invalid_values: [],
9408   },
9409   isolation: {
9410     domProp: "isolation",
9411     inherited: false,
9412     type: CSS_TYPE_LONGHAND,
9413     initial_values: ["auto"],
9414     other_values: ["isolate"],
9415     invalid_values: [],
9416   },
9417   "lighting-color": {
9418     domProp: "lightingColor",
9419     inherited: false,
9420     type: CSS_TYPE_LONGHAND,
9421     prerequisites: { color: "blue" },
9422     initial_values: [
9423       "white",
9424       "#fff",
9425       "#ffffff",
9426       "rgb(255,255,255)",
9427       "rgba(255,255,255,1.0)",
9428       "rgba(255,255,255,42.0)",
9429     ],
9430     other_values: ["green", "#fc3", "currentColor"],
9431     invalid_values: [
9432       "url('#myserver')",
9433       "url(foo.svg#myserver)",
9434       'url("#myserver") green',
9435       "000000",
9436       "ff00ff",
9437     ],
9438   },
9439   marker: {
9440     domProp: "marker",
9441     inherited: true,
9442     type: CSS_TYPE_TRUE_SHORTHAND,
9443     subproperties: ["marker-start", "marker-mid", "marker-end"],
9444     initial_values: ["none"],
9445     other_values: ["url(#mysym)"],
9446     invalid_values: [
9447       "none none",
9448       "url(#mysym) url(#mysym)",
9449       "none url(#mysym)",
9450       "url(#mysym) none",
9451     ],
9452   },
9453   "marker-end": {
9454     domProp: "markerEnd",
9455     inherited: true,
9456     type: CSS_TYPE_LONGHAND,
9457     initial_values: ["none"],
9458     other_values: ["url(#mysym)"],
9459     invalid_values: [],
9460   },
9461   "marker-mid": {
9462     domProp: "markerMid",
9463     inherited: true,
9464     type: CSS_TYPE_LONGHAND,
9465     initial_values: ["none"],
9466     other_values: ["url(#mysym)"],
9467     invalid_values: [],
9468   },
9469   "marker-start": {
9470     domProp: "markerStart",
9471     inherited: true,
9472     type: CSS_TYPE_LONGHAND,
9473     initial_values: ["none"],
9474     other_values: ["url(#mysym)"],
9475     invalid_values: [],
9476   },
9477   "mix-blend-mode": {
9478     domProp: "mixBlendMode",
9479     inherited: false,
9480     type: CSS_TYPE_LONGHAND,
9481     initial_values: ["normal"],
9482     other_values: [
9483       "multiply",
9484       "screen",
9485       "overlay",
9486       "darken",
9487       "lighten",
9488       "color-dodge",
9489       "color-burn",
9490       "hard-light",
9491       "soft-light",
9492       "difference",
9493       "exclusion",
9494       "hue",
9495       "saturation",
9496       "color",
9497       "luminosity",
9498       "plus-lighter",
9499     ],
9500     invalid_values: [],
9501   },
9502   "shape-image-threshold": {
9503     domProp: "shapeImageThreshold",
9504     inherited: false,
9505     type: CSS_TYPE_LONGHAND,
9506     applies_to_first_letter: true,
9507     initial_values: ["0", "0.0000", "-3", "0%", "-100%"],
9508     other_values: [
9509       "0.4",
9510       "1",
9511       "17",
9512       "397.376",
9513       "3e1",
9514       "3e+1",
9515       "3e-1",
9516       "3e0",
9517       "3e+0",
9518       "3e-0",
9519       "50%",
9520       "300%",
9521     ],
9522     invalid_values: ["0px", "1px", "default", "auto"],
9523   },
9524   "shape-margin": {
9525     domProp: "shapeMargin",
9526     inherited: false,
9527     type: CSS_TYPE_LONGHAND,
9528     applies_to_first_letter: true,
9529     initial_values: ["0"],
9530     other_values: ["2px", "2%", "1em", "calc(1px + 1em)", "calc(1%)"],
9531     invalid_values: ["-1px", "auto", "none", "1px 1px", "-1%"],
9532   },
9533   "shape-outside": {
9534     domProp: "shapeOutside",
9535     inherited: false,
9536     type: CSS_TYPE_LONGHAND,
9537     applies_to_first_letter: true,
9538     initial_values: ["none"],
9539     other_values: ["url(#my-shape-outside)", "margin-box"].concat(
9540       basicShapeOtherValues,
9541       basicShapeOtherValuesWithFillRule,
9542       validNonUrlImageValues
9543     ),
9544     invalid_values: [].concat(
9545       basicShapeSVGBoxValues,
9546       basicShapeInvalidValues,
9547       invalidNonUrlImageValues
9548     ),
9549     unbalanced_values: [].concat(
9550       basicShapeUnbalancedValues,
9551       unbalancedGradientAndElementValues
9552     ),
9553   },
9554   "shape-rendering": {
9555     domProp: "shapeRendering",
9556     inherited: true,
9557     type: CSS_TYPE_LONGHAND,
9558     initial_values: ["auto"],
9559     other_values: ["optimizeSpeed", "crispEdges", "geometricPrecision"],
9560     invalid_values: [],
9561   },
9562   "stop-color": {
9563     domProp: "stopColor",
9564     inherited: false,
9565     type: CSS_TYPE_LONGHAND,
9566     prerequisites: { color: "blue" },
9567     initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9568     other_values: ["green", "#fc3", "currentColor"],
9569     invalid_values: [
9570       "url('#myserver')",
9571       "url(foo.svg#myserver)",
9572       'url("#myserver") green',
9573       "000000",
9574       "ff00ff",
9575     ],
9576   },
9577   "stop-opacity": {
9578     domProp: "stopOpacity",
9579     inherited: false,
9580     type: CSS_TYPE_LONGHAND,
9581     initial_values: ["1", "2.8", "1.000", "300%"],
9582     other_values: ["0", "0.3", "-7.3", "-100%", "50%"],
9583     invalid_values: [],
9584   },
9585   stroke: {
9586     domProp: "stroke",
9587     inherited: true,
9588     type: CSS_TYPE_LONGHAND,
9589     applies_to_first_letter: true,
9590     applies_to_first_line: true,
9591     initial_values: ["none"],
9592     other_values: [
9593       "black",
9594       "#000",
9595       "#000000",
9596       "rgb(0,0,0)",
9597       "rgba(0,0,0,1)",
9598       "green",
9599       "#fc3",
9600       "url('#myserver')",
9601       "url(foo.svg#myserver)",
9602       'url("#myserver") green',
9603       "currentColor",
9604       "context-fill",
9605       "context-stroke",
9606     ],
9607     invalid_values: ["000000", "ff00ff"],
9608   },
9609   "stroke-dasharray": {
9610     domProp: "strokeDasharray",
9611     inherited: true,
9612     type: CSS_TYPE_LONGHAND,
9613     applies_to_first_letter: true,
9614     applies_to_first_line: true,
9615     initial_values: ["none"],
9616     other_values: [
9617       "5px,3px,2px",
9618       "5px 3px 2px",
9619       "  5px ,3px\t, 2px ",
9620       "1px",
9621       "5%",
9622       "3em",
9623       "0.0002",
9624       "context-value",
9625     ],
9626     invalid_values: ["-5px,3px,2px", "5px,3px,-2px"],
9627   },
9628   "stroke-dashoffset": {
9629     domProp: "strokeDashoffset",
9630     inherited: true,
9631     applies_to_first_letter: true,
9632     applies_to_first_line: true,
9633     type: CSS_TYPE_LONGHAND,
9634     initial_values: ["0", "-0px", "0em"],
9635     other_values: ["3px", "3%", "1em", "0.0002", "context-value"],
9636     invalid_values: [],
9637   },
9638   "stroke-linecap": {
9639     domProp: "strokeLinecap",
9640     inherited: true,
9641     type: CSS_TYPE_LONGHAND,
9642     applies_to_first_letter: true,
9643     applies_to_first_line: true,
9644     initial_values: ["butt"],
9645     other_values: ["round", "square"],
9646     invalid_values: [],
9647   },
9648   "stroke-linejoin": {
9649     domProp: "strokeLinejoin",
9650     inherited: true,
9651     type: CSS_TYPE_LONGHAND,
9652     applies_to_first_letter: true,
9653     applies_to_first_line: true,
9654     initial_values: ["miter"],
9655     other_values: ["round", "bevel"],
9656     invalid_values: [],
9657   },
9658   "stroke-miterlimit": {
9659     domProp: "strokeMiterlimit",
9660     inherited: true,
9661     type: CSS_TYPE_LONGHAND,
9662     applies_to_first_letter: true,
9663     applies_to_first_line: true,
9664     initial_values: ["4"],
9665     other_values: ["0", "0.9", "1", "7", "5000", "1.1"],
9666     invalid_values: ["-1", "3px", "-0.3"],
9667   },
9668   "stroke-opacity": {
9669     domProp: "strokeOpacity",
9670     inherited: true,
9671     type: CSS_TYPE_LONGHAND,
9672     applies_to_first_letter: true,
9673     applies_to_first_line: true,
9674     initial_values: ["1", "2.8", "1.000", "300%"],
9675     other_values: [
9676       "0",
9677       "0.3",
9678       "-7.3",
9679       "-100%",
9680       "50%",
9681       "context-fill-opacity",
9682       "context-stroke-opacity",
9683     ],
9684     invalid_values: [],
9685   },
9686   "stroke-width": {
9687     domProp: "strokeWidth",
9688     inherited: true,
9689     type: CSS_TYPE_LONGHAND,
9690     applies_to_first_letter: true,
9691     applies_to_first_line: true,
9692     initial_values: ["1px"],
9693     other_values: [
9694       "0",
9695       "0px",
9696       "-0em",
9697       "17px",
9698       "0.2em",
9699       "0.0002",
9700       "context-value",
9701     ],
9702     invalid_values: ["-0.1px", "-3px"],
9703   },
9704   x: {
9705     domProp: "x",
9706     inherited: false,
9707     type: CSS_TYPE_LONGHAND,
9708     initial_values: ["0px"],
9709     other_values: ["-1em", "17px", "0.2em", "23.4%"],
9710     invalid_values: ["auto", "context-value", "0.0002"],
9711   },
9712   y: {
9713     domProp: "y",
9714     inherited: false,
9715     type: CSS_TYPE_LONGHAND,
9716     initial_values: ["0px"],
9717     other_values: ["-1em", "17px", "0.2em", "23.4%"],
9718     invalid_values: ["auto", "context-value", "0.0002"],
9719   },
9720   cx: {
9721     domProp: "cx",
9722     inherited: false,
9723     type: CSS_TYPE_LONGHAND,
9724     initial_values: ["0px"],
9725     other_values: ["-1em", "17px", "0.2em", "23.4%"],
9726     invalid_values: ["auto", "context-value", "0.0002"],
9727   },
9728   cy: {
9729     domProp: "cy",
9730     inherited: false,
9731     type: CSS_TYPE_LONGHAND,
9732     initial_values: ["0px"],
9733     other_values: ["-1em", "17px", "0.2em", "23.4%"],
9734     invalid_values: ["auto", "context-value", "0.0002"],
9735   },
9736   r: {
9737     domProp: "r",
9738     inherited: false,
9739     type: CSS_TYPE_LONGHAND,
9740     initial_values: ["0px"],
9741     other_values: ["17px", "0.2em", "23.4%"],
9742     invalid_values: ["auto", "-1", "-1.5px", "0.0002"],
9743   },
9744   rx: {
9745     domProp: "rx",
9746     inherited: false,
9747     type: CSS_TYPE_LONGHAND,
9748     initial_values: ["auto"],
9749     other_values: ["17px", "0.2em", "23.4%"],
9750     invalid_values: ["hello", "-12px", "0.0002"],
9751   },
9752   ry: {
9753     domProp: "ry",
9754     inherited: false,
9755     type: CSS_TYPE_LONGHAND,
9756     initial_values: ["auto"],
9757     other_values: ["17px", "0.2em", "23.4%"],
9758     invalid_values: ["hello", "-1.3px", "0.0002"],
9759   },
9760   "text-anchor": {
9761     domProp: "textAnchor",
9762     inherited: true,
9763     type: CSS_TYPE_LONGHAND,
9764     initial_values: ["start"],
9765     other_values: ["middle", "end"],
9766     invalid_values: [],
9767   },
9768   "text-rendering": {
9769     domProp: "textRendering",
9770     inherited: true,
9771     type: CSS_TYPE_LONGHAND,
9772     applies_to_first_letter: true,
9773     applies_to_first_line: true,
9774     initial_values: ["auto"],
9775     other_values: ["optimizeSpeed", "optimizeLegibility", "geometricPrecision"],
9776     invalid_values: [],
9777   },
9778   "vector-effect": {
9779     domProp: "vectorEffect",
9780     inherited: false,
9781     type: CSS_TYPE_LONGHAND,
9782     applies_to_first_letter: true,
9783     applies_to_first_line: true,
9784     initial_values: ["none"],
9785     other_values: ["non-scaling-stroke"],
9786     invalid_values: ["none non-scaling-stroke"],
9787   },
9788   "-moz-window-dragging": {
9789     domProp: "MozWindowDragging",
9790     inherited: false,
9791     type: CSS_TYPE_LONGHAND,
9792     initial_values: ["default"],
9793     other_values: ["drag", "no-drag"],
9794     invalid_values: ["none"],
9795   },
9796   "accent-color": {
9797     domProp: "accentColor",
9798     inherited: true,
9799     type: CSS_TYPE_LONGHAND,
9800     prerequisites: { color: "black" },
9801     initial_values: ["auto"],
9802     other_values: [
9803       "currentcolor",
9804       "black",
9805       "green",
9806       "transparent",
9807       "rgba(128,128,128,.5)",
9808       "#123",
9809     ],
9810     invalid_values: ["#0", "#00", "#00000", "cc00ff"],
9811   },
9812   "align-content": {
9813     domProp: "alignContent",
9814     inherited: false,
9815     type: CSS_TYPE_LONGHAND,
9816     initial_values: ["normal"],
9817     other_values: [
9818       "start",
9819       "end",
9820       "flex-start",
9821       "flex-end",
9822       "center",
9823       "space-between",
9824       "space-around",
9825       "space-evenly",
9826       "first baseline",
9827       "last baseline",
9828       "baseline",
9829       "stretch",
9830       "safe start",
9831       "unsafe end",
9832       "safe end",
9833     ],
9834     invalid_values: [
9835       "none",
9836       "5",
9837       "self-end",
9838       "safe",
9839       "normal unsafe",
9840       "unsafe safe",
9841       "safe baseline",
9842       "baseline unsafe",
9843       "baseline end",
9844       "end normal",
9845       "safe end unsafe start",
9846       "safe end unsafe",
9847       "normal safe start",
9848       "unsafe end start",
9849       "end start safe",
9850       "space-between unsafe",
9851       "stretch safe",
9852       "auto",
9853       "first",
9854       "last",
9855       "left",
9856       "right",
9857     ],
9858   },
9859   "align-items": {
9860     domProp: "alignItems",
9861     inherited: false,
9862     type: CSS_TYPE_LONGHAND,
9863     initial_values: ["normal"],
9864     other_values: [
9865       "end",
9866       "flex-start",
9867       "flex-end",
9868       "self-start",
9869       "self-end",
9870       "center",
9871       "stretch",
9872       "first baseline",
9873       "last baseline",
9874       "baseline",
9875       "start",
9876       "unsafe center",
9877       "safe center",
9878     ],
9879     invalid_values: [
9880       "space-between",
9881       "abc",
9882       "5%",
9883       "legacy",
9884       "legacy end",
9885       "end legacy",
9886       "unsafe",
9887       "unsafe baseline",
9888       "normal unsafe",
9889       "safe left unsafe",
9890       "safe stretch",
9891       "end end",
9892       "auto",
9893       "left",
9894       "right",
9895     ],
9896   },
9897   "align-self": {
9898     domProp: "alignSelf",
9899     inherited: false,
9900     type: CSS_TYPE_LONGHAND,
9901     initial_values: ["auto"],
9902     other_values: [
9903       "normal",
9904       "start",
9905       "flex-start",
9906       "flex-end",
9907       "center",
9908       "stretch",
9909       "first baseline",
9910       "last baseline",
9911       "baseline",
9912       "unsafe center",
9913       "self-start",
9914       "safe self-end",
9915     ],
9916     invalid_values: [
9917       "space-between",
9918       "abc",
9919       "30px",
9920       "stretch safe",
9921       "safe",
9922       "left",
9923       "right",
9924     ],
9925   },
9926   "justify-content": {
9927     domProp: "justifyContent",
9928     inherited: false,
9929     type: CSS_TYPE_LONGHAND,
9930     initial_values: ["normal"],
9931     other_values: [
9932       "start",
9933       "end",
9934       "flex-start",
9935       "flex-end",
9936       "center",
9937       "left",
9938       "right",
9939       "space-between",
9940       "space-around",
9941       "space-evenly",
9942       "stretch",
9943       "safe start",
9944       "unsafe end",
9945       "safe end",
9946     ],
9947     invalid_values: [
9948       "30px",
9949       "5%",
9950       "self-end",
9951       "safe",
9952       "normal unsafe",
9953       "unsafe safe",
9954       "safe baseline",
9955       "baseline unsafe",
9956       "baseline end",
9957       "normal end",
9958       "safe end unsafe start",
9959       "safe end unsafe",
9960       "normal safe start",
9961       "unsafe end start",
9962       "end start safe",
9963       "space-around unsafe",
9964       "safe stretch",
9965       "auto",
9966       "first",
9967       "last",
9968     ],
9969   },
9970   "justify-items": {
9971     domProp: "justifyItems",
9972     inherited: false,
9973     type: CSS_TYPE_LONGHAND,
9974     initial_values: ["legacy", "normal"],
9975     other_values: [
9976       "end",
9977       "flex-start",
9978       "flex-end",
9979       "self-start",
9980       "self-end",
9981       "center",
9982       "left",
9983       "right",
9984       "stretch",
9985       "start",
9986       "legacy left",
9987       "right legacy",
9988       "legacy center",
9989       "unsafe right",
9990       "unsafe left",
9991       "safe right",
9992       "safe center",
9993     ],
9994     invalid_values: [
9995       "auto",
9996       "space-between",
9997       "abc",
9998       "30px",
9999       "legacy start",
10000       "end legacy",
10001       "legacy baseline",
10002       "legacy legacy",
10003       "unsafe",
10004       "safe legacy left",
10005       "legacy left safe",
10006       "legacy safe left",
10007       "safe left legacy",
10008       "legacy left legacy",
10009       "baseline unsafe",
10010       "safe unsafe",
10011       "safe left unsafe",
10012       "safe stretch",
10013       "last",
10014     ],
10015   },
10016   "justify-self": {
10017     domProp: "justifySelf",
10018     inherited: false,
10019     type: CSS_TYPE_LONGHAND,
10020     initial_values: ["auto"],
10021     other_values: [
10022       "normal",
10023       "start",
10024       "end",
10025       "flex-start",
10026       "flex-end",
10027       "self-start",
10028       "self-end",
10029       "center",
10030       "left",
10031       "right",
10032       "stretch",
10033       "unsafe left",
10034       "baseline",
10035       "last baseline",
10036       "first baseline",
10037       "unsafe right",
10038       "safe right",
10039       "safe center",
10040     ],
10041     invalid_values: [
10042       "space-between",
10043       "abc",
10044       "30px",
10045       "none",
10046       "first",
10047       "last",
10048       "legacy left",
10049       "right legacy",
10050       "baseline first",
10051       "baseline last",
10052     ],
10053   },
10054   "place-content": {
10055     domProp: "placeContent",
10056     inherited: false,
10057     type: CSS_TYPE_TRUE_SHORTHAND,
10058     subproperties: ["align-content", "justify-content"],
10059     initial_values: ["normal"],
10060     other_values: [
10061       "normal start",
10062       "baseline end",
10063       "end end",
10064       "space-between flex-end",
10065       "last baseline start",
10066       "space-evenly",
10067       "flex-start",
10068       "end",
10069       "unsafe start",
10070       "safe center",
10071       "baseline",
10072       "last baseline",
10073     ],
10074     invalid_values: [
10075       "none",
10076       "center safe",
10077       "right / end",
10078       "left",
10079       "right",
10080       "left left",
10081       "right right",
10082     ],
10083   },
10084   "place-items": {
10085     domProp: "placeItems",
10086     inherited: false,
10087     type: CSS_TYPE_TRUE_SHORTHAND,
10088     subproperties: ["align-items", "justify-items"],
10089     initial_values: ["normal"],
10090     other_values: [
10091       "normal center",
10092       "baseline end",
10093       "end legacy",
10094       "end",
10095       "flex-end left",
10096       "last baseline start",
10097       "stretch",
10098       "safe center",
10099       "end legacy left",
10100     ],
10101     invalid_values: [
10102       "space-between",
10103       "start space-evenly",
10104       "none",
10105       "end/end",
10106       "center safe",
10107       "auto start",
10108       "left",
10109       "right",
10110       "left left",
10111       "right right",
10112     ],
10113   },
10114   "place-self": {
10115     domProp: "placeSelf",
10116     inherited: false,
10117     type: CSS_TYPE_TRUE_SHORTHAND,
10118     subproperties: ["align-self", "justify-self"],
10119     initial_values: ["auto"],
10120     other_values: [
10121       "normal start",
10122       "first baseline end",
10123       "end auto",
10124       "end",
10125       "normal",
10126       "baseline start",
10127       "baseline",
10128       "start baseline",
10129       "self-end left",
10130       "last baseline start",
10131       "stretch",
10132     ],
10133     invalid_values: [
10134       "space-between",
10135       "start space-evenly",
10136       "none",
10137       "end safe",
10138       "auto legacy left",
10139       "legacy left",
10140       "auto/auto",
10141       "left",
10142       "right",
10143       "left left",
10144       "right right",
10145     ],
10146   },
10147   flex: {
10148     domProp: "flex",
10149     inherited: false,
10150     type: CSS_TYPE_TRUE_SHORTHAND,
10151     subproperties: ["flex-grow", "flex-shrink", "flex-basis"],
10152     initial_values: ["0 1 auto", "auto 0 1", "0 auto", "auto 0"],
10153     other_values: [
10154       "none",
10155       "1",
10156       "0",
10157       "0 1",
10158       "0.5",
10159       "1.2 3.4",
10160       "0 0 0",
10161       "0 0 0px",
10162       "0px 0 0",
10163       "5px 0 0",
10164       "2 auto",
10165       "auto 4",
10166       "auto 5.6 7.8",
10167       "max-content",
10168       "1 max-content",
10169       "1 2 max-content",
10170       "max-content 1",
10171       "max-content 1 2",
10172       "-0",
10173     ],
10174     invalid_values: [
10175       "1 2px 3",
10176       "1 auto 3",
10177       "1px 2 3px",
10178       "1px 2 3 4px",
10179       "-1",
10180       "1 -1",
10181       "0 1 calc(0px + rubbish)",
10182     ],
10183   },
10184   "flex-basis": {
10185     domProp: "flexBasis",
10186     inherited: false,
10187     type: CSS_TYPE_LONGHAND,
10188     initial_values: [" auto"],
10189     // NOTE: Besides "content", this is cribbed directly from the "width"
10190     // chunk, since this property takes the exact same values as width
10191     // (plus 'content' & with different semantics on 'auto').
10192     // XXXdholbert (Maybe these should get separated out into
10193     // a reusable array defined at the top of this file?)
10194     other_values: [
10195       "content",
10196       "15px",
10197       "3em",
10198       "15%",
10199       "max-content",
10200       "min-content",
10201       "fit-content",
10202       "stretch",
10203       "-moz-max-content",
10204       "-moz-min-content",
10205       "-moz-fit-content",
10206       "-moz-available",
10207       "-webkit-fill-available",
10208       // valid calc() values
10209       "calc(-2px)",
10210       "calc(2px)",
10211       "calc(50%)",
10212       "calc(50% + 2px)",
10213       "calc( 50% + 2px)",
10214       "calc(50% + 2px )",
10215       "calc( 50% + 2px )",
10216       "calc(50% - -2px)",
10217       "calc(2px - -50%)",
10218       "calc(3*25px)",
10219       "calc(3 *25px)",
10220       "calc(3 * 25px)",
10221       "calc(3* 25px)",
10222       "calc(25px*3)",
10223       "calc(25px *3)",
10224       "calc(25px* 3)",
10225       "calc(25px * 3)",
10226       "calc(3*25px + 50%)",
10227       "calc(50% - 3em + 2px)",
10228       "calc(50% - (3em + 2px))",
10229       "calc((50% - 3em) + 2px)",
10230       "calc(2em)",
10231       "calc(50%)",
10232       "calc(50px/2)",
10233       "calc(50px/(2 - 1))",
10234       "calc(min(5px))",
10235       "calc(min(5px,2em))",
10236       "calc(max(5px))",
10237       "calc(max(5px,2em))",
10238       "min(5px)",
10239       "min(5px,2em)",
10240       "max(5px)",
10241       "max(5px,2em)",
10242     ],
10243     invalid_values: [
10244       "none",
10245       "-2px",
10246       // invalid calc() values
10247       "calc(50%+ 2px)",
10248       "calc(50% +2px)",
10249       "calc(50%+2px)",
10250       "-moz-min()",
10251       "calc(min())",
10252       "-moz-max()",
10253       "calc(max())",
10254       "-moz-min(5px)",
10255       "-moz-max(5px)",
10256       "-moz-min(5px,2em)",
10257       "-moz-max(5px,2em)",
10258       // If we ever support division by values, which is
10259       // complicated for the reasons described in
10260       // http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html
10261       // , we should support all 4 of these as described in
10262       // http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html
10263       "calc((3em / 100%) * 3em)",
10264       "calc(3em / 100% * 3em)",
10265       "calc(3em * (3em / 100%))",
10266       "calc(3em * 3em / 100%)",
10267     ],
10268   },
10269   "flex-direction": {
10270     domProp: "flexDirection",
10271     inherited: false,
10272     type: CSS_TYPE_LONGHAND,
10273     initial_values: ["row"],
10274     other_values: ["row-reverse", "column", "column-reverse"],
10275     invalid_values: ["10px", "30%", "justify", "column wrap"],
10276   },
10277   "flex-flow": {
10278     domProp: "flexFlow",
10279     inherited: false,
10280     type: CSS_TYPE_TRUE_SHORTHAND,
10281     subproperties: ["flex-direction", "flex-wrap"],
10282     initial_values: ["row nowrap", "nowrap row", "row", "nowrap"],
10283     other_values: [
10284       // only specifying one property:
10285       "column",
10286       "wrap",
10287       "wrap-reverse",
10288       // specifying both properties, 'flex-direction' first:
10289       "row wrap",
10290       "row wrap-reverse",
10291       "column wrap",
10292       "column wrap-reverse",
10293       // specifying both properties, 'flex-wrap' first:
10294       "wrap row",
10295       "wrap column",
10296       "wrap-reverse row",
10297       "wrap-reverse column",
10298     ],
10299     invalid_values: [
10300       // specifying flex-direction twice (invalid):
10301       "row column",
10302       "row column nowrap",
10303       "row nowrap column",
10304       "nowrap row column",
10305       // specifying flex-wrap twice (invalid):
10306       "nowrap wrap-reverse",
10307       "nowrap wrap-reverse row",
10308       "nowrap row wrap-reverse",
10309       "row nowrap wrap-reverse",
10310       // Invalid data-type / invalid keyword type:
10311       "1px",
10312       "5%",
10313       "justify",
10314       "none",
10315     ],
10316   },
10317   "flex-grow": {
10318     domProp: "flexGrow",
10319     inherited: false,
10320     type: CSS_TYPE_LONGHAND,
10321     initial_values: ["0"],
10322     other_values: ["3", "1", "1.0", "2.5", "123"],
10323     invalid_values: ["0px", "-5", "1%", "3em", "stretch", "auto"],
10324   },
10325   "flex-shrink": {
10326     domProp: "flexShrink",
10327     inherited: false,
10328     type: CSS_TYPE_LONGHAND,
10329     initial_values: ["1"],
10330     other_values: ["3", "0", "0.0", "2.5", "123"],
10331     invalid_values: ["0px", "-5", "1%", "3em", "stretch", "auto"],
10332   },
10333   "flex-wrap": {
10334     domProp: "flexWrap",
10335     inherited: false,
10336     type: CSS_TYPE_LONGHAND,
10337     initial_values: ["nowrap"],
10338     other_values: ["wrap", "wrap-reverse"],
10339     invalid_values: ["10px", "30%", "justify", "column wrap", "auto"],
10340   },
10341   order: {
10342     domProp: "order",
10343     inherited: false,
10344     type: CSS_TYPE_LONGHAND,
10345     initial_values: ["0"],
10346     other_values: ["1", "99999", "-1", "-50"],
10347     invalid_values: ["0px", "1.0", "1.", "1%", "0.2", "3em", "stretch"],
10348   },
10350   // Aliases
10351   "word-wrap": {
10352     domProp: "wordWrap",
10353     inherited: true,
10354     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10355     alias_for: "overflow-wrap",
10356     subproperties: ["overflow-wrap"],
10357   },
10358   "-moz-tab-size": {
10359     domProp: "MozTabSize",
10360     inherited: true,
10361     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10362     alias_for: "tab-size",
10363     subproperties: ["tab-size"],
10364   },
10365   "-moz-border-image": {
10366     domProp: "MozBorderImage",
10367     inherited: false,
10368     type: CSS_TYPE_TRUE_SHORTHAND,
10369     alias_for: "border-image",
10370     subproperties: [
10371       "border-image-source",
10372       "border-image-slice",
10373       "border-image-width",
10374       "border-image-outset",
10375       "border-image-repeat",
10376     ],
10377   },
10378   "-moz-font-feature-settings": {
10379     domProp: "MozFontFeatureSettings",
10380     inherited: true,
10381     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10382     applies_to_first_letter: true,
10383     applies_to_first_line: true,
10384     applies_to_marker: true,
10385     applies_to_placeholder: true,
10386     applies_to_cue: true,
10387     alias_for: "font-feature-settings",
10388     subproperties: ["font-feature-settings"],
10389   },
10390   "-moz-font-language-override": {
10391     domProp: "MozFontLanguageOverride",
10392     inherited: true,
10393     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10394     applies_to_first_letter: true,
10395     applies_to_first_line: true,
10396     applies_to_marker: true,
10397     applies_to_placeholder: true,
10398     applies_to_cue: true,
10399     alias_for: "font-language-override",
10400     subproperties: ["font-language-override"],
10401   },
10402   "-moz-hyphens": {
10403     domProp: "MozHyphens",
10404     inherited: true,
10405     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10406     alias_for: "hyphens",
10407     subproperties: ["hyphens"],
10408   },
10409   // vertical text properties
10410   "writing-mode": {
10411     domProp: "writingMode",
10412     inherited: true,
10413     type: CSS_TYPE_LONGHAND,
10414     initial_values: ["horizontal-tb", "lr", "lr-tb", "rl", "rl-tb"],
10415     other_values: [
10416       "vertical-lr",
10417       "vertical-rl",
10418       "sideways-rl",
10419       "sideways-lr",
10420       "tb",
10421       "tb-rl",
10422     ],
10423     invalid_values: ["10px", "30%", "justify", "auto", "1em"],
10424   },
10425   "text-orientation": {
10426     domProp: "textOrientation",
10427     inherited: true,
10428     type: CSS_TYPE_LONGHAND,
10429     initial_values: ["mixed"],
10430     other_values: [
10431       "upright",
10432       "sideways",
10433       "sideways-right",
10434     ] /* sideways-right alias for backward compatibility */,
10435     invalid_values: [
10436       "none",
10437       "3em",
10438       "sideways-left",
10439     ] /* sideways-left removed from CSS Writing Modes */,
10440   },
10441   "block-size": {
10442     domProp: "blockSize",
10443     inherited: false,
10444     type: CSS_TYPE_LONGHAND,
10445     logical: true,
10446     axis: true,
10447     /* XXX testing auto has prerequisites */
10448     initial_values: ["auto"],
10449     prerequisites: { display: "block" },
10450     other_values: [
10451       "15px",
10452       "3em",
10453       "15%",
10454       "max-content",
10455       "min-content",
10456       "fit-content",
10457       "stretch",
10458       "-moz-max-content",
10459       "-moz-min-content",
10460       "-moz-fit-content",
10461       "-moz-available",
10462       "-webkit-fill-available",
10463       "calc(2px)",
10464       "calc(50%)",
10465       "calc(3*25px)",
10466       "calc(25px*3)",
10467       "calc(3*25px + 50%)",
10468       "fit-content(100px)",
10469       "fit-content(10%)",
10470       "fit-content(calc(3*25px + 50%))",
10471     ],
10472     invalid_values: ["none"],
10473   },
10474   "border-block": {
10475     domProp: "borderBlock",
10476     inherited: false,
10477     type: CSS_TYPE_TRUE_SHORTHAND,
10478     subproperties: [
10479       "border-block-start-color",
10480       "border-block-start-style",
10481       "border-block-start-width",
10482       "border-block-end-color",
10483       "border-block-end-style",
10484       "border-block-end-width",
10485     ],
10486     initial_values: [
10487       "none",
10488       "medium",
10489       "currentColor",
10490       "thin",
10491       "none medium currentcolor",
10492     ],
10493     other_values: [
10494       "solid",
10495       "green",
10496       "medium solid",
10497       "green solid",
10498       "10px solid",
10499       "thick solid",
10500       "5px green none",
10501     ],
10502     invalid_values: ["5%", "5", "5 solid green"],
10503   },
10504   "border-block-end": {
10505     domProp: "borderBlockEnd",
10506     inherited: false,
10507     type: CSS_TYPE_TRUE_SHORTHAND,
10508     subproperties: [
10509       "border-block-end-color",
10510       "border-block-end-style",
10511       "border-block-end-width",
10512     ],
10513     initial_values: [
10514       "none",
10515       "medium",
10516       "currentColor",
10517       "thin",
10518       "none medium currentcolor",
10519     ],
10520     other_values: [
10521       "solid",
10522       "green",
10523       "medium solid",
10524       "green solid",
10525       "10px solid",
10526       "thick solid",
10527       "5px green none",
10528     ],
10529     invalid_values: ["5%", "5", "5 solid green"],
10530   },
10531   "border-block-color": {
10532     domProp: "borderBlockColor",
10533     inherited: false,
10534     type: CSS_TYPE_TRUE_SHORTHAND,
10535     subproperties: ["border-block-start-color", "border-block-end-color"],
10536     initial_values: ["currentColor"],
10537     other_values: ["green", "rgba(255,128,0,0.5) blue", "blue transparent"],
10538     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10539   },
10540   "border-block-end-color": {
10541     domProp: "borderBlockEndColor",
10542     inherited: false,
10543     type: CSS_TYPE_LONGHAND,
10544     applies_to_first_letter: true,
10545     logical: true,
10546     initial_values: ["currentColor"],
10547     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
10548     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10549   },
10550   "border-block-style": {
10551     domProp: "borderBlockStyle",
10552     inherited: false,
10553     type: CSS_TYPE_TRUE_SHORTHAND,
10554     subproperties: ["border-block-start-style", "border-block-end-style"],
10555     initial_values: ["none"],
10556     other_values: [
10557       "solid",
10558       "dashed solid",
10559       "solid dotted",
10560       "double double",
10561       "inset outset",
10562       "inset double",
10563       "none groove",
10564       "ridge none",
10565     ],
10566     invalid_values: [],
10567   },
10568   "border-block-end-style": {
10569     domProp: "borderBlockEndStyle",
10570     inherited: false,
10571     type: CSS_TYPE_LONGHAND,
10572     applies_to_first_letter: true,
10573     logical: true,
10574     /* XXX hidden is sometimes the same as initial */
10575     initial_values: ["none"],
10576     other_values: [
10577       "solid",
10578       "dashed",
10579       "dotted",
10580       "double",
10581       "outset",
10582       "inset",
10583       "groove",
10584       "ridge",
10585     ],
10586     invalid_values: [],
10587   },
10588   "border-block-width": {
10589     domProp: "borderBlockWidth",
10590     inherited: false,
10591     type: CSS_TYPE_TRUE_SHORTHAND,
10592     subproperties: ["border-block-start-width", "border-block-end-width"],
10593     prerequisites: { "border-style": "solid" },
10594     initial_values: ["medium", "3px", "medium medium"],
10595     other_values: [
10596       "thin",
10597       "thick",
10598       "1px",
10599       "2em",
10600       "calc(2px)",
10601       "calc(2px) thin",
10602       "calc(-2px)",
10603       "calc(-2px) thick",
10604       "calc(0em)",
10605       "medium calc(0em)",
10606       "calc(0px)",
10607       "1px calc(0px)",
10608       "calc(5em)",
10609       "1em calc(5em)",
10610     ],
10611     invalid_values: ["5%", "5", "5 thin", "thin 5%", "blue", "solid"],
10612   },
10613   "border-block-end-width": {
10614     domProp: "borderBlockEndWidth",
10615     inherited: false,
10616     type: CSS_TYPE_LONGHAND,
10617     applies_to_first_letter: true,
10618     logical: true,
10619     prerequisites: { "border-block-end-style": "solid" },
10620     initial_values: ["medium", "3px", "calc(4px - 1px)"],
10621     other_values: [
10622       "thin",
10623       "thick",
10624       "1px",
10625       "2em",
10626       "calc(2px)",
10627       "calc(-2px)",
10628       "calc(0em)",
10629       "calc(0px)",
10630       "calc(5em)",
10631       "calc(3*25px)",
10632       "calc(25px*3)",
10633       "calc(3*25px + 5em)",
10634     ],
10635     invalid_values: ["5%", "5"],
10636   },
10637   "border-block-start": {
10638     domProp: "borderBlockStart",
10639     inherited: false,
10640     type: CSS_TYPE_TRUE_SHORTHAND,
10641     subproperties: [
10642       "border-block-start-color",
10643       "border-block-start-style",
10644       "border-block-start-width",
10645     ],
10646     initial_values: [
10647       "none",
10648       "medium",
10649       "currentColor",
10650       "thin",
10651       "none medium currentcolor",
10652     ],
10653     other_values: [
10654       "solid",
10655       "green",
10656       "medium solid",
10657       "green solid",
10658       "10px solid",
10659       "thick solid",
10660       "5px green none",
10661     ],
10662     invalid_values: ["5%", "5", "5 solid green"],
10663   },
10664   "border-block-start-color": {
10665     domProp: "borderBlockStartColor",
10666     inherited: false,
10667     type: CSS_TYPE_LONGHAND,
10668     applies_to_first_letter: true,
10669     logical: true,
10670     initial_values: ["currentColor"],
10671     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
10672     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10673   },
10674   "border-block-start-style": {
10675     domProp: "borderBlockStartStyle",
10676     inherited: false,
10677     type: CSS_TYPE_LONGHAND,
10678     applies_to_first_letter: true,
10679     logical: true,
10680     /* XXX hidden is sometimes the same as initial */
10681     initial_values: ["none"],
10682     other_values: [
10683       "solid",
10684       "dashed",
10685       "dotted",
10686       "double",
10687       "outset",
10688       "inset",
10689       "groove",
10690       "ridge",
10691     ],
10692     invalid_values: [],
10693   },
10694   "border-block-start-width": {
10695     domProp: "borderBlockStartWidth",
10696     inherited: false,
10697     type: CSS_TYPE_LONGHAND,
10698     applies_to_first_letter: true,
10699     logical: true,
10700     prerequisites: { "border-block-start-style": "solid" },
10701     initial_values: ["medium", "3px", "calc(4px - 1px)"],
10702     other_values: [
10703       "thin",
10704       "thick",
10705       "1px",
10706       "2em",
10707       "calc(2px)",
10708       "calc(-2px)",
10709       "calc(0em)",
10710       "calc(0px)",
10711       "calc(5em)",
10712       "calc(3*25px)",
10713       "calc(25px*3)",
10714       "calc(3*25px + 5em)",
10715     ],
10716     invalid_values: ["5%", "5"],
10717   },
10718   "-moz-border-end": {
10719     domProp: "MozBorderEnd",
10720     inherited: false,
10721     type: CSS_TYPE_TRUE_SHORTHAND,
10722     alias_for: "border-inline-end",
10723     subproperties: [
10724       "-moz-border-end-color",
10725       "-moz-border-end-style",
10726       "-moz-border-end-width",
10727     ],
10728   },
10729   "-moz-border-end-color": {
10730     domProp: "MozBorderEndColor",
10731     inherited: false,
10732     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10733     applies_to_first_letter: true,
10734     alias_for: "border-inline-end-color",
10735     subproperties: ["border-inline-end-color"],
10736   },
10737   "-moz-border-end-style": {
10738     domProp: "MozBorderEndStyle",
10739     inherited: false,
10740     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10741     applies_to_first_letter: true,
10742     alias_for: "border-inline-end-style",
10743     subproperties: ["border-inline-end-style"],
10744   },
10745   "-moz-border-end-width": {
10746     domProp: "MozBorderEndWidth",
10747     inherited: false,
10748     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10749     applies_to_first_letter: true,
10750     alias_for: "border-inline-end-width",
10751     subproperties: ["border-inline-end-width"],
10752   },
10753   "-moz-border-start": {
10754     domProp: "MozBorderStart",
10755     inherited: false,
10756     type: CSS_TYPE_TRUE_SHORTHAND,
10757     alias_for: "border-inline-start",
10758     subproperties: [
10759       "-moz-border-start-color",
10760       "-moz-border-start-style",
10761       "-moz-border-start-width",
10762     ],
10763   },
10764   "-moz-border-start-color": {
10765     domProp: "MozBorderStartColor",
10766     inherited: false,
10767     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10768     applies_to_first_letter: true,
10769     alias_for: "border-inline-start-color",
10770     subproperties: ["border-inline-start-color"],
10771   },
10772   "-moz-border-start-style": {
10773     domProp: "MozBorderStartStyle",
10774     inherited: false,
10775     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10776     applies_to_first_letter: true,
10777     alias_for: "border-inline-start-style",
10778     subproperties: ["border-inline-start-style"],
10779   },
10780   "-moz-border-start-width": {
10781     domProp: "MozBorderStartWidth",
10782     inherited: false,
10783     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10784     applies_to_first_letter: true,
10785     alias_for: "border-inline-start-width",
10786     subproperties: ["border-inline-start-width"],
10787   },
10788   "inline-size": {
10789     domProp: "inlineSize",
10790     inherited: false,
10791     type: CSS_TYPE_LONGHAND,
10792     logical: true,
10793     axis: true,
10794     /* XXX testing auto has prerequisites */
10795     initial_values: ["auto"],
10796     prerequisites: {
10797       display: "block",
10798       // add some margin to avoid the initial "auto" value getting
10799       // resolved to the same length as the parent element.
10800       "margin-left": "5px",
10801     },
10802     other_values: [
10803       "15px",
10804       "3em",
10805       "15%",
10806       "max-content",
10807       "min-content",
10808       "fit-content",
10809       "stretch",
10810       "-moz-max-content",
10811       "-moz-min-content",
10812       "-moz-fit-content",
10813       "-moz-available",
10814       "-webkit-fill-available",
10815       "calc(2px)",
10816       "calc(50%)",
10817       "calc(3*25px)",
10818       "calc(25px*3)",
10819       "calc(3*25px + 50%)",
10820       "fit-content(100px)",
10821       "fit-content(10%)",
10822       "fit-content(calc(3*25px + 50%))",
10823     ],
10824     invalid_values: ["none"],
10825   },
10826   "margin-block": {
10827     domProp: "marginBlock",
10828     inherited: false,
10829     type: CSS_TYPE_TRUE_SHORTHAND,
10830     subproperties: ["margin-block-start", "margin-block-end"],
10831     initial_values: ["0", "0px 0em"],
10832     other_values: [
10833       "1px",
10834       "3em 1%",
10835       "5%",
10836       "calc(2px) 1%",
10837       "calc(-2px) 1%",
10838       "calc(50%) 1%",
10839       "calc(3*25px) calc(2px)",
10840       "calc(25px*3) 1em",
10841       "calc(3*25px + 50%) calc(3*25px - 50%)",
10842     ],
10843     invalid_values: [
10844       "5",
10845       "..25px",
10846       ".+5px",
10847       ".px",
10848       "-.px",
10849       "++5px",
10850       "-+4px",
10851       "+-3px",
10852       "--7px",
10853       "+-.6px",
10854       "-+.5px",
10855       "++.7px",
10856       "--.4px",
10857     ],
10858   },
10859   "margin-block-end": {
10860     domProp: "marginBlockEnd",
10861     inherited: false,
10862     type: CSS_TYPE_LONGHAND,
10863     applies_to_first_letter: true,
10864     logical: true,
10865     /* XXX testing auto has prerequisites */
10866     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
10867     other_values: [
10868       "1px",
10869       "2em",
10870       "5%",
10871       "calc(2px)",
10872       "calc(-2px)",
10873       "calc(50%)",
10874       "calc(3*25px)",
10875       "calc(25px*3)",
10876       "calc(3*25px + 50%)",
10877     ],
10878     invalid_values: [
10879       "..25px",
10880       ".+5px",
10881       ".px",
10882       "-.px",
10883       "++5px",
10884       "-+4px",
10885       "+-3px",
10886       "--7px",
10887       "+-.6px",
10888       "-+.5px",
10889       "++.7px",
10890       "--.4px",
10891     ],
10892   },
10893   "margin-block-start": {
10894     domProp: "marginBlockStart",
10895     inherited: false,
10896     type: CSS_TYPE_LONGHAND,
10897     applies_to_first_letter: true,
10898     logical: true,
10899     /* XXX testing auto has prerequisites */
10900     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
10901     other_values: [
10902       "1px",
10903       "2em",
10904       "5%",
10905       "calc(2px)",
10906       "calc(-2px)",
10907       "calc(50%)",
10908       "calc(3*25px)",
10909       "calc(25px*3)",
10910       "calc(3*25px + 50%)",
10911     ],
10912     invalid_values: [
10913       "..25px",
10914       ".+5px",
10915       ".px",
10916       "-.px",
10917       "++5px",
10918       "-+4px",
10919       "+-3px",
10920       "--7px",
10921       "+-.6px",
10922       "-+.5px",
10923       "++.7px",
10924       "--.4px",
10925     ],
10926   },
10927   "-moz-margin-end": {
10928     domProp: "MozMarginEnd",
10929     inherited: false,
10930     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10931     applies_to_first_letter: true,
10932     alias_for: "margin-inline-end",
10933     subproperties: ["margin-inline-end"],
10934   },
10935   "-moz-margin-start": {
10936     domProp: "MozMarginStart",
10937     inherited: false,
10938     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10939     applies_to_first_letter: true,
10940     alias_for: "margin-inline-start",
10941     subproperties: ["margin-inline-start"],
10942   },
10943   "max-block-size": {
10944     domProp: "maxBlockSize",
10945     inherited: false,
10946     type: CSS_TYPE_LONGHAND,
10947     logical: true,
10948     axis: true,
10949     prerequisites: { display: "block" },
10950     initial_values: ["none"],
10951     other_values: [
10952       "30px",
10953       "50%",
10954       "max-content",
10955       "min-content",
10956       "fit-content",
10957       "stretch",
10958       "-moz-max-content",
10959       "-moz-min-content",
10960       "-moz-fit-content",
10961       "-moz-available",
10962       "-webkit-fill-available",
10963       "calc(2px)",
10964       "calc(50%)",
10965       "calc(3*25px)",
10966       "calc(25px*3)",
10967       "calc(3*25px + 50%)",
10968       "fit-content(100px)",
10969       "fit-content(10%)",
10970       "fit-content(calc(3*25px + 50%))",
10971     ],
10972     invalid_values: ["auto", "5"],
10973   },
10974   "max-inline-size": {
10975     domProp: "maxInlineSize",
10976     inherited: false,
10977     type: CSS_TYPE_LONGHAND,
10978     logical: true,
10979     axis: true,
10980     prerequisites: { display: "block" },
10981     initial_values: ["none"],
10982     other_values: [
10983       "30px",
10984       "50%",
10985       "max-content",
10986       "min-content",
10987       "fit-content",
10988       "stretch",
10989       "-moz-max-content",
10990       "-moz-min-content",
10991       "-moz-fit-content",
10992       "-moz-available",
10993       "-webkit-fill-available",
10994       "calc(2px)",
10995       "calc(50%)",
10996       "calc(3*25px)",
10997       "calc(25px*3)",
10998       "calc(3*25px + 50%)",
10999       "fit-content(100px)",
11000       "fit-content(10%)",
11001       "fit-content(calc(3*25px + 50%))",
11002     ],
11003     invalid_values: ["auto", "5"],
11004   },
11005   "min-block-size": {
11006     domProp: "minBlockSize",
11007     inherited: false,
11008     type: CSS_TYPE_LONGHAND,
11009     logical: true,
11010     axis: true,
11011     prerequisites: { display: "block" },
11012     initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
11013     other_values: [
11014       "30px",
11015       "50%",
11016       "max-content",
11017       "min-content",
11018       "fit-content",
11019       "stretch",
11020       "-moz-max-content",
11021       "-moz-min-content",
11022       "-moz-fit-content",
11023       "-moz-available",
11024       "-webkit-fill-available",
11025       "calc(-1%)",
11026       "calc(2px)",
11027       "calc(50%)",
11028       "calc(3*25px)",
11029       "calc(25px*3)",
11030       "calc(3*25px + 50%)",
11031       "fit-content(100px)",
11032       "fit-content(10%)",
11033       "fit-content(calc(3*25px + 50%))",
11034     ],
11035     invalid_values: ["none", "5"],
11036   },
11037   "min-inline-size": {
11038     domProp: "minInlineSize",
11039     inherited: false,
11040     type: CSS_TYPE_LONGHAND,
11041     logical: true,
11042     axis: true,
11043     prerequisites: { display: "block" },
11044     initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
11045     other_values: [
11046       "30px",
11047       "50%",
11048       "max-content",
11049       "min-content",
11050       "fit-content",
11051       "stretch",
11052       "-moz-max-content",
11053       "-moz-min-content",
11054       "-moz-fit-content",
11055       "-moz-available",
11056       "-webkit-fill-available",
11057       "calc(-1%)",
11058       "calc(2px)",
11059       "calc(50%)",
11060       "calc(3*25px)",
11061       "calc(25px*3)",
11062       "calc(3*25px + 50%)",
11063       "fit-content(100px)",
11064       "fit-content(10%)",
11065       "fit-content(calc(3*25px + 50%))",
11066     ],
11067     invalid_values: ["none", "5"],
11068   },
11069   inset: {
11070     domProp: "inset",
11071     inherited: false,
11072     type: CSS_TYPE_TRUE_SHORTHAND,
11073     subproperties: ["top", "right", "bottom", "left"],
11074     /* FIXME: run tests with multiple prerequisites */
11075     prerequisites: { position: "relative" },
11076     initial_values: ["auto"],
11077     other_values: [
11078       "3px 0",
11079       "2em 4px 2pt",
11080       "1em 2em 3px 4px",
11081       "1em calc(2em + 3px) 4ex 5cm",
11082     ],
11083     invalid_values: ["1px calc(nonsense)", "1px red", "3"],
11084     unbalanced_values: ["1px calc("],
11085   },
11086   "inset-block": {
11087     domProp: "insetBlock",
11088     inherited: false,
11089     type: CSS_TYPE_TRUE_SHORTHAND,
11090     subproperties: ["inset-block-start", "inset-block-end"],
11091     /* FIXME: run tests with multiple prerequisites */
11092     prerequisites: { position: "relative" },
11093     initial_values: ["auto", "auto auto"],
11094     other_values: [
11095       "32px",
11096       "-3em",
11097       "12%",
11098       "32px auto",
11099       "auto -3em",
11100       "12% auto",
11101       "calc(2px)",
11102       "calc(2px) auto",
11103       "calc(-2px)",
11104       "auto calc(-2px)",
11105       "calc(50%)",
11106       "auto calc(50%)",
11107       "calc(3*25px)",
11108       "calc(3*25px) auto",
11109       "calc(25px*3)",
11110       "auto calc(25px*3)",
11111       "calc(3*25px + 50%)",
11112       "auto calc(3*25px + 50%)",
11113     ],
11114     invalid_values: ["none"],
11115   },
11116   "inset-block-end": {
11117     domProp: "insetBlockEnd",
11118     inherited: false,
11119     type: CSS_TYPE_LONGHAND,
11120     logical: true,
11121     /* FIXME: run tests with multiple prerequisites */
11122     prerequisites: { position: "relative" },
11123     /* XXX 0 may or may not be equal to auto */
11124     initial_values: ["auto"],
11125     other_values: [
11126       "32px",
11127       "-3em",
11128       "12%",
11129       "calc(2px)",
11130       "calc(-2px)",
11131       "calc(50%)",
11132       "calc(3*25px)",
11133       "calc(25px*3)",
11134       "calc(3*25px + 50%)",
11135     ],
11136     invalid_values: [],
11137   },
11138   "inset-block-start": {
11139     domProp: "insetBlockStart",
11140     inherited: false,
11141     type: CSS_TYPE_LONGHAND,
11142     logical: true,
11143     /* FIXME: run tests with multiple prerequisites */
11144     prerequisites: { position: "relative" },
11145     /* XXX 0 may or may not be equal to auto */
11146     initial_values: ["auto"],
11147     other_values: [
11148       "32px",
11149       "-3em",
11150       "12%",
11151       "calc(2px)",
11152       "calc(-2px)",
11153       "calc(50%)",
11154       "calc(3*25px)",
11155       "calc(25px*3)",
11156       "calc(3*25px + 50%)",
11157     ],
11158     invalid_values: [],
11159   },
11160   "inset-inline": {
11161     domProp: "insetInline",
11162     inherited: false,
11163     type: CSS_TYPE_TRUE_SHORTHAND,
11164     subproperties: ["inset-inline-start", "inset-inline-end"],
11165     /* FIXME: run tests with multiple prerequisites */
11166     prerequisites: { position: "relative" },
11167     initial_values: ["auto", "auto auto"],
11168     other_values: [
11169       "32px",
11170       "-3em",
11171       "12%",
11172       "32px auto",
11173       "auto -3em",
11174       "12% auto",
11175       "calc(2px)",
11176       "calc(2px) auto",
11177       "calc(-2px)",
11178       "auto calc(-2px)",
11179       "calc(50%)",
11180       "auto calc(50%)",
11181       "calc(3*25px)",
11182       "calc(3*25px) auto",
11183       "calc(25px*3)",
11184       "auto calc(25px*3)",
11185       "calc(3*25px + 50%)",
11186       "auto calc(3*25px + 50%)",
11187     ],
11188     invalid_values: ["none"],
11189   },
11190   "inset-inline-end": {
11191     domProp: "insetInlineEnd",
11192     inherited: false,
11193     type: CSS_TYPE_LONGHAND,
11194     logical: true,
11195     /* FIXME: run tests with multiple prerequisites */
11196     prerequisites: { position: "relative" },
11197     /* XXX 0 may or may not be equal to auto */
11198     initial_values: ["auto"],
11199     other_values: [
11200       "32px",
11201       "-3em",
11202       "12%",
11203       "calc(2px)",
11204       "calc(-2px)",
11205       "calc(50%)",
11206       "calc(3*25px)",
11207       "calc(25px*3)",
11208       "calc(3*25px + 50%)",
11209     ],
11210     invalid_values: [],
11211   },
11212   "inset-inline-start": {
11213     domProp: "insetInlineStart",
11214     inherited: false,
11215     type: CSS_TYPE_LONGHAND,
11216     logical: true,
11217     /* FIXME: run tests with multiple prerequisites */
11218     prerequisites: { position: "relative" },
11219     /* XXX 0 may or may not be equal to auto */
11220     initial_values: ["auto"],
11221     other_values: [
11222       "32px",
11223       "-3em",
11224       "12%",
11225       "calc(2px)",
11226       "calc(-2px)",
11227       "calc(50%)",
11228       "calc(3*25px)",
11229       "calc(25px*3)",
11230       "calc(3*25px + 50%)",
11231     ],
11232     invalid_values: [],
11233   },
11234   "padding-block-end": {
11235     domProp: "paddingBlockEnd",
11236     inherited: false,
11237     type: CSS_TYPE_LONGHAND,
11238     applies_to_first_letter: true,
11239     // No applies_to_placeholder because we have a !important rule in forms.css.
11240     logical: true,
11241     initial_values: [
11242       "0",
11243       "0px",
11244       "0%",
11245       "calc(0pt)",
11246       "calc(0% + 0px)",
11247       "calc(-3px)",
11248       "calc(-1%)",
11249     ],
11250     other_values: [
11251       "1px",
11252       "2em",
11253       "5%",
11254       "calc(2px)",
11255       "calc(50%)",
11256       "calc(3*25px)",
11257       "calc(25px*3)",
11258       "calc(3*25px + 50%)",
11259     ],
11260     invalid_values: [],
11261   },
11262   "padding-block-start": {
11263     domProp: "paddingBlockStart",
11264     inherited: false,
11265     type: CSS_TYPE_LONGHAND,
11266     applies_to_first_letter: true,
11267     // No applies_to_placeholder because we have a !important rule in forms.css.
11268     logical: true,
11269     initial_values: [
11270       "0",
11271       "0px",
11272       "0%",
11273       "calc(0pt)",
11274       "calc(0% + 0px)",
11275       "calc(-3px)",
11276       "calc(-1%)",
11277     ],
11278     other_values: [
11279       "1px",
11280       "2em",
11281       "5%",
11282       "calc(2px)",
11283       "calc(50%)",
11284       "calc(3*25px)",
11285       "calc(25px*3)",
11286       "calc(3*25px + 50%)",
11287     ],
11288     invalid_values: [],
11289   },
11290   "-moz-padding-end": {
11291     domProp: "MozPaddingEnd",
11292     inherited: false,
11293     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11294     applies_to_first_letter: true,
11295     alias_for: "padding-inline-end",
11296     subproperties: ["padding-inline-end"],
11297   },
11298   "-moz-padding-start": {
11299     domProp: "MozPaddingStart",
11300     inherited: false,
11301     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11302     applies_to_first_letter: true,
11303     alias_for: "padding-inline-start",
11304     subproperties: ["padding-inline-start"],
11305   },
11306   "-webkit-animation": {
11307     domProp: "webkitAnimation",
11308     inherited: false,
11309     type: CSS_TYPE_TRUE_SHORTHAND,
11310     applies_to_marker: true,
11311     alias_for: "animation",
11312     subproperties: [
11313       "animation-name",
11314       "animation-duration",
11315       "animation-timing-function",
11316       "animation-delay",
11317       "animation-direction",
11318       "animation-fill-mode",
11319       "animation-iteration-count",
11320       "animation-play-state",
11321     ],
11322   },
11323   "-webkit-animation-delay": {
11324     domProp: "webkitAnimationDelay",
11325     inherited: false,
11326     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11327     applies_to_marker: true,
11328     alias_for: "animation-delay",
11329     subproperties: ["animation-delay"],
11330   },
11331   "-webkit-animation-direction": {
11332     domProp: "webkitAnimationDirection",
11333     inherited: false,
11334     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11335     applies_to_marker: true,
11336     alias_for: "animation-direction",
11337     subproperties: ["animation-direction"],
11338   },
11339   "-webkit-animation-duration": {
11340     domProp: "webkitAnimationDuration",
11341     inherited: false,
11342     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11343     applies_to_marker: true,
11344     alias_for: "animation-duration",
11345     subproperties: ["animation-duration"],
11346   },
11347   "-webkit-animation-fill-mode": {
11348     domProp: "webkitAnimationFillMode",
11349     inherited: false,
11350     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11351     applies_to_marker: true,
11352     alias_for: "animation-fill-mode",
11353     subproperties: ["animation-fill-mode"],
11354   },
11355   "-webkit-animation-iteration-count": {
11356     domProp: "webkitAnimationIterationCount",
11357     inherited: false,
11358     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11359     applies_to_marker: true,
11360     alias_for: "animation-iteration-count",
11361     subproperties: ["animation-iteration-count"],
11362   },
11363   "-webkit-animation-name": {
11364     domProp: "webkitAnimationName",
11365     inherited: false,
11366     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11367     applies_to_marker: true,
11368     alias_for: "animation-name",
11369     subproperties: ["animation-name"],
11370   },
11371   "-webkit-animation-play-state": {
11372     domProp: "webkitAnimationPlayState",
11373     inherited: false,
11374     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11375     applies_to_marker: true,
11376     alias_for: "animation-play-state",
11377     subproperties: ["animation-play-state"],
11378   },
11379   "-webkit-animation-timing-function": {
11380     domProp: "webkitAnimationTimingFunction",
11381     inherited: false,
11382     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11383     applies_to_marker: true,
11384     alias_for: "animation-timing-function",
11385     subproperties: ["animation-timing-function"],
11386   },
11387   "-webkit-clip-path": {
11388     domProp: "webkitClipPath",
11389     inherited: false,
11390     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11391     alias_for: "clip-path",
11392     subproperties: ["clip-path"],
11393   },
11394   "-webkit-filter": {
11395     domProp: "webkitFilter",
11396     inherited: false,
11397     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11398     alias_for: "filter",
11399     subproperties: ["filter"],
11400   },
11401   "-webkit-text-security": {
11402     domProp: "webkitTextSecurity",
11403     inherited: true,
11404     type: CSS_TYPE_LONGHAND,
11405     applies_to_first_letter: true,
11406     applies_to_first_line: true,
11407     applies_to_placeholder: true,
11408     initial_values: ["none"],
11409     other_values: ["circle", "disc", "square"],
11410     invalid_values: ["0", "auto", "true", "'*'"],
11411   },
11412   "-webkit-text-fill-color": {
11413     domProp: "webkitTextFillColor",
11414     inherited: true,
11415     type: CSS_TYPE_LONGHAND,
11416     applies_to_first_letter: true,
11417     applies_to_first_line: true,
11418     applies_to_placeholder: true,
11419     prerequisites: { color: "black" },
11420     initial_values: ["currentColor", "black", "#000", "#000000", "rgb(0,0,0)"],
11421     other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
11422     invalid_values: [
11423       "#0",
11424       "#00",
11425       "#00000",
11426       "#0000000",
11427       "#000000000",
11428       "000000",
11429       "ff00ff",
11430       "rgb(255,xxx,255)",
11431     ],
11432   },
11433   "-webkit-text-stroke": {
11434     domProp: "webkitTextStroke",
11435     inherited: true,
11436     type: CSS_TYPE_TRUE_SHORTHAND,
11437     prerequisites: { color: "black" },
11438     subproperties: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"],
11439     initial_values: [
11440       "0 currentColor",
11441       "currentColor 0px",
11442       "0",
11443       "currentColor",
11444       "0px black",
11445     ],
11446     other_values: [
11447       "thin black",
11448       "#f00 medium",
11449       "thick rgba(0,0,255,0.5)",
11450       "calc(4px - 8px) green",
11451       "2px",
11452       "green 0",
11453       "currentColor 4em",
11454       "currentColor calc(5px - 1px)",
11455     ],
11456     invalid_values: ["-3px black", "calc(50%+ 2px) #000", "30% #f00"],
11457   },
11458   "-webkit-text-stroke-color": {
11459     domProp: "webkitTextStrokeColor",
11460     inherited: true,
11461     type: CSS_TYPE_LONGHAND,
11462     applies_to_first_letter: true,
11463     applies_to_first_line: true,
11464     applies_to_placeholder: true,
11465     prerequisites: { color: "black" },
11466     initial_values: ["currentColor", "black", "#000", "#000000", "rgb(0,0,0)"],
11467     other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
11468     invalid_values: [
11469       "#0",
11470       "#00",
11471       "#00000",
11472       "#0000000",
11473       "#000000000",
11474       "000000",
11475       "ff00ff",
11476       "rgb(255,xxx,255)",
11477     ],
11478   },
11479   "-webkit-text-stroke-width": {
11480     domProp: "webkitTextStrokeWidth",
11481     inherited: true,
11482     type: CSS_TYPE_LONGHAND,
11483     applies_to_first_letter: true,
11484     applies_to_first_line: true,
11485     applies_to_placeholder: true,
11486     initial_values: ["0", "0px", "0em", "0ex", "calc(0pt)", "calc(4px - 8px)"],
11487     other_values: [
11488       "thin",
11489       "medium",
11490       "thick",
11491       "17px",
11492       "0.2em",
11493       "calc(3*25px + 5em)",
11494       "calc(5px - 1px)",
11495     ],
11496     invalid_values: [
11497       "5%",
11498       "1px calc(nonsense)",
11499       "1px red",
11500       "-0.1px",
11501       "-3px",
11502       "30%",
11503     ],
11504   },
11505   "-webkit-text-size-adjust": {
11506     domProp: "webkitTextSizeAdjust",
11507     inherited: true,
11508     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11509     alias_for: "-moz-text-size-adjust",
11510     subproperties: ["-moz-text-size-adjust"],
11511   },
11512   "-webkit-transform": {
11513     domProp: "webkitTransform",
11514     inherited: false,
11515     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11516     alias_for: "transform",
11517     subproperties: ["transform"],
11518   },
11519   "-webkit-transform-origin": {
11520     domProp: "webkitTransformOrigin",
11521     inherited: false,
11522     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11523     alias_for: "transform-origin",
11524     subproperties: ["transform-origin"],
11525   },
11526   "-webkit-transform-style": {
11527     domProp: "webkitTransformStyle",
11528     inherited: false,
11529     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11530     alias_for: "transform-style",
11531     subproperties: ["transform-style"],
11532   },
11533   "-webkit-backface-visibility": {
11534     domProp: "webkitBackfaceVisibility",
11535     inherited: false,
11536     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11537     alias_for: "backface-visibility",
11538     subproperties: ["backface-visibility"],
11539   },
11540   "-webkit-perspective": {
11541     domProp: "webkitPerspective",
11542     inherited: false,
11543     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11544     alias_for: "perspective",
11545     subproperties: ["perspective"],
11546   },
11547   "-webkit-perspective-origin": {
11548     domProp: "webkitPerspectiveOrigin",
11549     inherited: false,
11550     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11551     alias_for: "perspective-origin",
11552     subproperties: ["perspective-origin"],
11553   },
11554   "-webkit-transition": {
11555     domProp: "webkitTransition",
11556     inherited: false,
11557     type: CSS_TYPE_TRUE_SHORTHAND,
11558     applies_to_marker: true,
11559     alias_for: "transition",
11560     subproperties: [
11561       "transition-property",
11562       "transition-duration",
11563       "transition-timing-function",
11564       "transition-delay",
11565     ],
11566   },
11567   "-webkit-transition-delay": {
11568     domProp: "webkitTransitionDelay",
11569     inherited: false,
11570     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11571     applies_to_marker: true,
11572     alias_for: "transition-delay",
11573     subproperties: ["transition-delay"],
11574   },
11575   "-webkit-transition-duration": {
11576     domProp: "webkitTransitionDuration",
11577     inherited: false,
11578     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11579     applies_to_marker: true,
11580     alias_for: "transition-duration",
11581     subproperties: ["transition-duration"],
11582   },
11583   "-webkit-transition-property": {
11584     domProp: "webkitTransitionProperty",
11585     inherited: false,
11586     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11587     applies_to_marker: true,
11588     alias_for: "transition-property",
11589     subproperties: ["transition-property"],
11590   },
11591   "-webkit-transition-timing-function": {
11592     domProp: "webkitTransitionTimingFunction",
11593     inherited: false,
11594     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11595     applies_to_marker: true,
11596     alias_for: "transition-timing-function",
11597     subproperties: ["transition-timing-function"],
11598   },
11599   "-webkit-border-radius": {
11600     domProp: "webkitBorderRadius",
11601     inherited: false,
11602     type: CSS_TYPE_TRUE_SHORTHAND,
11603     alias_for: "border-radius",
11604     subproperties: [
11605       "border-bottom-left-radius",
11606       "border-bottom-right-radius",
11607       "border-top-left-radius",
11608       "border-top-right-radius",
11609     ],
11610   },
11611   "-webkit-border-top-left-radius": {
11612     domProp: "webkitBorderTopLeftRadius",
11613     inherited: false,
11614     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11615     applies_to_first_letter: true,
11616     alias_for: "border-top-left-radius",
11617     subproperties: ["border-top-left-radius"],
11618   },
11619   "-webkit-border-top-right-radius": {
11620     domProp: "webkitBorderTopRightRadius",
11621     inherited: false,
11622     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11623     applies_to_first_letter: true,
11624     alias_for: "border-top-right-radius",
11625     subproperties: ["border-top-right-radius"],
11626   },
11627   "-webkit-border-bottom-left-radius": {
11628     domProp: "webkitBorderBottomLeftRadius",
11629     inherited: false,
11630     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11631     applies_to_first_letter: true,
11632     alias_for: "border-bottom-left-radius",
11633     subproperties: ["border-bottom-left-radius"],
11634   },
11635   "-webkit-border-bottom-right-radius": {
11636     domProp: "webkitBorderBottomRightRadius",
11637     inherited: false,
11638     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11639     applies_to_first_letter: true,
11640     alias_for: "border-bottom-right-radius",
11641     subproperties: ["border-bottom-right-radius"],
11642   },
11643   "-webkit-background-clip": {
11644     domProp: "webkitBackgroundClip",
11645     inherited: false,
11646     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11647     applies_to_first_letter: true,
11648     applies_to_first_line: true,
11649     applies_to_placeholder: true,
11650     applies_to_cue: true,
11651     alias_for: "background-clip",
11652     subproperties: ["background-clip"],
11653   },
11654   "-webkit-background-origin": {
11655     domProp: "webkitBackgroundOrigin",
11656     inherited: false,
11657     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11658     applies_to_first_letter: true,
11659     applies_to_first_line: true,
11660     applies_to_placeholder: true,
11661     applies_to_cue: true,
11662     alias_for: "background-origin",
11663     subproperties: ["background-origin"],
11664   },
11665   "-webkit-background-size": {
11666     domProp: "webkitBackgroundSize",
11667     inherited: false,
11668     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11669     applies_to_first_letter: true,
11670     applies_to_first_line: true,
11671     applies_to_placeholder: true,
11672     applies_to_cue: true,
11673     alias_for: "background-size",
11674     subproperties: ["background-size"],
11675   },
11676   "-webkit-border-image": {
11677     domProp: "webkitBorderImage",
11678     inherited: false,
11679     type: CSS_TYPE_TRUE_SHORTHAND,
11680     alias_for: "border-image",
11681     subproperties: [
11682       "border-image-source",
11683       "border-image-slice",
11684       "border-image-width",
11685       "border-image-outset",
11686       "border-image-repeat",
11687     ],
11688   },
11689   "-webkit-box-shadow": {
11690     domProp: "webkitBoxShadow",
11691     inherited: false,
11692     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11693     applies_to_first_letter: true,
11694     alias_for: "box-shadow",
11695     subproperties: ["box-shadow"],
11696   },
11697   "-webkit-box-sizing": {
11698     domProp: "webkitBoxSizing",
11699     inherited: false,
11700     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11701     alias_for: "box-sizing",
11702     subproperties: ["box-sizing"],
11703   },
11704   "-webkit-box-flex": {
11705     domProp: "webkitBoxFlex",
11706     inherited: false,
11707     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11708     alias_for: "-moz-box-flex",
11709     subproperties: ["-moz-box-flex"],
11710   },
11711   "-webkit-box-ordinal-group": {
11712     domProp: "webkitBoxOrdinalGroup",
11713     inherited: false,
11714     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11715     alias_for: "-moz-box-ordinal-group",
11716     subproperties: ["-moz-box-ordinal-group"],
11717   },
11718   "-webkit-box-orient": {
11719     domProp: "webkitBoxOrient",
11720     inherited: false,
11721     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11722     alias_for: "-moz-box-orient",
11723     subproperties: ["-moz-box-orient"],
11724   },
11725   "-webkit-box-direction": {
11726     domProp: "webkitBoxDirection",
11727     inherited: false,
11728     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11729     alias_for: "-moz-box-direction",
11730     subproperties: ["-moz-box-direction"],
11731   },
11732   "-webkit-box-align": {
11733     domProp: "webkitBoxAlign",
11734     inherited: false,
11735     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11736     alias_for: "-moz-box-align",
11737     subproperties: ["-moz-box-align"],
11738   },
11739   "-webkit-box-pack": {
11740     domProp: "webkitBoxPack",
11741     inherited: false,
11742     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11743     alias_for: "-moz-box-pack",
11744     subproperties: ["-moz-box-pack"],
11745   },
11746   "-webkit-flex-direction": {
11747     domProp: "webkitFlexDirection",
11748     inherited: false,
11749     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11750     alias_for: "flex-direction",
11751     subproperties: ["flex-direction"],
11752   },
11753   "-webkit-flex-wrap": {
11754     domProp: "webkitFlexWrap",
11755     inherited: false,
11756     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11757     alias_for: "flex-wrap",
11758     subproperties: ["flex-wrap"],
11759   },
11760   "-webkit-flex-flow": {
11761     domProp: "webkitFlexFlow",
11762     inherited: false,
11763     type: CSS_TYPE_TRUE_SHORTHAND,
11764     alias_for: "flex-flow",
11765     subproperties: ["flex-direction", "flex-wrap"],
11766   },
11767   "-webkit-font-feature-settings": {
11768     domProp: "webkitFontFeatureSettings",
11769     inherited: true,
11770     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11771     applies_to_first_letter: true,
11772     applies_to_first_line: true,
11773     applies_to_marker: true,
11774     applies_to_placeholder: true,
11775     applies_to_cue: true,
11776     alias_for: "font-feature-settings",
11777     subproperties: ["font-feature-settings"],
11778   },
11779   "-webkit-line-clamp": {
11780     domProp: "webkitLineClamp",
11781     inherited: false,
11782     type: CSS_TYPE_LONGHAND,
11783     initial_values: ["none"],
11784     other_values: ["1", "2"],
11785     invalid_values: ["auto", "0", "-1"],
11786   },
11787   "-webkit-order": {
11788     domProp: "webkitOrder",
11789     inherited: false,
11790     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11791     alias_for: "order",
11792     subproperties: ["order"],
11793   },
11794   "-webkit-flex": {
11795     domProp: "webkitFlex",
11796     inherited: false,
11797     type: CSS_TYPE_TRUE_SHORTHAND,
11798     alias_for: "flex",
11799     subproperties: ["flex-grow", "flex-shrink", "flex-basis"],
11800   },
11801   "-webkit-flex-grow": {
11802     domProp: "webkitFlexGrow",
11803     inherited: false,
11804     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11805     alias_for: "flex-grow",
11806     subproperties: ["flex-grow"],
11807   },
11808   "-webkit-flex-shrink": {
11809     domProp: "webkitFlexShrink",
11810     inherited: false,
11811     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11812     alias_for: "flex-shrink",
11813     subproperties: ["flex-shrink"],
11814   },
11815   "-webkit-flex-basis": {
11816     domProp: "webkitFlexBasis",
11817     inherited: false,
11818     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11819     alias_for: "flex-basis",
11820     subproperties: ["flex-basis"],
11821   },
11822   "-webkit-justify-content": {
11823     domProp: "webkitJustifyContent",
11824     inherited: false,
11825     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11826     alias_for: "justify-content",
11827     subproperties: ["justify-content"],
11828   },
11829   "-webkit-align-items": {
11830     domProp: "webkitAlignItems",
11831     inherited: false,
11832     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11833     alias_for: "align-items",
11834     subproperties: ["align-items"],
11835   },
11836   "-webkit-align-self": {
11837     domProp: "webkitAlignSelf",
11838     inherited: false,
11839     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11840     alias_for: "align-self",
11841     subproperties: ["align-self"],
11842   },
11843   "-webkit-align-content": {
11844     domProp: "webkitAlignContent",
11845     inherited: false,
11846     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11847     alias_for: "align-content",
11848     subproperties: ["align-content"],
11849   },
11850   "-webkit-user-select": {
11851     domProp: "webkitUserSelect",
11852     inherited: false,
11853     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11854     alias_for: "user-select",
11855     subproperties: ["user-select"],
11856   },
11857   "-webkit-mask": {
11858     domProp: "webkitMask",
11859     inherited: false,
11860     type: CSS_TYPE_TRUE_SHORTHAND,
11861     alias_for: "mask",
11862     subproperties: [
11863       "mask-clip",
11864       "mask-image",
11865       "mask-mode",
11866       "mask-origin",
11867       "mask-position",
11868       "mask-repeat",
11869       "mask-size",
11870       "mask-composite",
11871     ],
11872   },
11873   "-webkit-mask-clip": {
11874     domProp: "webkitMaskClip",
11875     inherited: false,
11876     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11877     alias_for: "mask-clip",
11878     subproperties: ["mask-clip"],
11879   },
11881   "-webkit-mask-composite": {
11882     domProp: "webkitMaskComposite",
11883     inherited: false,
11884     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11885     alias_for: "mask-composite",
11886     subproperties: ["mask-composite"],
11887   },
11889   "-webkit-mask-image": {
11890     domProp: "webkitMaskImage",
11891     inherited: false,
11892     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11893     alias_for: "mask-image",
11894     subproperties: ["mask-image"],
11895   },
11896   "-webkit-mask-origin": {
11897     domProp: "webkitMaskOrigin",
11898     inherited: false,
11899     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11900     alias_for: "mask-origin",
11901     subproperties: ["mask-origin"],
11902   },
11903   "-webkit-mask-position": {
11904     domProp: "webkitMaskPosition",
11905     inherited: false,
11906     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11907     alias_for: "mask-position",
11908     subproperties: ["mask-position"],
11909   },
11910   "-webkit-mask-position-x": {
11911     domProp: "webkitMaskPositionX",
11912     inherited: false,
11913     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11914     alias_for: "mask-position-x",
11915     subproperties: ["mask-position-x"],
11916   },
11917   "-webkit-mask-position-y": {
11918     domProp: "webkitMaskPositionY",
11919     inherited: false,
11920     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11921     alias_for: "mask-position-y",
11922     subproperties: ["mask-position-y"],
11923   },
11924   "-webkit-mask-repeat": {
11925     domProp: "webkitMaskRepeat",
11926     inherited: false,
11927     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11928     alias_for: "mask-repeat",
11929     subproperties: ["mask-repeat"],
11930   },
11931   "-webkit-mask-size": {
11932     domProp: "webkitMaskSize",
11933     inherited: false,
11934     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11935     alias_for: "mask-size",
11936     subproperties: ["mask-size"],
11937   },
11938 }; // end of gCSSProperties
11940 // Get the computed value for a property.  For shorthands, return the
11941 // computed values of all the subproperties, delimited by " ; ".
11942 function get_computed_value(cs, property) {
11943   var info = gCSSProperties[property];
11944   if (
11945     info.type == CSS_TYPE_TRUE_SHORTHAND ||
11946     info.type == CSS_TYPE_LEGACY_SHORTHAND ||
11947     (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND &&
11948       (property == "text-decoration" || property == "mask"))
11949   ) {
11950     var results = [];
11951     for (var idx in info.subproperties) {
11952       var subprop = info.subproperties[idx];
11953       results.push(get_computed_value(cs, subprop));
11954     }
11955     return results.join(" ; ");
11956   }
11957   return cs.getPropertyValue(property);
11961   const mozHiddenUnscrollableEnabled = IsCSSPropertyPrefEnabled(
11962     "layout.css.overflow-moz-hidden-unscrollable.enabled"
11963   );
11964   for (let p of ["overflow", "overflow-x", "overflow-y"]) {
11965     let prop = gCSSProperties[p];
11966     let mozHiddenUnscrollableValues = mozHiddenUnscrollableEnabled
11967       ? prop.other_values
11968       : prop.invalid_values;
11969     mozHiddenUnscrollableValues.push("-moz-hidden-unscrollable");
11970     if (p == "overflow") {
11971       mozHiddenUnscrollableValues.push(
11972         "-moz-hidden-unscrollable -moz-hidden-unscrollable"
11973       );
11974     }
11975   }
11978 if (IsCSSPropertyPrefEnabled("layout.css.moz-user-modify.enabled")) {
11979   Object.assign(gCSSProperties, {
11980     "-moz-user-modify": {
11981       domProp: "MozUserModify",
11982       inherited: true,
11983       type: CSS_TYPE_LONGHAND,
11984       initial_values: ["read-only"],
11985       other_values: ["read-write", "write-only"],
11986       invalid_values: [],
11987     },
11988   });
11991 gCSSProperties.rotate = {
11992   domProp: "rotate",
11993   inherited: false,
11994   type: CSS_TYPE_LONGHAND,
11995   initial_values: ["none"],
11996   other_values: [
11997     "45deg",
11998     "45grad",
11999     "72rad",
12000     "0.25turn",
12001     ".57rad",
12002     "0 0 0 0rad",
12003     "0 0 1 45deg",
12004     "0 0 1 0rad",
12005     "0rad 0 0 1",
12006     "10rad 10 20 30",
12007     "x 10rad",
12008     "y 10rad",
12009     "z 10rad",
12010     "10rad x",
12011     "10rad y",
12012     "10rad z",
12013     /* valid calc() values */
12014     "calc(1) 0 0 calc(45deg + 5rad)",
12015     "0 1 0 calc(400grad + 1rad)",
12016     "calc(0.5turn + 10deg)",
12017   ],
12018   invalid_values: [
12019     "0",
12020     "7",
12021     "0, 0, 1, 45deg",
12022     "0 0 45deg",
12023     "0 0 20rad",
12024     "0 0 0 0",
12025     "x x 10rad",
12026     "x y 10rad",
12027     "0 0 1 10rad z",
12028     "0 0 1 z 10rad",
12029     "z 0 0 1 10rad",
12030     "0 0 z 1 10rad",
12031     /* invalid calc() values */
12032     "0.5 1 0 calc(45deg + 10)",
12033     "calc(0.5turn + 10%)",
12034   ],
12037 gCSSProperties.translate = {
12038   domProp: "translate",
12039   inherited: false,
12040   type: CSS_TYPE_LONGHAND,
12041   prerequisites: { width: "10px", height: "10px", display: "block" },
12042   initial_values: ["none"],
12043   other_values: [
12044     "-4px",
12045     "3px",
12046     "4em",
12047     "50%",
12048     "4px 5px 6px",
12049     "4px 5px",
12050     "50% 5px 6px",
12051     "50% 10% 6em",
12052     /* valid calc() values */
12053     "calc(5px + 10%)",
12054     "calc(0.25 * 5px + 10% / 3)",
12055     "calc(5px - 10% * 3)",
12056     "calc(5px - 3 * 10%) 50px",
12057     "-50px calc(5px - 10% * 3)",
12058     "10px calc(min(5px,10%))",
12059   ],
12060   invalid_values: [
12061     "1",
12062     "-moz-min(5px,10%)",
12063     "4px, 5px, 6px",
12064     "3px 4px 1px 7px",
12065     "4px 5px 10%",
12066     /* invalid calc() values */
12067     "calc(max(5px,10%) 10%)",
12068     "calc(nonsense)",
12069   ],
12071 gCSSProperties.scale = {
12072   domProp: "scale",
12073   inherited: false,
12074   type: CSS_TYPE_LONGHAND,
12075   initial_values: ["none"],
12076   other_values: [
12077     "10",
12078     "10%",
12079     "10 20",
12080     "10% 20%",
12081     "10 20 30",
12082     "10% 20% 30%",
12083     "10 20% 30",
12084     "-10",
12085     "-10%",
12086     "-10 20",
12087     "-10% 20%",
12088     "-10 20 -30",
12089     "-10% 20% -30%",
12090     "-10 20% -30",
12091     "0 2.0",
12092     /* valid calc() values */
12093     "calc(1 + 2)",
12094     "calc(10) calc(20) 30",
12095   ],
12096   invalid_values: [
12097     "10px",
12098     "10deg",
12099     "10, 20, 30",
12100     /* invalid calc() values */
12101     "calc(1 + 20%)",
12102     "10 calc(1 + 10px)",
12103   ],
12106 if (
12107   IsCSSPropertyPrefEnabled("layout.css.transform-box-content-stroke.enabled")
12108 ) {
12109   gCSSProperties["transform-box"]["other_values"].push(
12110     "content-box",
12111     "stroke-box"
12112   );
12115 gCSSProperties["touch-action"] = {
12116   domProp: "touchAction",
12117   inherited: false,
12118   type: CSS_TYPE_LONGHAND,
12119   initial_values: ["auto"],
12120   other_values: [
12121     "none",
12122     "pan-x",
12123     "pan-y",
12124     "pinch-zoom",
12125     "pan-x pan-y",
12126     "pan-y pan-x",
12127     "pinch-zoom pan-x",
12128     "pinch-zoom pan-y",
12129     "pan-x pinch-zoom",
12130     "pan-y pinch-zoom",
12131     "pinch-zoom pan-x pan-y",
12132     "pinch-zoom pan-y pan-x",
12133     "pan-x pinch-zoom pan-y",
12134     "pan-y pinch-zoom pan-x",
12135     "pan-x pan-y pinch-zoom",
12136     "pan-y pan-x pinch-zoom",
12137     "manipulation",
12138   ],
12139   invalid_values: [
12140     "zoom",
12141     "pinch",
12142     "tap",
12143     "10px",
12144     "2",
12145     "auto pan-x",
12146     "pan-x auto",
12147     "none pan-x",
12148     "pan-x none",
12149     "auto pan-y",
12150     "pan-y auto",
12151     "none pan-y",
12152     "pan-y none",
12153     "pan-x pan-x",
12154     "pan-y pan-y",
12155     "auto pinch-zoom",
12156     "pinch-zoom auto",
12157     "none pinch-zoom",
12158     "pinch-zoom none",
12159     "pinch-zoom pinch-zoom",
12160     "pan-x pan-y none",
12161     "pan-x none pan-y",
12162     "none pan-x pan-y",
12163     "pan-y pan-x none",
12164     "pan-y none pan-x",
12165     "none pan-y pan-x",
12166     "pan-x pinch-zoom none",
12167     "pan-x none pinch-zoom",
12168     "none pan-x pinch-zoom",
12169     "pinch-zoom pan-x none",
12170     "pinch-zoom none pan-x",
12171     "none pinch-zoom pan-x",
12172     "pinch-zoom pan-y none",
12173     "pinch-zoom none pan-y",
12174     "none pinch-zoom pan-y",
12175     "pan-y pinch-zoom none",
12176     "pan-y none pinch-zoom",
12177     "none pan-y pinch-zoom",
12178     "pan-x pan-y auto",
12179     "pan-x auto pan-y",
12180     "auto pan-x pan-y",
12181     "pan-y pan-x auto",
12182     "pan-y auto pan-x",
12183     "auto pan-y pan-x",
12184     "pan-x pinch-zoom auto",
12185     "pan-x auto pinch-zoom",
12186     "auto pan-x pinch-zoom",
12187     "pinch-zoom pan-x auto",
12188     "pinch-zoom auto pan-x",
12189     "auto pinch-zoom pan-x",
12190     "pinch-zoom pan-y auto",
12191     "pinch-zoom auto pan-y",
12192     "auto pinch-zoom pan-y",
12193     "pan-y pinch-zoom auto",
12194     "pan-y auto pinch-zoom",
12195     "auto pan-y pinch-zoom",
12196     "pan-x pan-y zoom",
12197     "pan-x zoom pan-y",
12198     "zoom pan-x pan-y",
12199     "pan-y pan-x zoom",
12200     "pan-y zoom pan-x",
12201     "zoom pan-y pan-x",
12202     "pinch-zoom pan-y zoom",
12203     "pinch-zoom zoom pan-y",
12204     "zoom pinch-zoom pan-y",
12205     "pan-y pinch-zoom zoom",
12206     "pan-y zoom pinch-zoom",
12207     "zoom pan-y pinch-zoom",
12208     "pan-x pinch-zoom zoom",
12209     "pan-x zoom pinch-zoom",
12210     "zoom pan-x pinch-zoom",
12211     "pinch-zoom pan-x zoom",
12212     "pinch-zoom zoom pan-x",
12213     "zoom pinch-zoom pan-x",
12214     "pan-x pan-y pan-x",
12215     "pan-x pan-x pan-y",
12216     "pan-y pan-x pan-x",
12217     "pan-y pan-x pan-y",
12218     "pan-y pan-y pan-x",
12219     "pan-x pan-y pan-y",
12220     "pan-x pinch-zoom pan-x",
12221     "pan-x pan-x pinch-zoom",
12222     "pinch-zoom pan-x pan-x",
12223     "pinch-zoom pan-x pinch-zoom",
12224     "pinch-zoom pinch-zoom pan-x",
12225     "pan-x pinch-zoom pinch-zoom",
12226     "pinch-zoom pan-y pinch-zoom",
12227     "pinch-zoom pinch-zoom pan-y",
12228     "pan-y pinch-zoom pinch-zoom",
12229     "pan-y pinch-zoom pan-y",
12230     "pan-y pan-y pinch-zoom",
12231     "pinch-zoom pan-y pan-y",
12232     "manipulation none",
12233     "none manipulation",
12234     "manipulation auto",
12235     "auto manipulation",
12236     "manipulation zoom",
12237     "zoom manipulation",
12238     "manipulation manipulation",
12239     "manipulation pan-x",
12240     "pan-x manipulation",
12241     "manipulation pan-y",
12242     "pan-y manipulation",
12243     "manipulation pinch-zoom",
12244     "pinch-zoom manipulation",
12245     "manipulation pan-x pan-y",
12246     "pan-x manipulation pan-y",
12247     "pan-x pan-y manipulation",
12248     "manipulation pan-y pan-x",
12249     "pan-y manipulation pan-x",
12250     "pan-y pan-x manipulation",
12251     "manipulation pinch-zoom pan-y",
12252     "pinch-zoom manipulation pan-y",
12253     "pinch-zoom pan-y manipulation",
12254     "manipulation pan-y pinch-zoom",
12255     "pan-y manipulation pinch-zoom",
12256     "pan-y pinch-zoom manipulation",
12257     "manipulation pan-x pinch-zoom",
12258     "pan-x manipulation pinch-zoom",
12259     "pan-x pinch-zoom manipulation",
12260     "manipulation pinch-zoom pan-x",
12261     "pinch-zoom manipulation pan-x",
12262     "pinch-zoom pan-x manipulation",
12263   ],
12266 gCSSProperties["page"] = {
12267   domProp: "page",
12268   inherited: false,
12269   type: CSS_TYPE_LONGHAND,
12270   initial_values: ["auto"],
12271   other_values: ["page", "small_page", "large_page", "A4"],
12272   invalid_values: ["page1 page2", "auto page", "1cm"],
12275 gCSSProperties["text-justify"] = {
12276   domProp: "textJustify",
12277   inherited: true,
12278   type: CSS_TYPE_LONGHAND,
12279   applies_to_placeholder: true,
12280   initial_values: ["auto"],
12281   other_values: ["none", "inter-word", "inter-character", "distribute"],
12282   invalid_values: [],
12285 if (IsCSSPropertyPrefEnabled("layout.css.text-indent-keywords.enabled")) {
12286   gCSSProperties["text-indent"].other_values.push(
12287     "2em hanging",
12288     "5% each-line",
12289     "-10px hanging each-line",
12290     "hanging calc(2px)",
12291     "each-line calc(-2px)",
12292     "each-line calc(50%) hanging",
12293     "hanging calc(3*25px) each-line",
12294     "each-line hanging calc(25px*3)"
12295   );
12296   gCSSProperties["text-indent"].invalid_values.push(
12297     "hanging",
12298     "each-line",
12299     "-10px hanging hanging",
12300     "each-line calc(2px) each-line"
12301   );
12304 if (IsCSSPropertyPrefEnabled("layout.css.font-variations.enabled")) {
12305   gCSSProperties["font-variation-settings"] = {
12306     domProp: "fontVariationSettings",
12307     inherited: true,
12308     type: CSS_TYPE_LONGHAND,
12309     applies_to_first_letter: true,
12310     applies_to_first_line: true,
12311     applies_to_placeholder: true,
12312     applies_to_marker: true,
12313     applies_to_cue: true,
12314     initial_values: ["normal"],
12315     other_values: [
12316       "'wdth' 0",
12317       "'wdth' -.1",
12318       '"wdth" 1',
12319       "'wdth' 2, 'wght' 3",
12320       '"XXXX" 0',
12321     ],
12322     invalid_values: [
12323       "wdth",
12324       "wdth 1", // unquoted tags
12325       "'wdth'",
12326       "'wdth' 'wght'",
12327       "'wdth', 'wght'", // missing values
12328       "'' 1",
12329       "'wid' 1",
12330       "'width' 1", // incorrect tag lengths
12331       "'wd\th' 1", // non-graphic character in tag
12332       "'wdth' 1 'wght' 2", // missing comma between pairs
12333       "'wdth' 1,", // trailing comma
12334       "'wdth' 1 , , 'wght' 2", // extra comma
12335       "'wdth', 1", // comma within pair
12336     ],
12337     unbalanced_values: [
12338       "'wdth\" 1",
12339       "\"wdth' 1", // mismatched quotes
12340     ],
12341   };
12342   gCSSProperties["font"].subproperties.push("font-variation-settings");
12343   gCSSProperties["font-optical-sizing"] = {
12344     domProp: "fontOpticalSizing",
12345     inherited: true,
12346     type: CSS_TYPE_LONGHAND,
12347     applies_to_first_letter: true,
12348     applies_to_first_line: true,
12349     applies_to_placeholder: true,
12350     applies_to_marker: true,
12351     applies_to_cue: true,
12352     initial_values: ["auto"],
12353     other_values: ["none"],
12354     invalid_values: ["on"],
12355   };
12356   gCSSProperties["font"].subproperties.push("font-optical-sizing");
12357   gCSSProperties["font-variation-settings"].other_values.push(
12358     "'vert' calc(2.5)"
12359   );
12362 if (IsCSSPropertyPrefEnabled("layout.css.font-palette.enabled")) {
12363   gCSSProperties["font-palette"] = {
12364     domProp: "fontPalette",
12365     inherited: true,
12366     type: CSS_TYPE_LONGHAND,
12367     applies_to_first_letter: true,
12368     applies_to_first_line: true,
12369     applies_to_marker: true,
12370     applies_to_placeholder: true,
12371     initial_values: ["normal"],
12372     other_values: ["light", "dark", "--custom"],
12373     invalid_values: ["custom"],
12374   };
12377 if (IsCSSPropertyPrefEnabled("layout.css.font-variant-emoji.enabled")) {
12378   gCSSProperties["font"].subproperties.push("font-variant-emoji");
12379   gCSSProperties["font-variant"].subproperties.push("font-variant-emoji");
12380   gCSSProperties["font-variant-emoji"] = {
12381     domProp: "fontVariantEmoji",
12382     inherited: true,
12383     type: CSS_TYPE_LONGHAND,
12384     applies_to_first_letter: true,
12385     applies_to_first_line: true,
12386     applies_to_marker: true,
12387     applies_to_placeholder: true,
12388     applies_to_cue: true,
12389     initial_values: ["normal"],
12390     other_values: ["text", "emoji", "unicode"],
12391     invalid_values: [
12392       "none",
12393       "auto",
12394       "text emoji",
12395       "auto text",
12396       "normal, unicode",
12397     ],
12398   };
12401 var isGridTemplateMasonryValueEnabled = IsCSSPropertyPrefEnabled(
12402   "layout.css.grid-template-masonry-value.enabled"
12405 if (isGridTemplateMasonryValueEnabled) {
12406   gCSSProperties["masonry-auto-flow"] = {
12407     domProp: "masonryAutoFlow",
12408     inherited: false,
12409     type: CSS_TYPE_LONGHAND,
12410     initial_values: ["pack"],
12411     other_values: ["pack ordered", "ordered next", "next definite-first"],
12412     invalid_values: ["auto", "none", "10px", "row", "dense"],
12413   };
12416 gCSSProperties["display"].other_values.push("grid", "inline-grid");
12417 gCSSProperties["grid-auto-flow"] = {
12418   domProp: "gridAutoFlow",
12419   inherited: false,
12420   type: CSS_TYPE_LONGHAND,
12421   initial_values: ["row"],
12422   other_values: [
12423     "column",
12424     "column dense",
12425     "row dense",
12426     "dense column",
12427     "dense row",
12428     "dense",
12429   ],
12430   invalid_values: ["", "auto", "none", "10px", "column row", "dense row dense"],
12433 gCSSProperties["grid-auto-columns"] = {
12434   domProp: "gridAutoColumns",
12435   inherited: false,
12436   type: CSS_TYPE_LONGHAND,
12437   initial_values: ["auto"],
12438   other_values: [
12439     "40px",
12440     "2em",
12441     "2.5fr",
12442     "12%",
12443     "min-content",
12444     "max-content",
12445     "calc(2px - 99%)",
12446     "minmax(20px, max-content)",
12447     "minmax(min-content, auto)",
12448     "minmax(auto, max-content)",
12449     "m\\69nmax(20px, 4Fr)",
12450     "MinMax(min-content, calc(20px + 10%))",
12451     "fit-content(1px)",
12452     "fit-content(calc(1px - 99%))",
12453     "fit-content(10%)",
12454     "40px 12%",
12455     "2.5fr min-content fit-content(1px)",
12456   ],
12457   invalid_values: [
12458     "",
12459     "normal",
12460     "40ms",
12461     "-40px",
12462     "-12%",
12463     "-2em",
12464     "-2.5fr",
12465     "minmax()",
12466     "minmax(20px)",
12467     "mÄ°nmax(20px, 100px)",
12468     "minmax(20px, 100px, 200px)",
12469     "maxmin(100px, 20px)",
12470     "minmax(min-content, minmax(30px, max-content))",
12471     "fit-content(-1px)",
12472     "fit-content(auto)",
12473     "fit-content(min-content)",
12474     "1px [a] 1px",
12475   ],
12477 gCSSProperties["grid-auto-rows"] = {
12478   domProp: "gridAutoRows",
12479   inherited: false,
12480   type: CSS_TYPE_LONGHAND,
12481   initial_values: gCSSProperties["grid-auto-columns"].initial_values,
12482   other_values: gCSSProperties["grid-auto-columns"].other_values,
12483   invalid_values: gCSSProperties["grid-auto-columns"].invalid_values,
12486 gCSSProperties["grid-template-columns"] = {
12487   domProp: "gridTemplateColumns",
12488   inherited: false,
12489   type: CSS_TYPE_LONGHAND,
12490   initial_values: ["none"],
12491   other_values: [
12492     "auto",
12493     "40px",
12494     "2.5fr",
12495     "[normal] 40px [] auto [ ] 12%",
12496     "[foo] 40px min-content [ bar ] calc(2px - 99%) max-content",
12497     "40px min-content calc(20px + 10%) max-content",
12498     "minmax(min-content, auto)",
12499     "minmax(auto, max-content)",
12500     "m\\69nmax(20px, 4Fr)",
12501     "40px MinMax(min-content, calc(20px + 10%)) max-content",
12502     "40px 2em",
12503     "[] 40px [-foo] 2em [bar baz This is one ident]",
12504     // TODO bug 978478: "[a] repeat(3, [b] 20px [c] 40px [d]) [e]",
12505     "repeat(1, 20px)",
12506     "repeat(1, [a] 20px)",
12507     "[a] Repeat(4, [a] 20px [] auto [b c]) [d]",
12508     "[a] 2.5fr Repeat(4, [a] 20px [] auto [b c]) [d]",
12509     "[a] 2.5fr [z] Repeat(4, [a] 20px [] auto [b c]) [d]",
12510     "[a] 2.5fr [z] Repeat(4, [a] 20px [] auto) [d]",
12511     "[a] 2.5fr [z] Repeat(4, 20px [b c] auto [b c]) [d]",
12512     "[a] 2.5fr [z] Repeat(4, 20px auto) [d]",
12513     "repeat(auto-fill, 0)",
12514     "[a] repeat( Auto-fill,1%)",
12515     "minmax(auto,0) [a] repeat(Auto-fit, 0) minmax(0,auto)",
12516     "minmax(calc(1% + 1px),auto) repeat(Auto-fit,[] 1%) minmax(auto,1%)",
12517     "[a] repeat( auto-fit,[a b] minmax(0,0) )",
12518     "[a] 40px repeat(auto-fit,[a b] minmax(1px, 0) [])",
12519     "[a] calc(1px - 99%) [b] repeat(auto-fit,[a b] minmax(1mm, 1%) [c]) [c]",
12520     "repeat(auto-fill, 0 0)",
12521     "repeat(auto-fill, 0 [] 0)",
12522     "repeat(auto-fill,minmax(1%,auto))",
12523     "repeat(auto-fill,minmax(1em,min-content)) minmax(min-content,0)",
12524     "repeat(auto-fill,minmax(max-content,1mm))",
12525     "repeat(2, fit-content(1px))",
12526     "fit-content(1px) 1fr",
12527     "[a] fit-content(calc(1px - 99%)) [b]",
12528     "[a] fit-content(10%) [b c] fit-content(1em)",
12529     // See https://bugzilla.mozilla.org/show_bug.cgi?id=981300
12530     "[none subgrid min-content max-content foo] 40px",
12531     "subgrid",
12532     "subgrid [] [foo bar]",
12533     "subgrid repeat(1, [])",
12534     "subgrid Repeat(4, [a] [b c] [] [d])",
12535     "subgrid repeat(auto-fill, [])",
12536     "subgrid repeat(Auto-fill, [a b c]) [a] []",
12537     "subgrid [x] repeat( Auto-fill, [a b c]) []",
12538     "subgrid [x] repeat( auto-fill , [a b] [c]) [y]",
12539     "subgrid repeat(auto-fill, [a] [b] [c]) [d]",
12540     "subgrid repeat(Auto-fill, [a] [b c] [] [d])",
12541     "subgrid [x y] [x] repeat(auto-fill, [a b] [c] [d] [d]) [x] [x]",
12542     "subgrid [x] repeat(auto-fill, []) [y z]",
12543     "subgrid [x] repeat(auto-fill, [y]) [z] [] repeat(2, [a] [b]) [y] []",
12544     "subgrid [x] repeat(auto-fill, []) [x y] [z] [] []",
12545   ],
12546   invalid_values: [
12547     "",
12548     "normal",
12549     "40ms",
12550     "-40px",
12551     "-12%",
12552     "-2fr",
12553     "[foo]",
12554     "[inherit] 40px",
12555     "[initial] 40px",
12556     "[unset] 40px",
12557     "[default] 40px",
12558     "[span] 40px",
12559     "[6%] 40px",
12560     "[5th] 40px",
12561     "[foo[] bar] 40px",
12562     "[foo]] 40px",
12563     "(foo) 40px",
12564     "[foo] [bar] 40px",
12565     "40px [foo] [bar]",
12566     "minmax()",
12567     "minmax(20px)",
12568     "mÄ°nmax(20px, 100px)",
12569     "minmax(20px, 100px, 200px)",
12570     "maxmin(100px, 20px)",
12571     "minmax(min-content, minmax(30px, max-content))",
12572     "repeat(0, 20px)",
12573     "repeat(-3, 20px)",
12574     "rêpeat(1, 20px)",
12575     "repeat(1)",
12576     "repeat(1, )",
12577     "repeat(3px, 20px)",
12578     "repeat(2.0, 20px)",
12579     "repeat(2.5, 20px)",
12580     "repeat(2, (foo))",
12581     "repeat(2, foo)",
12582     "40px calc(0px + rubbish)",
12583     "repeat(1, repeat(1, 20px))",
12584     "repeat(auto-fill, auto)",
12585     "repeat(auto-fit,auto)",
12586     "repeat(auto-fill, fit-content(1px))",
12587     "repeat(auto-fit, fit-content(1px))",
12588     "repeat(auto-fit,[])",
12589     "repeat(auto-fill, 0) repeat(auto-fit, 0) ",
12590     "repeat(auto-fit, 0) repeat(auto-fill, 0) ",
12591     "[a] repeat(auto-fit, 0) repeat(auto-fit, 0) ",
12592     "[a] repeat(auto-fill, 0) [a] repeat(auto-fill, 0) ",
12593     "repeat(auto-fill, min-content)",
12594     "repeat(auto-fit,max-content)",
12595     "repeat(auto-fit,1fr)",
12596     "repeat(auto-fit,minmax(auto,auto))",
12597     "repeat(auto-fit,minmax(min-content,1fr))",
12598     "repeat(auto-fit,minmax(1fr,auto))",
12599     "repeat(auto-fill,minmax(1fr,1em))",
12600     "repeat(auto-fill, 10px) auto",
12601     "auto repeat(auto-fit, 10px)",
12602     "minmax(min-content,max-content) repeat(auto-fit, 0)",
12603     "10px [a] 10px [b a] 1fr [b] repeat(auto-fill, 0)",
12604     "fit-content(-1px)",
12605     "fit-content(auto)",
12606     "fit-content(min-content)",
12607     "fit-content(1px) repeat(auto-fit, 1px)",
12608     "fit-content(1px) repeat(auto-fill, 1px)",
12609     "subgrid [inherit]",
12610     "subgrid [initial]",
12611     "subgrid [unset]",
12612     "subgrid [default]",
12613     "subgrid [span]",
12614     "subgrid [foo] 40px",
12615     "subgrid [foo 40px]",
12616     "[foo] subgrid",
12617     "subgrid rêpeat(1, [])",
12618     "subgrid repeat(0, [])",
12619     "subgrid repeat(-3, [])",
12620     "subgrid repeat(2.0, [])",
12621     "subgrid repeat(2.5, [])",
12622     "subgrid repeat(3px, [])",
12623     "subgrid repeat(1)",
12624     "subgrid repeat(1, )",
12625     "subgrid repeat(2, [40px])",
12626     "subgrid repeat(2, foo)",
12627     "subgrid repeat(1, repeat(1, []))",
12628     "subgrid repeat(auto-fill)",
12629     "subgrid repeat(auto-fill) [a]",
12630     "subgrid repeat(auto-fill) []",
12631     "subgrid [a] repeat(auto-fill)",
12632     "subgrid repeat(auto-fill,)",
12633     "subgrid repeat(auto-fill,)",
12634     "subgrid repeat(auto-fill,) [a]",
12635     "subgrid repeat(auto-fill,) []",
12636     "subgrid [a] repeat(auto-fill,)",
12637     "subgrid repeat(auto-fit,[])",
12638     "subgrid [] repeat(auto-fit,[])",
12639     "subgrid [a] repeat(auto-fit,[])",
12640     "subgrid repeat(auto-fill, 1px)",
12641     "subgrid repeat(auto-fill, 1px [])",
12642     "subgrid repeat(auto-fill, []) repeat(auto-fill, [])",
12643   ],
12644   unbalanced_values: ["(foo] 40px"],
12646 if (isGridTemplateMasonryValueEnabled) {
12647   gCSSProperties["grid-template-columns"].other_values.push("masonry");
12648   gCSSProperties["grid-template-columns"].invalid_values.push(
12649     "masonry []",
12650     "masonry [foo] 40px",
12651     "masonry 40px",
12652     "[foo] masonry",
12653     "0px masonry",
12654     "masonry masonry",
12655     "subgrid masonry",
12656     "masonry subgrid",
12657     "masonry repeat(1, [])"
12658   );
12660 gCSSProperties["grid-template-rows"] = {
12661   domProp: "gridTemplateRows",
12662   inherited: false,
12663   type: CSS_TYPE_LONGHAND,
12664   initial_values: gCSSProperties["grid-template-columns"].initial_values,
12665   other_values: gCSSProperties["grid-template-columns"].other_values,
12666   invalid_values: gCSSProperties["grid-template-columns"].invalid_values,
12668 gCSSProperties["grid-template-areas"] = {
12669   domProp: "gridTemplateAreas",
12670   inherited: false,
12671   type: CSS_TYPE_LONGHAND,
12672   initial_values: ["none"],
12673   other_values: [
12674     "'1a-é_ .' \"b .\"",
12675     "' Z\t\\aZ' 'Z Z'",
12676     " '. . a b'  '. .a b' ",
12677     "'a.b' '. . .'",
12678     "'.' '..'",
12679     "'...' '.'",
12680     "'...-blah' '. .'",
12681     "'.. ..' '.. ...'",
12682   ],
12683   invalid_values: [
12684     "''",
12685     "' '",
12686     "'' ''",
12687     "'a b' 'a/b'",
12688     "'a . a'",
12689     "'. a a' 'a a a'",
12690     "'a a .' 'a a a'",
12691     "'a a' 'a .'",
12692     "'a a'\n'..'\n'a a'",
12693   ],
12696 gCSSProperties["grid-template"] = {
12697   domProp: "gridTemplate",
12698   inherited: false,
12699   type: CSS_TYPE_TRUE_SHORTHAND,
12700   subproperties: [
12701     "grid-template-areas",
12702     "grid-template-rows",
12703     "grid-template-columns",
12704   ],
12705   initial_values: ["none", "none / none"],
12706   other_values: [
12707     // <'grid-template-rows'> / <'grid-template-columns'>
12708     "40px / 100px",
12709     "[foo] 40px [bar] / [baz] repeat(auto-fill,100px) [fizz]",
12710     " none/100px",
12711     "40px/none",
12712     // [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?
12713     "'fizz'",
12714     "[bar] 'fizz'",
12715     "'fizz' / [foo] 40px",
12716     "[bar] 'fizz' / [foo] 40px",
12717     "'fizz' 100px / [foo] 40px",
12718     "[bar] 'fizz' 100px / [foo] 40px",
12719     "[bar] 'fizz' 100px [buzz] / [foo] 40px",
12720     "[bar] 'fizz' 100px [buzz] \n [a] '.' 200px [b] / [foo] 40px",
12721     "subgrid / subgrid",
12722     "subgrid/40px 20px",
12723     "subgrid [foo] [] [bar baz] / 40px 20px",
12724     "40px 20px/subgrid",
12725     "40px 20px/subgrid  [foo] [] repeat(3, [a] [b]) [bar baz]",
12726     "subgrid/subgrid",
12727     "subgrid [foo] [] [bar baz]/subgrid [foo] [] [bar baz]",
12728   ],
12729   invalid_values: [
12730     "'fizz' / repeat(1, 100px)",
12731     "'fizz' repeat(1, 100px) / 0px",
12732     "[foo] [bar] 40px / 100px",
12733     "[fizz] [buzz] 100px / 40px",
12734     "[fizz] [buzz] 'foo' / 40px",
12735     "'foo' / none",
12736     "subgrid",
12737     "subgrid []",
12738     "subgrid [] / 'fizz'",
12739     "subgrid / 'fizz'",
12740   ],
12742 if (isGridTemplateMasonryValueEnabled) {
12743   gCSSProperties["grid-template"].other_values.push(
12744     "masonry / subgrid",
12745     "subgrid / masonry",
12746     "masonry / masonry" /* valid but behaves as 'masonry / none' */,
12747     "masonry/40px 20px",
12748     "subgrid [foo] [] [bar baz] / masonry",
12749     "40px 20px/masonry",
12750     "masonry/subgrid  [foo] [] repeat(3, [a] [b]) [bar baz]",
12751     "subgrid [foo] [] [bar baz]/masonry"
12752   );
12753   gCSSProperties["grid-template"].invalid_values.push(
12754     "masonry",
12755     "masonry / 'fizz'"
12756   );
12759 gCSSProperties["grid"] = {
12760   domProp: "grid",
12761   inherited: false,
12762   type: CSS_TYPE_TRUE_SHORTHAND,
12763   subproperties: [
12764     "grid-template-areas",
12765     "grid-template-rows",
12766     "grid-template-columns",
12767     "grid-auto-flow",
12768     "grid-auto-rows",
12769     "grid-auto-columns",
12770   ],
12771   initial_values: ["none", "none / none"],
12772   other_values: [
12773     "auto-flow 40px / none",
12774     "auto-flow 40px 100px / 0",
12775     "auto-flow / 40px",
12776     "auto-flow dense auto / auto",
12777     "dense auto-flow minmax(min-content, 2fr) / auto",
12778     "dense auto-flow / 100px",
12779     "none / auto-flow 40px",
12780     "40px / auto-flow",
12781     "none / dense auto-flow auto",
12782   ].concat(gCSSProperties["grid-template"].other_values),
12783   invalid_values: [
12784     "auto-flow",
12785     " / auto-flow",
12786     "dense 0 / 0",
12787     "dense dense 40px / 0",
12788     "auto-flow / auto-flow",
12789     "auto-flow / dense",
12790     "auto-flow [a] 0 / 0",
12791     "0 / auto-flow [a] 0",
12792     "auto-flow -20px / 0",
12793     "auto-flow 200ms / 0",
12794     "auto-flow 1px [a] 1px / 0",
12795   ].concat(
12796     gCSSProperties["grid-template"].invalid_values,
12797     gCSSProperties["grid-auto-flow"].other_values,
12798     gCSSProperties["grid-auto-flow"].invalid_values.filter(v => v != "none")
12799   ),
12802 var gridLineOtherValues = [
12803   "foo",
12804   "2",
12805   "2 foo",
12806   "foo 2",
12807   "-3",
12808   "-3 bar",
12809   "bar -3",
12810   "span 2",
12811   "2 span",
12812   "span foo",
12813   "foo span",
12814   "span 2 foo",
12815   "span foo 2",
12816   "2 foo span",
12817   "foo 2 span",
12819 var gridLineInvalidValues = [
12820   "",
12821   "4th",
12822   "span",
12823   "inherit 2",
12824   "2 inherit",
12825   "20px",
12826   "2 3",
12827   "2.5",
12828   "2.0",
12829   "0",
12830   "0 foo",
12831   "span 0",
12832   "2 foo 3",
12833   "foo 2 foo",
12834   "2 span foo",
12835   "foo span 2",
12836   "span -3",
12837   "span -3 bar",
12838   "span 2 span",
12839   "span foo span",
12840   "span 2 foo span",
12843 gCSSProperties["grid-column-start"] = {
12844   domProp: "gridColumnStart",
12845   inherited: false,
12846   type: CSS_TYPE_LONGHAND,
12847   initial_values: ["auto"],
12848   other_values: gridLineOtherValues,
12849   invalid_values: gridLineInvalidValues,
12851 gCSSProperties["grid-column-end"] = {
12852   domProp: "gridColumnEnd",
12853   inherited: false,
12854   type: CSS_TYPE_LONGHAND,
12855   initial_values: ["auto"],
12856   other_values: gridLineOtherValues,
12857   invalid_values: gridLineInvalidValues,
12859 gCSSProperties["grid-row-start"] = {
12860   domProp: "gridRowStart",
12861   inherited: false,
12862   type: CSS_TYPE_LONGHAND,
12863   initial_values: ["auto"],
12864   other_values: gridLineOtherValues,
12865   invalid_values: gridLineInvalidValues,
12867 gCSSProperties["grid-row-end"] = {
12868   domProp: "gridRowEnd",
12869   inherited: false,
12870   type: CSS_TYPE_LONGHAND,
12871   initial_values: ["auto"],
12872   other_values: gridLineOtherValues,
12873   invalid_values: gridLineInvalidValues,
12876 // The grid-column and grid-row shorthands take values of the form
12877 //   <grid-line> [ / <grid-line> ]?
12878 var gridColumnRowOtherValues = [].concat(gridLineOtherValues);
12879 gridLineOtherValues.concat(["auto"]).forEach(function (val) {
12880   gridColumnRowOtherValues.push(" foo / " + val);
12881   gridColumnRowOtherValues.push(val + "/2");
12883 var gridColumnRowInvalidValues = ["foo, bar", "foo / bar / baz"].concat(
12884   gridLineInvalidValues
12886 gridLineInvalidValues.forEach(function (val) {
12887   gridColumnRowInvalidValues.push("span 3 / " + val);
12888   gridColumnRowInvalidValues.push(val + " / foo");
12890 gCSSProperties["grid-column"] = {
12891   domProp: "gridColumn",
12892   inherited: false,
12893   type: CSS_TYPE_TRUE_SHORTHAND,
12894   subproperties: ["grid-column-start", "grid-column-end"],
12895   initial_values: ["auto", "auto / auto"],
12896   other_values: gridColumnRowOtherValues,
12897   invalid_values: gridColumnRowInvalidValues,
12899 gCSSProperties["grid-row"] = {
12900   domProp: "gridRow",
12901   inherited: false,
12902   type: CSS_TYPE_TRUE_SHORTHAND,
12903   subproperties: ["grid-row-start", "grid-row-end"],
12904   initial_values: ["auto", "auto / auto"],
12905   other_values: gridColumnRowOtherValues,
12906   invalid_values: gridColumnRowInvalidValues,
12909 var gridAreaOtherValues = gridLineOtherValues.slice();
12910 gridLineOtherValues.forEach(function (val) {
12911   gridAreaOtherValues.push("foo / " + val);
12912   gridAreaOtherValues.push(val + "/2/3");
12913   gridAreaOtherValues.push("foo / bar / " + val + " / baz");
12915 var gridAreaInvalidValues = [
12916   "foo, bar",
12917   "foo / bar / baz / fizz / buzz",
12918   "default / foo / bar / baz",
12919   "foo / initial / bar / baz",
12920   "foo / bar / inherit / baz",
12921   "foo / bar / baz / unset",
12922 ].concat(gridLineInvalidValues);
12923 gridLineInvalidValues.forEach(function (val) {
12924   gridAreaInvalidValues.push("foo / " + val);
12925   gridAreaInvalidValues.push("foo / bar / " + val);
12926   gridAreaInvalidValues.push("foo / 4 / bar / " + val);
12929 gCSSProperties["grid-area"] = {
12930   domProp: "gridArea",
12931   inherited: false,
12932   type: CSS_TYPE_TRUE_SHORTHAND,
12933   subproperties: [
12934     "grid-row-start",
12935     "grid-column-start",
12936     "grid-row-end",
12937     "grid-column-end",
12938   ],
12939   initial_values: [
12940     "auto",
12941     "auto / auto",
12942     "auto / auto / auto",
12943     "auto / auto / auto / auto",
12944   ],
12945   other_values: gridAreaOtherValues,
12946   invalid_values: gridAreaInvalidValues,
12949 gCSSProperties["column-gap"] = {
12950   domProp: "columnGap",
12951   inherited: false,
12952   type: CSS_TYPE_LONGHAND,
12953   initial_values: ["normal"],
12954   other_values: [
12955     "2px",
12956     "2%",
12957     "1em",
12958     "calc(1px + 1em)",
12959     "calc(1%)",
12960     "calc(1% + 1ch)",
12961     "calc(1px - 99%)",
12962   ],
12963   invalid_values: [
12964     "-1px",
12965     "auto",
12966     "none",
12967     "1px 1px",
12968     "-1%",
12969     "fit-content(1px)",
12970   ],
12972 gCSSProperties["grid-column-gap"] = {
12973   domProp: "gridColumnGap",
12974   inherited: false,
12975   type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
12976   alias_for: "column-gap",
12977   subproperties: ["column-gap"],
12979 gCSSProperties["row-gap"] = {
12980   domProp: "rowGap",
12981   inherited: false,
12982   type: CSS_TYPE_LONGHAND,
12983   initial_values: ["normal"],
12984   other_values: [
12985     "2px",
12986     "2%",
12987     "1em",
12988     "calc(1px + 1em)",
12989     "calc(1%)",
12990     "calc(1% + 1ch)",
12991     "calc(1px - 99%)",
12992   ],
12993   invalid_values: ["-1px", "auto", "none", "1px 1px", "-1%", "min-content"],
12995 gCSSProperties["grid-row-gap"] = {
12996   domProp: "gridRowGap",
12997   inherited: false,
12998   type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
12999   alias_for: "row-gap",
13000   subproperties: ["row-gap"],
13002 gCSSProperties["gap"] = {
13003   domProp: "gap",
13004   inherited: false,
13005   type: CSS_TYPE_TRUE_SHORTHAND,
13006   subproperties: ["column-gap", "row-gap"],
13007   initial_values: ["normal", "normal normal"],
13008   other_values: [
13009     "1ch 0",
13010     "1px 1%",
13011     "1em 1px",
13012     "calc(1px) calc(1%)",
13013     "normal 0",
13014     "1% normal",
13015   ],
13016   invalid_values: [
13017     "-1px",
13018     "1px -1px",
13019     "1px 1px 1px",
13020     "inherit 1px",
13021     "1px auto",
13022   ],
13024 gCSSProperties["grid-gap"] = {
13025   domProp: "gridGap",
13026   inherited: false,
13027   type: CSS_TYPE_TRUE_SHORTHAND,
13028   alias_for: "gap",
13029   subproperties: ["column-gap", "row-gap"],
13032 gCSSProperties["contain"] = {
13033   domProp: "contain",
13034   inherited: false,
13035   type: CSS_TYPE_LONGHAND,
13036   initial_values: ["none"],
13037   other_values: [
13038     "strict",
13039     "layout",
13040     "size",
13041     "content",
13042     "paint",
13043     "layout paint",
13044     "paint layout",
13045     "size layout",
13046     "paint size",
13047     "layout size paint",
13048     "layout paint size",
13049     "size paint layout",
13050     "paint size layout",
13051   ],
13052   invalid_values: [
13053     "none strict",
13054     "none size",
13055     "strict layout",
13056     "strict layout size",
13057     "layout strict",
13058     "layout content",
13059     "strict content",
13060     "layout size strict",
13061     "layout size paint strict",
13062     "paint strict",
13063     "size strict",
13064     "paint paint",
13065     "content content",
13066     "size content",
13067     "content strict size",
13068     "paint layout content",
13069     "layout size content",
13070     "size size",
13071     "strict strict",
13072     "auto",
13073     "10px",
13074     "0",
13075   ],
13078 if (IsCSSPropertyPrefEnabled("layout.css.initial-letter.enabled")) {
13079   gCSSProperties["initial-letter"] = {
13080     domProp: "initialLetter",
13081     inherited: false,
13082     type: CSS_TYPE_LONGHAND,
13083     applies_to_first_letter: true,
13084     initial_values: ["normal"],
13085     other_values: ["2", "2.5", "3.7 2", "4 3"],
13086     invalid_values: ["-3", "3.7 -2", "25%", "16px", "1 0", "0", "0 1"],
13087   };
13090 if (IsCSSPropertyPrefEnabled("layout.css.osx-font-smoothing.enabled")) {
13091   gCSSProperties["-moz-osx-font-smoothing"] = {
13092     domProp: "MozOsxFontSmoothing",
13093     inherited: true,
13094     type: CSS_TYPE_LONGHAND,
13095     applies_to_first_letter: true,
13096     applies_to_first_line: true,
13097     applies_to_placeholder: true,
13098     applies_to_cue: true,
13099     applies_to_marker: true,
13100     initial_values: ["auto"],
13101     other_values: ["grayscale", "subpixel-antialiased", "antialiased"],
13102     invalid_values: ["none"],
13103   };
13105   gCSSProperties["-webkit-font-smoothing"] = {
13106     domProp: "webkitFontSmoothing",
13107     inherited: true,
13108     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13109     applies_to_first_letter: true,
13110     applies_to_first_line: true,
13111     applies_to_placeholder: true,
13112     applies_to_cue: true,
13113     applies_to_marker: true,
13114     alias_for: "-moz-osx-font-smoothing",
13115     subproperties: ["-moz-osx-font-smoothing"],
13116   };
13119 if (IsCSSPropertyPrefEnabled("layout.css.scroll-anchoring.enabled")) {
13120   gCSSProperties["overflow-anchor"] = {
13121     domProp: "overflowAnchor",
13122     inherited: false,
13123     type: CSS_TYPE_LONGHAND,
13124     initial_values: ["auto"],
13125     other_values: ["none"],
13126     invalid_values: [],
13127   };
13130 if (IsCSSPropertyPrefEnabled("layout.css.overflow-clip-box.enabled")) {
13131   gCSSProperties["overflow-clip-box-block"] = {
13132     domProp: "overflowClipBoxBlock",
13133     inherited: false,
13134     type: CSS_TYPE_LONGHAND,
13135     applies_to_placeholder: true,
13136     initial_values: ["padding-box"],
13137     other_values: ["content-box"],
13138     invalid_values: ["auto", "border-box", "0", "padding-box padding-box"],
13139   };
13140   gCSSProperties["overflow-clip-box-inline"] = {
13141     domProp: "overflowClipBoxInline",
13142     inherited: false,
13143     type: CSS_TYPE_LONGHAND,
13144     applies_to_placeholder: true,
13145     initial_values: ["padding-box"],
13146     other_values: ["content-box"],
13147     invalid_values: ["none", "border-box", "0", "content-box content-box"],
13148   };
13149   gCSSProperties["overflow-clip-box"] = {
13150     domProp: "overflowClipBox",
13151     inherited: false,
13152     type: CSS_TYPE_TRUE_SHORTHAND,
13153     subproperties: ["overflow-clip-box-block", "overflow-clip-box-inline"],
13154     initial_values: ["padding-box"],
13155     other_values: [
13156       "content-box",
13157       "padding-box content-box",
13158       "content-box padding-box",
13159       "content-box content-box",
13160     ],
13161     invalid_values: [
13162       "none",
13163       "auto",
13164       "content-box none",
13165       "border-box",
13166       "0",
13167       "content-box, content-box",
13168     ],
13169   };
13172 if (IsCSSPropertyPrefEnabled("layout.css.overscroll-behavior.enabled")) {
13173   gCSSProperties["overscroll-behavior-x"] = {
13174     domProp: "overscrollBehaviorX",
13175     inherited: false,
13176     type: CSS_TYPE_LONGHAND,
13177     initial_values: ["auto"],
13178     other_values: ["contain", "none"],
13179     invalid_values: ["left", "1px"],
13180   };
13181   gCSSProperties["overscroll-behavior-y"] = {
13182     domProp: "overscrollBehaviorY",
13183     inherited: false,
13184     type: CSS_TYPE_LONGHAND,
13185     initial_values: ["auto"],
13186     other_values: ["contain", "none"],
13187     invalid_values: ["left", "1px"],
13188   };
13189   gCSSProperties["overscroll-behavior-inline"] = {
13190     domProp: "overscrollBehaviorInline",
13191     inherited: false,
13192     logical: true,
13193     type: CSS_TYPE_LONGHAND,
13194     initial_values: ["auto"],
13195     other_values: ["contain", "none"],
13196     invalid_values: ["left", "1px"],
13197   };
13198   gCSSProperties["overscroll-behavior-block"] = {
13199     domProp: "overscrollBehaviorBlock",
13200     inherited: false,
13201     logical: true,
13202     type: CSS_TYPE_LONGHAND,
13203     initial_values: ["auto"],
13204     other_values: ["contain", "none"],
13205     invalid_values: ["left", "1px"],
13206   };
13207   gCSSProperties["overscroll-behavior"] = {
13208     domProp: "overscrollBehavior",
13209     inherited: false,
13210     type: CSS_TYPE_TRUE_SHORTHAND,
13211     subproperties: ["overscroll-behavior-x", "overscroll-behavior-y"],
13212     initial_values: ["auto"],
13213     other_values: [
13214       "contain",
13215       "none",
13216       "contain contain",
13217       "contain auto",
13218       "none contain",
13219     ],
13220     invalid_values: ["left", "1px", "contain auto none", "contain nonsense"],
13221   };
13225   const patterns = {
13226     background: [
13227       "{} scroll no-repeat",
13228       "{} repeat",
13229       "url(404.png), {}, -moz-element(#a) black",
13230     ],
13231     mask: [
13232       "{} add no-repeat",
13233       "{} repeat",
13234       "url(404.png), {}, -moz-element(#a) alpha",
13235     ],
13236   };
13238   for (const prop of ["background", "mask"]) {
13239     let i = 0;
13240     const p = patterns[prop];
13241     for (const v of invalidNonUrlImageValues) {
13242       gCSSProperties[prop].invalid_values.push(
13243         p[i++ % p.length].replace("{}", v)
13244       );
13245     }
13246     for (const v of validNonUrlImageValues) {
13247       gCSSProperties[prop].other_values.push(
13248         p[i++ % p.length].replace("{}", v)
13249       );
13250     }
13251   }
13254 gCSSProperties["display"].other_values.push("flow-root");
13256 gCSSProperties["hyphenate-character"] = {
13257   domProp: "hyphenateCharacter",
13258   inherited: true,
13259   type: CSS_TYPE_LONGHAND,
13260   applies_to_first_letter: true,
13261   applies_to_first_line: true,
13262   applies_to_placeholder: true,
13263   initial_values: ["auto"],
13264   other_values: ['"="', '"/-/"', '"\1400"', '""'],
13265   invalid_values: ["none", "auto auto", "1400", "U+1400"],
13268 gCSSProperties["content-visibility"] = {
13269   domProp: "contentVisibility",
13270   inherited: false,
13271   type: CSS_TYPE_LONGHAND,
13272   initial_values: ["visible"],
13273   other_values: ["auto", "hidden"],
13274   invalid_values: [
13275     "invisible",
13276     "partially-visible",
13277     "auto auto",
13278     "visible hidden",
13279   ],
13282 if (IsCSSPropertyPrefEnabled("layout.css.contain-intrinsic-size.enabled")) {
13283   gCSSProperties["contain-intrinsic-width"] = {
13284     domProp: "containIntrinsicWidth",
13285     inherited: false,
13286     type: CSS_TYPE_LONGHAND,
13287     initial_values: ["none"],
13288     other_values: ["1em", "1px", "auto 1px", "auto none"],
13289     invalid_values: ["auto auto", "auto", "-1px"],
13290   };
13291   gCSSProperties["contain-intrinsic-height"] = {
13292     domProp: "containIntrinsicHeight",
13293     inherited: false,
13294     type: CSS_TYPE_LONGHAND,
13295     initial_values: ["none"],
13296     other_values: ["1em", "1px", "auto 1px", "auto none"],
13297     invalid_values: ["auto auto", "auto", "-1px"],
13298   };
13299   gCSSProperties["contain-intrinsic-block-size"] = {
13300     domProp: "containIntrinsicBlockSize",
13301     inherited: false,
13302     logical: true,
13303     type: CSS_TYPE_LONGHAND,
13304     initial_values: ["none"],
13305     other_values: ["1em", "1px", "auto 1px", "auto none"],
13306     invalid_values: ["auto auto", "auto", "-1px"],
13307   };
13308   gCSSProperties["contain-intrinsic-inline-size"] = {
13309     domProp: "containIntrinsicInlineSize",
13310     inherited: false,
13311     logical: true,
13312     type: CSS_TYPE_LONGHAND,
13313     initial_values: ["none"],
13314     other_values: ["1em", "1px", "auto 1px", "auto none"],
13315     invalid_values: ["auto auto", "auto", "-1px"],
13316   };
13318   gCSSProperties["contain-intrinsic-size"] = {
13319     domProp: "containIntrinsicSize",
13320     inherited: false,
13321     type: CSS_TYPE_TRUE_SHORTHAND,
13322     subproperties: ["contain-intrinsic-width", "contain-intrinsic-height"],
13323     initial_values: ["none"],
13324     other_values: ["1em 1em", "1px 1px", "auto 1px auto 1px", "1px auto 1px"],
13325     invalid_values: ["auto auto", "-1px -1px", "1px, auto none"],
13326   };
13329 if (IsCSSPropertyPrefEnabled("layout.css.anchor-positioning.enabled")) {
13330   gCSSProperties["anchor-name"] = {
13331     domProp: "anchorName",
13332     inherited: false,
13333     type: CSS_TYPE_LONGHAND,
13334     initial_values: ["none"],
13335     other_values: ["--foo", "--foo, --baz", "--foo,--baz", "--foo ,--baz"],
13336     invalid_values: [
13337       "--foo --bar",
13338       "foo",
13339       "none bar",
13340       "none --baz",
13341       "--foo bar",
13342       ",--foo",
13343       "--foo,",
13344     ],
13345   };
13347   gCSSProperties["anchor-scope"] = {
13348     domProp: "anchorScope",
13349     inherited: false,
13350     type: CSS_TYPE_LONGHAND,
13351     initial_values: ["none"],
13352     other_values: [
13353       "all",
13354       "--foo",
13355       "--foo, --baz",
13356       "--foo,--baz",
13357       "--foo ,--baz",
13358     ],
13359     invalid_values: [
13360       "all, --foo",
13361       "--foo, all",
13362       "--foo --bar",
13363       "foo",
13364       "none bar",
13365       "none --baz",
13366       "--foo bar",
13367       ",--foo",
13368       "--foo,",
13369     ],
13370   };
13372   gCSSProperties["position-anchor"] = {
13373     domProp: "positionAnchor",
13374     inherited: false,
13375     type: CSS_TYPE_LONGHAND,
13376     initial_values: ["auto"],
13377     other_values: ["--foo"],
13378     invalid_values: ["none", "--foo, auto", "auto, --bar", "foo"],
13379   };
13381   gCSSProperties["position-area"] = {
13382     domProp: "positionArea",
13383     inherited: false,
13384     type: CSS_TYPE_LONGHAND,
13385     initial_values: ["none"],
13386     other_values: [
13387       "center",
13388       "span-all",
13389       "left",
13390       "right",
13391       "span-left",
13392       "span-right",
13393       "x-start",
13394       "x-end",
13395       "span-x-start",
13396       "span-x-end",
13397       "x-self-start",
13398       "x-self-end",
13399       "span-x-self-start",
13400       "span-x-self-end",
13401       "top",
13402       "bottom",
13403       "span-top",
13404       "span-bottom",
13405       "y-start",
13406       "y-end",
13407       "span-y-start",
13408       "span-y-end",
13409       "y-self-start",
13410       "y-self-end",
13411       "span-y-self-start",
13412       "span-y-self-end",
13413       "block-start",
13414       "block-end",
13415       "span-block-start",
13416       "span-block-end",
13417       "inline-start",
13418       "inline-end",
13419       "span-inline-start",
13420       "span-inline-end",
13421       "self-block-start",
13422       "self-block-end",
13423       "span-self-block-start",
13424       "span-self-block-end",
13425       "self-inline-start",
13426       "self-inline-end",
13427       "span-self-inline-start",
13428       "span-self-inline-end",
13429       "start",
13430       "end",
13431       "span-start",
13432       "span-end",
13433       "self-start",
13434       "self-end",
13435       "span-self-start",
13436       "span-self-end",
13437       "center span-all",
13438       "left center",
13439       "span-left bottom",
13440       "span-block-end inline-start",
13441       "span-inline-start block-end",
13442       "self-block-end span-self-inline-start",
13443       "start center",
13444       "span-start span-end",
13445       "self-end span-self-start",
13446     ],
13447     invalid_values: [
13448       "auto",
13449       "none left",
13450       "left self-top",
13451       "right block-end",
13452       "top self-end",
13453       "inline-start self-block-end",
13454       "span-self-inline-start start",
13455       "end span-self-start",
13456     ],
13457   };
13459   gCSSProperties["position-try-fallbacks"] = {
13460     domProp: "positionTryFallbacks",
13461     inherited: false,
13462     type: CSS_TYPE_LONGHAND,
13463     initial_values: ["none"],
13464     other_values: [
13465       "--foo",
13466       "flip-block",
13467       "flip-inline",
13468       "flip-start",
13469       "left",
13470       "span-y-start",
13471       "span-block-start inline-end",
13472       "span-all self-block-end",
13473       "end span-start",
13474       "center span-all",
13475     ],
13476     invalid_values: ["foo", "none none", "span-y-start self-block-end"],
13477   };
13479   gCSSProperties["position-try-order"] = {
13480     domProp: "positionTryOrder",
13481     inherited: false,
13482     type: CSS_TYPE_LONGHAND,
13483     initial_values: ["normal"],
13484     other_values: [
13485       "most-width",
13486       "most-height",
13487       "most-block-size",
13488       "most-inline-size",
13489     ],
13490     invalid_values: ["auto", "none", "foo"],
13491   };
13493   gCSSProperties["position-visibility"] = {
13494     domProp: "positionVisibility",
13495     inherited: false,
13496     type: CSS_TYPE_LONGHAND,
13497     initial_values: ["always"],
13498     other_values: ["anchors-valid", "anchors-visible", "no-overflow"],
13499     invalid_values: [
13500       "none",
13501       "auto",
13502       "always anchors-valid",
13503       "anchors-visible always",
13504     ],
13505   };
13507   gCSSProperties["position-try"] = {
13508     domProp: "positionTry",
13509     inherited: false,
13510     type: CSS_TYPE_TRUE_SHORTHAND,
13511     subproperties: ["position-try-order", "position-try-fallbacks"],
13512     initial_values: ["none"],
13513     other_values: [
13514       "--foo",
13515       "flip-block",
13516       "flip-inline",
13517       "flip-start",
13518       "left",
13519       "span-y-start",
13520       "span-block-start inline-end",
13521       "span-all self-block-end",
13522       "end span-start",
13523       "center span-all",
13524       "most-width --foo",
13525       "most-width flip-block",
13526       "most-width flip-inline",
13527       "most-width flip-start",
13528       "most-width left",
13529       "most-width span-y-start",
13530       "most-width span-block-start inline-end",
13531       "most-width span-all self-block-end",
13532       "most-width end span-start",
13533       "most-width center span-all",
13534       "most-height --foo",
13535       "most-height flip-block",
13536       "most-height flip-inline",
13537       "most-height flip-start",
13538       "most-height left",
13539       "most-height span-y-start",
13540       "most-height span-block-start inline-end",
13541       "most-height span-all self-block-end",
13542       "most-height end span-start",
13543       "most-height center span-all",
13544       "most-block-size --foo",
13545       "most-block-size flip-block",
13546       "most-block-size flip-inline",
13547       "most-block-size flip-start",
13548       "most-block-size left",
13549       "most-block-size span-y-start",
13550       "most-block-size span-block-start inline-end",
13551       "most-block-size span-all self-block-end",
13552       "most-block-size end span-start",
13553       "most-block-size center span-all",
13554       "most-inline-size --foo",
13555       "most-inline-size flip-block",
13556       "most-inline-size flip-inline",
13557       "most-inline-size flip-start",
13558       "most-inline-size left",
13559       "most-inline-size span-y-start",
13560       "most-inline-size span-block-start inline-end",
13561       "most-inline-size span-all self-block-end",
13562       "most-inline-size end span-start",
13563       "most-inline-size center span-all",
13564     ],
13565     invalid_values: [
13566       "foo",
13567       "--foo none none",
13568       "--foo span-y-start self-block-end",
13569     ],
13570   };
13573 if (false) {
13574   // TODO These properties are chrome-only, and are not exposed via CSSOM.
13575   // We may still want to find a way to test them. See bug 1206999.
13576   gCSSProperties["-moz-window-shadow"] = {
13577     //domProp: "MozWindowShadow",
13578     inherited: false,
13579     type: CSS_TYPE_LONGHAND,
13580     initial_values: ["default"],
13581     other_values: ["none", "menu", "tooltip", "sheet", "cliprounded"],
13582     invalid_values: [],
13583   };
13585   gCSSProperties["-moz-window-opacity"] = {
13586     // domProp: "MozWindowOpacity",
13587     inherited: false,
13588     type: CSS_TYPE_LONGHAND,
13589     initial_values: [
13590       "1",
13591       "17",
13592       "397.376",
13593       "3e1",
13594       "3e+1",
13595       "3e0",
13596       "3e+0",
13597       "3e-0",
13598       "300%",
13599     ],
13600     other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"],
13601     invalid_values: ["0px", "1px", "20%", "default", "auto"],
13602   };
13604   gCSSProperties["-moz-window-transform"] = {
13605     // domProp: "MozWindowTransform",
13606     inherited: false,
13607     type: CSS_TYPE_LONGHAND,
13608     prerequisites: { width: "300px", height: "50px" },
13609     initial_values: ["none"],
13610     other_values: [
13611       "translatex(1px)",
13612       "translatex(4em)",
13613       "translatex(-4px)",
13614       "translatex(3px)",
13615       "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
13616       "translatey(4em)",
13617       "translate(3px)",
13618       "translate(10px, -3px)",
13619       "rotate(45deg)",
13620       "rotate(45grad)",
13621       "rotate(45rad)",
13622       "rotate(0.25turn)",
13623       "rotate(0)",
13624       "scalex(10)",
13625       "scalex(10%)",
13626       "scalex(-10)",
13627       "scalex(-10%)",
13628       "scaley(10)",
13629       "scaley(10%)",
13630       "scaley(-10)",
13631       "scaley(-10%)",
13632       "scale(10)",
13633       "scale(10%)",
13634       "scale(10, 20)",
13635       "scale(10%, 20%)",
13636       "scale(-10)",
13637       "scale(-10%)",
13638       "scale(-10, 20)",
13639       "scale(10%, -20%)",
13640       "scale(10, 20%)",
13641       "scale(-10, 20%)",
13642       "skewx(30deg)",
13643       "skewx(0)",
13644       "skewy(0)",
13645       "skewx(30grad)",
13646       "skewx(30rad)",
13647       "skewx(0.08turn)",
13648       "skewy(30deg)",
13649       "skewy(30grad)",
13650       "skewy(30rad)",
13651       "skewy(0.08turn)",
13652       "rotate(45deg) scale(2, 1)",
13653       "skewx(45deg) skewx(-50grad)",
13654       "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
13655       "translatex(50%)",
13656       "translatey(50%)",
13657       "translate(50%)",
13658       "translate(3%, 5px)",
13659       "translate(5px, 3%)",
13660       "matrix(1, 2, 3, 4, 5, 6)",
13661       /* valid calc() values */
13662       "translatex(calc(5px + 10%))",
13663       "translatey(calc(0.25 * 5px + 10% / 3))",
13664       "translate(calc(5px - 10% * 3))",
13665       "translate(calc(5px - 3 * 10%), 50px)",
13666       "translate(-50px, calc(5px - 10% * 3))",
13667       "translatez(1px)",
13668       "translatez(4em)",
13669       "translatez(-4px)",
13670       "translatez(0px)",
13671       "translatez(2px) translatez(5px)",
13672       "translate3d(3px, 4px, 5px)",
13673       "translate3d(2em, 3px, 1em)",
13674       "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
13675       "scale3d(4, 4, 4)",
13676       "scale3d(4%, 4%, 4%)",
13677       "scale3d(-2, 3, -7)",
13678       "scale3d(-2%, 3%, -7%)",
13679       "scalez(4)",
13680       "scalez(4%)",
13681       "scalez(-6)",
13682       "scalez(-6%)",
13683       "rotate3d(2, 3, 4, 45deg)",
13684       "rotate3d(-3, 7, 0, 12rad)",
13685       "rotatex(15deg)",
13686       "rotatey(-12grad)",
13687       "rotatez(72rad)",
13688       "rotatex(0.125turn)",
13689       "perspective(0px)",
13690       "perspective(1000px)",
13691       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
13692       "translate(10px, calc(min(5px,10%)))",
13693       "translate(calc(max(5px,10%)), 10%)",
13694       "translate(max(5px,10%), 10%)",
13695     ],
13696     invalid_values: [
13697       "1px",
13698       "#0000ff",
13699       "red",
13700       "auto",
13701       "translatex(1)",
13702       "translatey(1)",
13703       "translate(2)",
13704       "translate(-3, -4)",
13705       "translatex(1px 1px)",
13706       "translatex(translatex(1px))",
13707       "translatex(#0000ff)",
13708       "translatex(red)",
13709       "translatey()",
13710       "matrix(1px, 2px, 3px, 4px, 5px, 6px)",
13711       "skewx(red)",
13712       "matrix(1%, 0, 0, 0, 0px, 0px)",
13713       "matrix(0, 1%, 2, 3, 4px,5px)",
13714       "matrix(0, 1, 2%, 3, 4px, 5px)",
13715       "matrix(0, 1, 2, 3%, 4%, 5%)",
13716       "matrix(1, 2, 3, 4, 5px, 6%)",
13717       "matrix(1, 2, 3, 4, 5%, 6px)",
13718       "matrix(1, 2, 3, 4, 5%, 6%)",
13719       "matrix(1, 2, 3, 4, 5px, 6em)",
13720       /* invalid calc() values */
13721       "translatey(-moz-min(5px,10%))",
13722       "translatex(-moz-max(5px,10%))",
13723       "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
13724       "perspective(-10px)",
13725       "matrix3d(dinosaur)",
13726       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
13727       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
13728       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
13729       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
13730       "rotatey(words)",
13731       "rotatex(7)",
13732       "translate3d(3px, 4px, 1px, 7px)",
13733       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
13734       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)",
13735     ],
13736   };
13738   gCSSProperties["-moz-window-transform-origin"] = {
13739     // domProp: "MozWindowTransformOrigin",
13740     inherited: false,
13741     type: CSS_TYPE_LONGHAND,
13742     /* no subproperties */
13743     prerequisites: { width: "10px", height: "10px", display: "block" },
13744     initial_values: ["50% 50%", "center", "center center"],
13745     other_values: [
13746       "25% 25%",
13747       "6px 5px",
13748       "20% 3em",
13749       "0 0",
13750       "0in 1in",
13751       "top",
13752       "bottom",
13753       "top left",
13754       "top right",
13755       "top center",
13756       "center left",
13757       "center right",
13758       "bottom left",
13759       "bottom right",
13760       "bottom center",
13761       "20% center",
13762       "6px center",
13763       "13in bottom",
13764       "left 50px",
13765       "right 13%",
13766       "center 40px",
13767       "calc(20px)",
13768       "calc(20px) 10px",
13769       "10px calc(20px)",
13770       "calc(20px) 25%",
13771       "25% calc(20px)",
13772       "calc(20px) calc(20px)",
13773       "calc(20px + 1em) calc(20px / 2)",
13774       "calc(20px + 50%) calc(50% - 10px)",
13775       "calc(-20px) calc(-50%)",
13776       "calc(-20%) calc(-50%)",
13777     ],
13778     invalid_values: [
13779       "red",
13780       "auto",
13781       "none",
13782       "0.5 0.5",
13783       "40px #0000ff",
13784       "border",
13785       "center red",
13786       "right diagonal",
13787       "#00ffff bottom",
13788       "0px calc(0px + rubbish)",
13789       "0px 0px calc(0px + rubbish)",
13790       "6px 5px 5px",
13791       "top center 10px",
13792     ],
13793   };
13795   gCSSProperties["-moz-context-properties"] = {
13796     //domProp: "MozContextProperties",
13797     inherited: true,
13798     type: CSS_TYPE_LONGHAND,
13799     initial_values: ["none"],
13800     other_values: [
13801       "fill",
13802       "stroke",
13803       "fill, stroke",
13804       "fill, stroke, fill",
13805       "fill, foo",
13806       "foo",
13807     ],
13808     invalid_values: [
13809       "default",
13810       "fill, auto",
13811       "all, stroke",
13812       "none, fill",
13813       "fill, none",
13814       "fill, default",
13815       "2px",
13816     ],
13817   };
13820 gCSSProperties["scrollbar-color"] = {
13821   domProp: "scrollbarColor",
13822   inherited: true,
13823   type: CSS_TYPE_LONGHAND,
13824   initial_values: ["auto"],
13825   other_values: ["red green", "blue yellow", "#ffff00 white"],
13826   invalid_values: ["ffff00 red", "auto red", "red auto", "green"],
13829 gCSSProperties["scrollbar-width"] = {
13830   domProp: "scrollbarWidth",
13831   inherited: false,
13832   type: CSS_TYPE_LONGHAND,
13833   initial_values: ["auto"],
13834   other_values: ["none", "thin"],
13835   invalid_values: ["1px"],
13838 if (IsCSSPropertyPrefEnabled("layout.css.motion-path-url.enabled")) {
13839   gCSSProperties["offset-path"]["other_values"].push("url(#svgPath)");
13843   let linear_function_other_values = [
13844     "linear(0, 1)",
13845     "linear(0 0% 50%, 1 50% 100%)",
13846   ];
13848   let linear_function_invalid_values = [
13849     "linear()",
13850     "linear(0.5)",
13851     "linear(0% 0 100%)",
13852     "linear(0,)",
13853   ];
13854   gCSSProperties["animation-timing-function"].other_values.push(
13855     ...linear_function_other_values
13856   );
13857   gCSSProperties["animation-timing-function"].invalid_values.push(
13858     ...linear_function_invalid_values
13859   );
13861   gCSSProperties["transition-timing-function"].other_values.push(
13862     ...linear_function_other_values
13863   );
13864   gCSSProperties["transition-timing-function"].invalid_values.push(
13865     ...linear_function_invalid_values
13866   );
13868   gCSSProperties["animation"].other_values.push(
13869     "1s 2s linear(0, 1) bounce",
13870     "4s linear(0, 0.5 25% 75%, 1 100% 100%)"
13871   );
13874 if (IsCSSPropertyPrefEnabled("layout.css.backdrop-filter.enabled")) {
13875   gCSSProperties["backdrop-filter"] = {
13876     domProp: "backdropFilter",
13877     inherited: false,
13878     type: CSS_TYPE_LONGHAND,
13879     initial_values: ["none"],
13880     other_values: gCSSProperties["filter"].other_values,
13881     invalid_values: gCSSProperties["filter"].invalid_values,
13882   };
13885 gCSSProperties["math-depth"] = {
13886   domProp: "mathDepth",
13887   inherited: true,
13888   type: CSS_TYPE_LONGHAND,
13889   initial_values: ["0"],
13890   other_values: [
13891     // auto-add cannot be tested here because it has no effect when the
13892     // inherited math-style is equal to the default (normal).
13893     "123",
13894     "-123",
13895     "add(123)",
13896     "add(-123)",
13897     "calc(1 + 2*3)",
13898     "add(calc(4 - 2/3))",
13899   ],
13900   invalid_values: ["auto", "1,23", "1.23", "add(1,23)", "add(1.23)"],
13903 gCSSProperties["math-style"] = {
13904   domProp: "mathStyle",
13905   inherited: true,
13906   type: CSS_TYPE_LONGHAND,
13907   initial_values: ["normal"],
13908   other_values: ["compact"],
13909   invalid_values: [],
13912 gCSSProperties["forced-color-adjust"] = {
13913   domProp: "forcedColorAdjust",
13914   inherited: true,
13915   type: CSS_TYPE_LONGHAND,
13916   initial_values: ["auto"],
13917   other_values: ["none"],
13918   invalid_values: [],
13921 if (IsCSSPropertyPrefEnabled("layout.css.animation-composition.enabled")) {
13922   gCSSProperties["animation-composition"] = {
13923     domProp: "animationComposition",
13924     inherited: false,
13925     type: CSS_TYPE_LONGHAND,
13926     applies_to_marker: true,
13927     initial_values: ["replace"],
13928     other_values: [
13929       "add",
13930       "accumulate",
13931       "replace, add",
13932       "add, accumulate",
13933       "replace, add, accumulate",
13934     ],
13935     invalid_values: ["all", "none"],
13936   };
13939 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.animations")) {
13940   Object.assign(gCSSProperties, {
13941     "-moz-animation": {
13942       domProp: "MozAnimation",
13943       inherited: false,
13944       type: CSS_TYPE_TRUE_SHORTHAND,
13945       applies_to_marker: true,
13946       alias_for: "animation",
13947       subproperties: [
13948         "animation-name",
13949         "animation-duration",
13950         "animation-timing-function",
13951         "animation-delay",
13952         "animation-direction",
13953         "animation-fill-mode",
13954         "animation-iteration-count",
13955         "animation-play-state",
13956       ],
13957     },
13958     "-moz-animation-delay": {
13959       domProp: "MozAnimationDelay",
13960       inherited: false,
13961       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13962       applies_to_marker: true,
13963       alias_for: "animation-delay",
13964       subproperties: ["animation-delay"],
13965     },
13966     "-moz-animation-direction": {
13967       domProp: "MozAnimationDirection",
13968       inherited: false,
13969       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13970       applies_to_marker: true,
13971       alias_for: "animation-direction",
13972       subproperties: ["animation-direction"],
13973     },
13974     "-moz-animation-duration": {
13975       domProp: "MozAnimationDuration",
13976       inherited: false,
13977       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13978       applies_to_marker: true,
13979       alias_for: "animation-duration",
13980       subproperties: ["animation-duration"],
13981     },
13982     "-moz-animation-fill-mode": {
13983       domProp: "MozAnimationFillMode",
13984       inherited: false,
13985       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13986       applies_to_marker: true,
13987       alias_for: "animation-fill-mode",
13988       subproperties: ["animation-fill-mode"],
13989     },
13990     "-moz-animation-iteration-count": {
13991       domProp: "MozAnimationIterationCount",
13992       inherited: false,
13993       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13994       applies_to_marker: true,
13995       alias_for: "animation-iteration-count",
13996       subproperties: ["animation-iteration-count"],
13997     },
13998     "-moz-animation-name": {
13999       domProp: "MozAnimationName",
14000       inherited: false,
14001       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14002       applies_to_marker: true,
14003       alias_for: "animation-name",
14004       subproperties: ["animation-name"],
14005     },
14006     "-moz-animation-play-state": {
14007       domProp: "MozAnimationPlayState",
14008       inherited: false,
14009       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14010       applies_to_marker: true,
14011       alias_for: "animation-play-state",
14012       subproperties: ["animation-play-state"],
14013     },
14014     "-moz-animation-timing-function": {
14015       domProp: "MozAnimationTimingFunction",
14016       inherited: false,
14017       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14018       applies_to_marker: true,
14019       alias_for: "animation-timing-function",
14020       subproperties: ["animation-timing-function"],
14021     },
14022   });
14025 if (IsCSSPropertyPrefEnabled("layout.css.scroll-driven-animations.enabled")) {
14026   // Basically, web-platform-tests should cover most cases, so here we only
14027   // put some basic test cases.
14028   gCSSProperties["animation"].subproperties.push("animation-timeline");
14029   gCSSProperties["-moz-animation"].subproperties.push("animation-timeline");
14030   gCSSProperties["-webkit-animation"].subproperties.push("animation-timeline");
14032   gCSSProperties["animation-duration"].initial_values.push("auto");
14034   gCSSProperties["animation-timeline"] = {
14035     domProp: "animationTimeline",
14036     inherited: false,
14037     type: CSS_TYPE_LONGHAND,
14038     applies_to_marker: true,
14039     initial_values: ["auto"],
14040     other_values: [
14041       "none",
14042       "--all",
14043       "--ball",
14044       "--mall",
14045       "--color",
14046       "--bounce, --bubble, --opacity",
14047       "--foobar",
14048       "--\\32bounce",
14049       "--bounce",
14050       "--\\32 0bounce",
14051       "--\\2bounce",
14052       "scroll()",
14053       "scroll(block)",
14054       "scroll(inline)",
14055       "scroll(x)",
14056       "scroll(y)",
14057       "scroll(root)",
14058       "scroll(nearest)",
14059       "scroll(inline nearest)",
14060       "scroll(y root)",
14061       "scroll(root x)",
14062       "view()",
14063       "view(inline)",
14064       "view(auto)",
14065       "view(auto 1px)",
14066       "view(inline auto)",
14067       "view(y auto auto)",
14068       "view(x 1px 1%)",
14069       "view(1px 1% block)",
14070     ],
14071     invalid_values: [
14072       "abc",
14073       "--bounce, initial",
14074       "initial, --bounce",
14075       "--bounce, inherit",
14076       "inherit, --bounce",
14077       "--bounce, unset",
14078       "unset, --bounce",
14079     ],
14080   };
14082   gCSSProperties["scroll-timeline-name"] = {
14083     domProp: "scrollTimelineName",
14084     inherited: false,
14085     type: CSS_TYPE_LONGHAND,
14086     initial_values: ["none"],
14087     other_values: [
14088       "--all",
14089       "--auto",
14090       "--ball",
14091       "--mall",
14092       "--color",
14093       "--foobar",
14094       "--\\32bounce",
14095       "--bounce",
14096       "--\\32 0bounce",
14097       "--\\2bounce",
14098     ],
14099     invalid_values: ["abc", "abc --bounce", "10px", "rgb(1, 2, 3)"],
14100   };
14102   gCSSProperties["scroll-timeline-axis"] = {
14103     domProp: "scrollTimelineAxis",
14104     inherited: false,
14105     type: CSS_TYPE_LONGHAND,
14106     initial_values: ["block"],
14107     other_values: ["inline", "x", "y"],
14108     invalid_values: ["auto", "none", "abc", "horizontal"],
14109   };
14111   gCSSProperties["scroll-timeline"] = {
14112     domProp: "scrollTimeline",
14113     inherited: false,
14114     type: CSS_TYPE_TRUE_SHORTHAND,
14115     subproperties: ["scroll-timeline-name", "scroll-timeline-axis"],
14116     initial_values: ["none block", "none"],
14117     other_values: [
14118       "--auto inline",
14119       "--bounce inline",
14120       "--bounce y",
14121       "--\\32bounce inline",
14122       "--bounce block",
14123       "--\\32 0bounce y",
14124       "--\\32 0bounce x",
14125       "--a, --b, --c",
14126       "--a block, --b inline, --c y",
14127     ],
14128     invalid_values: ["", "--bounce --bounce", "x --a", "block --abc"],
14129   };
14131   gCSSProperties["view-timeline-name"] = {
14132     domProp: "viewTimelineName",
14133     inherited: false,
14134     type: CSS_TYPE_LONGHAND,
14135     initial_values: ["none"],
14136     other_values: [
14137       "--all",
14138       "--auto",
14139       "--ball",
14140       "--mall",
14141       "--color",
14142       "--foobar",
14143       "--\\32bounce",
14144       "--bounce",
14145       "--\\32 0bounce",
14146       "--\\2bounce",
14147       "--bounce, --abc",
14148       "none, none",
14149     ],
14150     invalid_values: ["abc", "abc --bounce", "10px", "rgb(1, 2, 3)"],
14151   };
14153   gCSSProperties["view-timeline-axis"] = {
14154     domProp: "viewTimelineAxis",
14155     inherited: false,
14156     type: CSS_TYPE_LONGHAND,
14157     initial_values: ["block"],
14158     other_values: ["inline", "x", "y", "inline, block"],
14159     invalid_values: ["auto", "none", "abc", "inline block", "vertical"],
14160   };
14162   gCSSProperties["view-timeline-inset"] = {
14163     domProp: "viewTimelineInset",
14164     inherited: false,
14165     type: CSS_TYPE_LONGHAND,
14166     initial_values: ["auto"],
14167     other_values: ["0px", "1%", "1px 1%", "0px 0%", "calc(0px) auto"],
14168     invalid_values: ["none", "rgb(1, 2, 3)", "foo bar", "1px 2px 3px"],
14169   };
14171   gCSSProperties["view-timeline"] = {
14172     domProp: "viewTimeline",
14173     inherited: false,
14174     type: CSS_TYPE_TRUE_SHORTHAND,
14175     subproperties: ["view-timeline-name", "view-timeline-axis"],
14176     initial_values: ["none block", "none"],
14177     other_values: [
14178       "--auto inline",
14179       "--bounce inline",
14180       "--bounce y",
14181       "--\\32bounce inline",
14182       "--bounce block",
14183       "--\\32 0bounce y",
14184       "--\\32 0bounce x",
14185       "--a, --b, --c",
14186       "--a block, --b inline, --c y",
14187     ],
14188     invalid_values: ["", ",", "--abc --abc", "x --a", "block --abc"],
14189   };
14192 gCSSProperties["scrollbar-gutter"] = {
14193   domProp: "scrollbarGutter",
14194   inherited: false,
14195   type: CSS_TYPE_LONGHAND,
14196   initial_values: ["auto"],
14197   other_values: ["stable", "stable both-edges", "both-edges stable"],
14198   invalid_values: [
14199     "auto stable",
14200     "auto both-edges",
14201     "both-edges",
14202     "stable mirror",
14203     // The following values are from scrollbar-gutter extension in CSS
14204     // Overflow 4 https://drafts.csswg.org/css-overflow-4/#sbg-ext.
14205     "always",
14206     "always both-edges",
14207     "always force",
14208     "always both-edges force",
14209     "stable both-edges force",
14210     "match-parent",
14211   ],
14214 if (IsCSSPropertyPrefEnabled("layout.css.text-wrap-balance.enabled")) {
14215   gCSSProperties["text-wrap-style"] = {
14216     domProp: "textWrapStyle",
14217     inherited: true,
14218     type: CSS_TYPE_LONGHAND,
14219     applies_to_placeholder: true,
14220     applies_to_cue: true,
14221     applies_to_marker: true,
14222     initial_values: ["auto"],
14223     other_values: ["stable", "balance"],
14224     invalid_values: ["wrap", "nowrap", "normal"],
14225   };
14226   gCSSProperties["text-wrap"].subproperties.push("text-wrap-style");
14227   gCSSProperties["text-wrap"].other_values.push("stable");
14228   gCSSProperties["text-wrap"].other_values.push("balance");
14229   gCSSProperties["text-wrap"].other_values.push("wrap stable");
14230   gCSSProperties["text-wrap"].other_values.push("nowrap balance");
14233 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transforms")) {
14234   Object.assign(gCSSProperties, {
14235     "-moz-transform": {
14236       domProp: "MozTransform",
14237       inherited: false,
14238       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14239       alias_for: "transform",
14240       subproperties: ["transform"],
14241     },
14242     "-moz-transform-origin": {
14243       domProp: "MozTransformOrigin",
14244       inherited: false,
14245       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14246       alias_for: "transform-origin",
14247       subproperties: ["transform-origin"],
14248     },
14249     "-moz-perspective-origin": {
14250       domProp: "MozPerspectiveOrigin",
14251       inherited: false,
14252       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14253       alias_for: "perspective-origin",
14254       subproperties: ["perspective-origin"],
14255     },
14256     "-moz-perspective": {
14257       domProp: "MozPerspective",
14258       inherited: false,
14259       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14260       alias_for: "perspective",
14261       subproperties: ["perspective"],
14262     },
14263     "-moz-backface-visibility": {
14264       domProp: "MozBackfaceVisibility",
14265       inherited: false,
14266       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14267       alias_for: "backface-visibility",
14268       subproperties: ["backface-visibility"],
14269     },
14270     "-moz-transform-style": {
14271       domProp: "MozTransformStyle",
14272       inherited: false,
14273       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14274       alias_for: "transform-style",
14275       subproperties: ["transform-style"],
14276     },
14277   });
14280 if (IsCSSPropertyPrefEnabled("layout.css.zoom.enabled")) {
14281   Object.assign(gCSSProperties, {
14282     zoom: {
14283       domProp: "zoom",
14284       inherited: false,
14285       type: CSS_TYPE_LONGHAND,
14286       initial_values: ["normal", "1", "100%", "0", "0%"],
14287       other_values: ["1.5", "2", "150%", "200%"],
14288       invalid_values: ["-1", "-40%"],
14289     },
14290   });
14293 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transitions")) {
14294   Object.assign(gCSSProperties, {
14295     "-moz-transition": {
14296       domProp: "MozTransition",
14297       inherited: false,
14298       type: CSS_TYPE_TRUE_SHORTHAND,
14299       applies_to_marker: true,
14300       alias_for: "transition",
14301       subproperties: [
14302         "transition-property",
14303         "transition-duration",
14304         "transition-timing-function",
14305         "transition-delay",
14306       ],
14307     },
14308     "-moz-transition-delay": {
14309       domProp: "MozTransitionDelay",
14310       inherited: false,
14311       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14312       applies_to_marker: true,
14313       alias_for: "transition-delay",
14314       subproperties: ["transition-delay"],
14315     },
14316     "-moz-transition-duration": {
14317       domProp: "MozTransitionDuration",
14318       inherited: false,
14319       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14320       applies_to_marker: true,
14321       alias_for: "transition-duration",
14322       subproperties: ["transition-duration"],
14323     },
14324     "-moz-transition-property": {
14325       domProp: "MozTransitionProperty",
14326       inherited: false,
14327       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14328       applies_to_marker: true,
14329       alias_for: "transition-property",
14330       subproperties: ["transition-property"],
14331     },
14332     "-moz-transition-timing-function": {
14333       domProp: "MozTransitionTimingFunction",
14334       inherited: false,
14335       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14336       applies_to_marker: true,
14337       alias_for: "transition-timing-function",
14338       subproperties: ["transition-timing-function"],
14339     },
14340   });
14343 if (IsCSSPropertyPrefEnabled("layout.css.transition-behavior.enabled")) {
14344   Object.assign(gCSSProperties, {
14345     "transition-behavior": {
14346       domProp: "transitionBehavior",
14347       inherited: false,
14348       type: CSS_TYPE_LONGHAND,
14349       applies_to_marker: true,
14350       initial_values: ["normal"],
14351       other_values: ["allow-discrete"],
14352       invalid_values: ["none", "auto", "discrete"],
14353     },
14354   });
14356   gCSSProperties["transition"].subproperties.push("transition-behavior");
14357   gCSSProperties["transition"].initial_values.push("normal");
14358   gCSSProperties["transition"].other_values.push(
14359     "allow-discrete",
14360     "width allow-discrete",
14361     "1s allow-discrete",
14362     "linear allow-discrete"
14363   );
14364   gCSSProperties["-webkit-transition"].subproperties.push(
14365     "transition-behavior"
14366   );
14368   if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transitions")) {
14369     gCSSProperties["-moz-transition"].subproperties.push("transition-behavior");
14370   }
14373 if (IsCSSPropertyPrefEnabled("layout.css.field-sizing.enabled")) {
14374   Object.assign(gCSSProperties, {
14375     "field-sizing": {
14376       domProp: "fieldSizing",
14377       inherited: false,
14378       type: CSS_TYPE_LONGHAND,
14379       initial_values: ["fixed"],
14380       other_values: ["content"],
14381       invalid_values: ["none", "auto"],
14382     },
14383   });
14386 if (IsCSSPropertyPrefEnabled("dom.viewTransitions.enabled")) {
14387   Object.assign(gCSSProperties, {
14388     "view-transition-name": {
14389       domProp: "viewTransitionName",
14390       inherited: false,
14391       type: CSS_TYPE_LONGHAND,
14392       initial_values: ["none"],
14393       other_values: [
14394         "all",
14395         "ball",
14396         "mall",
14397         "color",
14398         "foobar",
14399         "\\32bounce",
14400         "-bounce",
14401         "-\\32bounce",
14402         "\\32 0bounce",
14403         "-\\32 0bounce",
14404         "\\2bounce",
14405         "-\\2bounce",
14406       ],
14407       invalid_values: ["auto", "abc --bounce", "10px", "rgb(1, 2, 3)"],
14408     },
14409   });
14412 // Copy aliased properties' fields from their alias targets. Keep this logic
14413 // at the bottom of this file to ensure all the aliased properties are
14414 // processed.
14415 for (var prop in gCSSProperties) {
14416   var entry = gCSSProperties[prop];
14417   if (entry.alias_for) {
14418     var aliasTargetEntry = gCSSProperties[entry.alias_for];
14419     if (!aliasTargetEntry) {
14420       ok(
14421         false,
14422         "Alias '" +
14423           prop +
14424           "' alias_for field, '" +
14425           entry.alias_for +
14426           "', " +
14427           "must be set to a recognized CSS property in gCSSProperties"
14428       );
14429     } else {
14430       // Copy 'values' fields & 'prerequisites' field from aliasTargetEntry:
14431       var fieldsToCopy = [
14432         "initial_values",
14433         "other_values",
14434         "invalid_values",
14435         "quirks_values",
14436         "unbalanced_values",
14437         "prerequisites",
14438       ];
14440       fieldsToCopy.forEach(function (fieldName) {
14441         // (Don't copy the field if the alias already has something there,
14442         // or if the aliased property doesn't have anything to copy.)
14443         if (!(fieldName in entry) && fieldName in aliasTargetEntry) {
14444           entry[fieldName] = aliasTargetEntry[fieldName];
14445         }
14446       });
14447     }
14448   }