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) {
18 if (SpecialPowers.getBoolPref(prefName)) {
24 "Failed to look up property-controlling pref '" +
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)
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'
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
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
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
89 const meta = document.createElement("meta");
90 meta.setAttribute("style", "font: initial;");
91 document.documentElement.appendChild(meta);
92 const family = getComputedStyle(meta).fontFamily;
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 = [
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")
267 "cross-fade(red, blue)",
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
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%)",
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)",
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)",
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
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
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:
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
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
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))",
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")
813 "cross-fade(red blue)",
815 "cross-fade(50%, blue 50%)",
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
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%)",
833 var unbalancedGradientAndElementValues = ["-moz-element(#a()"];
835 var basicShapeSVGBoxValues = [
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)",
849 "polygon(20rem 20em)",
850 "polygon(20cm 20mm)",
851 "polygon(20px 20px, 30px 30px)",
852 "polygon(20px 20px, 30% 30%, 30px 30px)",
858 "polygon(0 0) content-box",
859 "border-box polygon(0 0)",
860 "padding-box polygon( 0 20px , 30px 20% ) ",
864 "circle(at top 0px left 20px)",
865 "circle(at bottom right)",
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",
879 "ellipse(at center)",
880 "ellipse(at top 0px left 20px)",
881 "ellipse(at bottom right)",
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)",
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)",
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()",
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)",
955 "circle(farthest-side closest-side)",
957 "circle(at farthest-side)",
958 "circle(calc(20px + rubbish))",
959 "circle(at top left 20px)",
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)",
970 "ellipse(at farthest-side farthest-side)",
971 "ellipse(at top left calc(20px + rubbish))",
972 "ellipse(at top left 20px)",
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%)",
986 "inset(1px round 1px 2px 3px 4px 5px)",
987 "inset(1px 2px 3px 4px 5px)",
988 "inset(1px, round 3px)",
990 "inset(1px 2px, 3px)",
992 "inset(1px round 1px // 2px)",
994 "inset(1px calc(2px + rubbish))",
995 "inset(1px round 2px calc(3px + rubbish))",
998 var basicShapeUnbalancedValues = [
1000 "polygon(nonzero, 20% 20px",
1001 "polygon(evenodd, 20px 20px",
1004 "circle(40% at 50% 100%",
1006 "ellipse(40% at 50% 100%",
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)"
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)"
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)"
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)"
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(
1060 "shape(evenodd, from 0px 0px)",
1061 "shape(from 0px 0px line to 10px 10px)",
1062 "shape(from 0px 0px)",
1064 "shape(nonzero, close)"
1068 if (/* mozGradientsEnabled */ true) {
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)"
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
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)",
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))",
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)"
1433 const pathValues = {
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')",
1449 "path('M 10-10 20')",
1450 "path('M 10 10 C 20 20 40 20')",
1454 var gCSSProperties = {
1456 domProp: "animation",
1458 type: CSS_TYPE_TRUE_SHORTHAND,
1459 applies_to_marker: true,
1462 "animation-duration",
1463 "animation-timing-function",
1465 "animation-direction",
1466 "animation-fill-mode",
1467 "animation-iteration-count",
1468 "animation-play-state",
1471 "none none 0s 0s ease normal running 1.0",
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",
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",
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",
1540 "2s bounce, 1s inherit",
1541 "2s inherit, 1s bounce",
1543 "2s all,, 1s bounce",
1544 "2s all, , 1s bounce",
1545 "bounce 1s cubic-bezier(0, rubbish) 2s",
1546 "bounce 1s steps(rubbish) 2s",
1550 "animation-delay": {
1551 domProp: "animationDelay",
1553 type: CSS_TYPE_LONGHAND,
1554 applies_to_marker: true,
1555 initial_values: ["0s", "0ms"],
1564 invalid_values: ["0", "0px"],
1566 "animation-direction": {
1567 domProp: "animationDirection",
1569 type: CSS_TYPE_LONGHAND,
1570 applies_to_marker: true,
1571 initial_values: ["normal"],
1574 "normal, alternate",
1575 "alternate, normal",
1577 "normal, normal, normal",
1579 "alternate-reverse",
1580 "normal, reverse, alternate-reverse, alternate",
1585 "reverse-alternate",
1590 "animation-duration": {
1591 domProp: "animationDuration",
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"],
1599 "animation-fill-mode": {
1600 domProp: "animationFillMode",
1602 type: CSS_TYPE_LONGHAND,
1603 applies_to_marker: true,
1604 initial_values: ["none"],
1610 "forwards, backwards",
1614 invalid_values: ["all"],
1616 "animation-iteration-count": {
1617 domProp: "animationIterationCount",
1619 type: CSS_TYPE_LONGHAND,
1620 applies_to_marker: true,
1621 initial_values: ["1"],
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"],
1638 domProp: "animationName",
1640 type: CSS_TYPE_LONGHAND,
1641 applies_to_marker: true,
1642 initial_values: ["none"],
1648 "bounce, bubble, opacity",
1668 "animation-play-state": {
1669 domProp: "animationPlayState",
1671 type: CSS_TYPE_LONGHAND,
1672 applies_to_marker: true,
1673 initial_values: ["running"],
1680 "paused, running, running, running, paused, running",
1682 invalid_values: ["0"],
1684 "animation-timing-function": {
1685 domProp: "animationTimingFunction",
1687 type: CSS_TYPE_LONGHAND,
1688 applies_to_marker: true,
1689 initial_values: ["ease"],
1691 "cubic-bezier(0.25, 0.1, 0.25, 1.0)",
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)",
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)",
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)",
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)",
1731 domProp: "appearance",
1733 type: CSS_TYPE_LONGHAND,
1734 initial_values: ["none"],
1735 other_values: ["auto", "radio", "menulist"],
1738 "-moz-appearance": {
1739 domProp: "MozAppearance",
1741 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1742 alias_for: "appearance",
1743 subproperties: ["appearance"],
1745 "-webkit-appearance": {
1746 domProp: "webkitAppearance",
1748 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1749 alias_for: "appearance",
1750 subproperties: ["appearance"],
1753 domProp: "aspectRatio",
1755 type: CSS_TYPE_LONGHAND,
1756 initial_values: ["auto"],
1769 invalid_values: ["none", "1 test", "1 / auto", "auto / 1"],
1772 domProp: "borderInline",
1774 type: CSS_TYPE_TRUE_SHORTHAND,
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",
1788 "none medium currentcolor",
1799 invalid_values: ["5%", "5", "5 solid green"],
1801 "border-inline-end": {
1802 domProp: "borderInlineEnd",
1804 type: CSS_TYPE_TRUE_SHORTHAND,
1806 "border-inline-end-color",
1807 "border-inline-end-style",
1808 "border-inline-end-width",
1815 "none medium currentcolor",
1826 invalid_values: ["5%", "5", "5 green none"],
1828 "border-inline-color": {
1829 domProp: "borderInlineColor",
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"],
1837 "border-inline-end-color": {
1838 domProp: "borderInlineEndColor",
1840 type: CSS_TYPE_LONGHAND,
1841 applies_to_first_letter: 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"],
1847 "border-inline-style": {
1848 domProp: "borderInlineStyle",
1850 type: CSS_TYPE_TRUE_SHORTHAND,
1851 subproperties: ["border-inline-start-style", "border-inline-end-style"],
1852 initial_values: ["none"],
1865 "border-inline-end-style": {
1866 domProp: "borderInlineEndStyle",
1868 type: CSS_TYPE_LONGHAND,
1869 applies_to_first_letter: true,
1871 /* XXX hidden is sometimes the same as initial */
1872 initial_values: ["none"],
1885 "border-inline-width": {
1886 domProp: "borderInlineWidth",
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"],
1908 invalid_values: ["5%", "5", "5 thin", "thin 5%", "blue", "solid"],
1910 "border-inline-end-width": {
1911 domProp: "borderInlineEndWidth",
1913 type: CSS_TYPE_LONGHAND,
1914 applies_to_first_letter: true,
1916 prerequisites: { "border-inline-end-style": "solid" },
1917 initial_values: ["medium", "3px", "calc(4px - 1px)"],
1930 "calc(3*25px + 5em)",
1932 invalid_values: ["5%", "5"],
1935 domProp: "borderImage",
1937 type: CSS_TYPE_TRUE_SHORTHAND,
1939 "border-image-source",
1940 "border-image-slice",
1941 "border-image-width",
1942 "border-image-outset",
1943 "border-image-repeat",
1945 initial_values: ["none"],
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",
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",
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",
1981 "border-image-source": {
1982 domProp: "borderImageSource",
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
1991 unbalanced_values: [].concat(unbalancedGradientAndElementValues),
1993 "border-image-slice": {
1994 domProp: "borderImageSlice",
1996 type: CSS_TYPE_LONGHAND,
1997 applies_to_first_letter: true,
1998 initial_values: ["100%", "100% 100% 100% 100%"],
2019 "border-image-width": {
2020 domProp: "borderImageWidth",
2022 type: CSS_TYPE_LONGHAND,
2023 applies_to_first_letter: true,
2024 initial_values: ["1", "1 1 1 1"],
2029 "auto auto auto auto",
2031 "10px 10px 10px 10px",
2044 "auto auto auto auto auto",
2045 "10px calc(nonsense)",
2048 unbalanced_values: ["10px calc("],
2050 "border-image-outset": {
2051 domProp: "borderImageOutset",
2053 type: CSS_TYPE_LONGHAND,
2054 applies_to_first_letter: true,
2055 initial_values: ["0", "0 0 0 0"],
2070 "10px calc(nonsense)",
2073 unbalanced_values: ["10px calc("],
2075 "border-image-repeat": {
2076 domProp: "borderImageRepeat",
2078 type: CSS_TYPE_LONGHAND,
2079 applies_to_first_letter: true,
2080 initial_values: ["stretch", "stretch stretch"],
2095 invalid_values: ["none", "stretch stretch stretch", "0", "10", "0%", "0px"],
2098 domProp: "borderRadius",
2100 type: CSS_TYPE_TRUE_SHORTHAND,
2101 prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2103 "border-bottom-left-radius",
2104 "border-bottom-right-radius",
2105 "border-top-left-radius",
2106 "border-top-right-radius",
2113 "calc(0px) calc(0pt)",
2114 "calc(0px) calc(0pt) calc(0px) calc(0em)",
2123 "2px 2px 2px 2px", // circular
2127 "3em 2px / 2px 3em",
2128 "2pt 3% 4em / 4pt 1% 5em",
2129 "2px 2px 2px 2px / 4px 4px 4px 4px",
2131 "4pt 5pt / 3pt", // elliptical
2138 "calc(20%) calc(3*25px)",
2140 "calc(3*25px + 50%)",
2141 "2px 2px calc(2px + 1%) 2px",
2142 "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
2150 "2px 2px 2px 2px 2px",
2151 "1px / 2px 2px 2px 2px 2px",
2154 "2px 2px 2px 2px / 2px 2px 2 2px",
2155 "2px calc(0px + rubbish)",
2162 "border-bottom-left-radius": {
2163 domProp: "borderBottomLeftRadius",
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)"],
2176 "2em 2pt", // elliptical
2183 "calc(20%) calc(3*25px)",
2185 "calc(3*25px + 50%)",
2195 "2px calc(0px + rubbish)",
2200 "border-bottom-right-radius": {
2201 domProp: "borderBottomRightRadius",
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)"],
2214 "2em 2pt", // elliptical
2221 "calc(20%) calc(3*25px)",
2223 "calc(3*25px + 50%)",
2233 "2px calc(0px + rubbish)",
2238 "border-top-left-radius": {
2239 domProp: "borderTopLeftRadius",
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)"],
2252 "2em 2pt", // elliptical
2259 "calc(20%) calc(3*25px)",
2261 "calc(3*25px + 50%)",
2271 "2px calc(0px + rubbish)",
2276 "border-top-right-radius": {
2277 domProp: "borderTopRightRadius",
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)"],
2290 "2em 2pt", // elliptical
2297 "calc(20%) calc(3*25px)",
2299 "calc(3*25px + 50%)",
2309 "2px calc(0px + rubbish)",
2314 "border-start-start-radius": {
2315 domProp: "borderStartStartRadius",
2317 type: CSS_TYPE_LONGHAND,
2318 applies_to_first_letter: true,
2320 prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2321 initial_values: ["0", "0px", "calc(-2px)"],
2329 "2em 2pt", // elliptical
2336 "calc(20%) calc(3*25px)",
2338 "calc(3*25px + 50%)",
2348 "2px calc(0px + rubbish)",
2353 "border-start-end-radius": {
2354 domProp: "borderStartEndRadius",
2356 type: CSS_TYPE_LONGHAND,
2357 applies_to_first_letter: true,
2359 prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2360 initial_values: ["0", "0px", "calc(-2px)"],
2368 "2em 2pt", // elliptical
2375 "calc(20%) calc(3*25px)",
2377 "calc(3*25px + 50%)",
2387 "2px calc(0px + rubbish)",
2392 "border-end-start-radius": {
2393 domProp: "borderEndStartRadius",
2395 type: CSS_TYPE_LONGHAND,
2396 applies_to_first_letter: true,
2398 prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2399 initial_values: ["0", "0px", "calc(-2px)"],
2407 "2em 2pt", // elliptical
2414 "calc(20%) calc(3*25px)",
2416 "calc(3*25px + 50%)",
2426 "2px calc(0px + rubbish)",
2431 "border-end-end-radius": {
2432 domProp: "borderEndEndRadius",
2434 type: CSS_TYPE_LONGHAND,
2435 applies_to_first_letter: true,
2437 prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2438 initial_values: ["0", "0px", "calc(-2px)"],
2446 "2em 2pt", // elliptical
2453 "calc(20%) calc(3*25px)",
2455 "calc(3*25px + 50%)",
2465 "2px calc(0px + rubbish)",
2470 "border-inline-start": {
2471 domProp: "borderInlineStart",
2473 type: CSS_TYPE_TRUE_SHORTHAND,
2475 "border-inline-start-color",
2476 "border-inline-start-style",
2477 "border-inline-start-width",
2484 "none medium currentcolor",
2495 invalid_values: ["5%", "5", "5 green solid"],
2497 "border-inline-start-color": {
2498 domProp: "borderInlineStartColor",
2500 type: CSS_TYPE_LONGHAND,
2501 applies_to_first_letter: 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"],
2507 "border-inline-start-style": {
2508 domProp: "borderInlineStartStyle",
2510 type: CSS_TYPE_LONGHAND,
2511 applies_to_first_letter: true,
2513 /* XXX hidden is sometimes the same as initial */
2514 initial_values: ["none"],
2527 "border-inline-start-width": {
2528 domProp: "borderInlineStartWidth",
2530 type: CSS_TYPE_LONGHAND,
2531 applies_to_first_letter: true,
2533 prerequisites: { "border-inline-start-style": "solid" },
2534 initial_values: ["medium", "3px", "calc(4px - 1px)"],
2547 "calc(3*25px + 5em)",
2549 invalid_values: ["5%", "5"],
2552 domProp: "MozBoxAlign",
2554 type: CSS_TYPE_LONGHAND,
2555 initial_values: ["stretch"],
2556 other_values: ["start", "center", "baseline", "end"],
2559 "-moz-box-direction": {
2560 domProp: "MozBoxDirection",
2562 type: CSS_TYPE_LONGHAND,
2563 initial_values: ["normal"],
2564 other_values: ["reverse"],
2568 domProp: "MozBoxFlex",
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"],
2575 "-moz-box-ordinal-group": {
2576 domProp: "MozBoxOrdinalGroup",
2578 type: CSS_TYPE_LONGHAND,
2579 initial_values: ["1"],
2580 other_values: ["2", "100", "0"],
2581 invalid_values: ["1.0", "-1", "-1000"],
2583 "-moz-box-orient": {
2584 domProp: "MozBoxOrient",
2586 type: CSS_TYPE_LONGHAND,
2587 initial_values: ["horizontal", "inline-axis"],
2588 other_values: ["vertical", "block-axis"],
2592 domProp: "MozBoxPack",
2594 type: CSS_TYPE_LONGHAND,
2595 initial_values: ["start"],
2596 other_values: ["center", "end", "justify"],
2599 "box-decoration-break": {
2600 domProp: "boxDecorationBreak",
2602 type: CSS_TYPE_LONGHAND,
2603 initial_values: ["slice"],
2604 other_values: ["clone"],
2605 invalid_values: ["auto", "none", "1px"],
2608 domProp: "boxSizing",
2610 type: CSS_TYPE_LONGHAND,
2611 initial_values: ["content-box"],
2612 other_values: ["border-box"],
2622 "-moz-box-sizing": {
2623 domProp: "MozBoxSizing",
2625 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2626 alias_for: "box-sizing",
2627 subproperties: ["box-sizing"],
2629 "print-color-adjust": {
2630 domProp: "printColorAdjust",
2632 type: CSS_TYPE_LONGHAND,
2633 initial_values: ["economy"],
2634 other_values: ["exact"],
2638 domProp: "colorAdjust",
2640 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2641 alias_for: "print-color-adjust",
2642 subproperties: ["print-color-adjust"],
2645 domProp: "colorScheme",
2647 type: CSS_TYPE_LONGHAND,
2648 initial_values: ["normal"],
2653 "light dark purple",
2657 "only light dark purple",
2660 invalid_values: ["only normal", "normal only", "only light only"],
2665 type: CSS_TYPE_TRUE_SHORTHAND,
2666 subproperties: ["column-count", "column-width"],
2667 initial_values: ["auto", "auto auto"],
2689 "calc(50px + rubbish) 2",
2693 domProp: "columnCount",
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"],
2702 domProp: "columnFill",
2704 type: CSS_TYPE_LONGHAND,
2705 initial_values: ["balance"],
2706 other_values: ["auto"],
2707 invalid_values: ["2px", "dotted", "5em"],
2710 domProp: "columnRule",
2712 type: CSS_TYPE_TRUE_SHORTHAND,
2713 prerequisites: { color: "green" },
2715 "column-rule-width",
2716 "column-rule-style",
2717 "column-rule-color",
2720 "medium none currentColor",
2734 "5px dashed green 3px",
2739 "column-rule-width": {
2740 domProp: "columnRuleWidth",
2742 type: CSS_TYPE_LONGHAND,
2743 prerequisites: { "column-rule-style": "solid" },
2744 initial_values: ["medium", "3px", "calc(3px)", "calc(5em + 3px - 5em)"],
2748 /* valid calc() values */
2755 "calc( 3em + 2px )",
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)",
2787 "calc(50px/(2 - 1))",
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))",
2840 "calc(min(5px,2em))",
2843 "calc(max(5px,2em))",
2845 // Valid cases with unitless zero (which is never
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.
2866 /* invalid calc() values */
2879 "-moz-min(5px,2em)",
2880 "-moz-max(5px,2em)",
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().
2898 "calc(1 * (2em + 0))",
2900 "calc((2em + 0) * 1)",
2901 "calc(1 * (0 + 2em))",
2903 "calc((0 + 2em) * 1)",
2906 "column-rule-style": {
2907 domProp: "columnRuleStyle",
2909 type: CSS_TYPE_LONGHAND,
2910 initial_values: ["none"],
2922 invalid_values: ["20", "foo"],
2924 "column-rule-color": {
2925 domProp: "columnRuleColor",
2927 type: CSS_TYPE_LONGHAND,
2928 prerequisites: { color: "green" },
2929 initial_values: ["currentColor"],
2930 other_values: ["red", "blue", "#ffff00"],
2931 invalid_values: ["ffff00"],
2934 domProp: "columnSpan",
2936 type: CSS_TYPE_LONGHAND,
2937 initial_values: ["none"],
2938 other_values: ["all"],
2939 invalid_values: ["-1", "0", "auto", "2px"],
2942 domProp: "columnWidth",
2944 type: CSS_TYPE_LONGHAND,
2945 initial_values: ["auto"],
2954 invalid_values: ["20", "-1px", "50%"],
2957 domProp: "containerType",
2959 type: CSS_TYPE_LONGHAND,
2960 initial_values: ["normal"],
2961 other_values: ["inline-size", "size"],
2968 "inline-size style inline-size",
2969 "inline-size block-size",
2977 domProp: "containerName",
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"],
2985 domProp: "container",
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"],
2996 type: CSS_TYPE_LONGHAND,
2997 initial_values: ["none"],
2998 other_values: ["path('')", "path(' ')"].concat(pathValues.other_values),
2999 invalid_values: pathValues.invalid_values,
3001 "-moz-float-edge": {
3002 domProp: "MozFloatEdge",
3004 type: CSS_TYPE_LONGHAND,
3005 initial_values: ["content-box"],
3006 other_values: ["margin-box"],
3007 invalid_values: ["content", "padding", "border", "margin"],
3009 "-moz-force-broken-image-icon": {
3010 domProp: "MozForceBrokenImageIcon",
3012 type: CSS_TYPE_LONGHAND,
3013 initial_values: ["0"],
3014 other_values: ["1"],
3018 domProp: "marginInline",
3020 type: CSS_TYPE_TRUE_SHORTHAND,
3021 subproperties: ["margin-inline-start", "margin-inline-end"],
3022 initial_values: ["0", "0px 0em"],
3030 "calc(3*25px) calc(2px)",
3032 "calc(3*25px + 50%) calc(3*25px - 50%)",
3050 "margin-inline-end": {
3051 domProp: "marginInlineEnd",
3053 type: CSS_TYPE_LONGHAND,
3054 applies_to_first_letter: true,
3056 /* no subproperties */
3057 /* auto may or may not be initial */
3076 "calc(3*25px + 50%)",
3094 "margin-inline-start": {
3095 domProp: "marginInlineStart",
3097 type: CSS_TYPE_LONGHAND,
3098 applies_to_first_letter: true,
3100 /* no subproperties */
3101 /* auto may or may not be initial */
3120 "calc(3*25px + 50%)",
3141 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3142 /* FIXME: All mask-border-* should be added when we implement them. */
3164 "0% 0% / auto auto",
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",
3179 "border-box border-box",
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",
3188 "none repeat-y alpha add 0% 0%",
3190 "0% top subtract alpha repeat none",
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",
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",
3229 /* mixes with keywords have to be in correct order */
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",
3244 domProp: "maskClip",
3246 type: CSS_TYPE_LONGHAND,
3247 initial_values: ["border-box"],
3255 "border-box, padding-box",
3256 "padding-box, padding-box, padding-box",
3257 "border-box, border-box",
3259 invalid_values: ["content-box content-box", "margin-box"],
3262 domProp: "maskComposite",
3264 type: CSS_TYPE_LONGHAND,
3265 initial_values: ["add"],
3271 "subtract, intersect",
3272 "subtract, subtract, add",
3274 invalid_values: ["add subtract", "intersect exclude"],
3277 domProp: "maskImage",
3279 type: CSS_TYPE_LONGHAND,
3280 initial_values: ["none"],
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==")',
3286 "none, none, none, none, none",
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),
3296 domProp: "maskMode",
3298 type: CSS_TYPE_LONGHAND,
3299 initial_values: ["match-source"],
3303 "match-source, match-source",
3304 "match-source, alpha",
3305 "alpha, luminance, match-source",
3307 invalid_values: ["match-source match-source", "alpha match-source"],
3310 domProp: "maskOrigin",
3312 type: CSS_TYPE_LONGHAND,
3313 initial_values: ["border-box"],
3320 "border-box, padding-box",
3321 "padding-box, padding-box, padding-box",
3322 "border-box, border-box",
3324 invalid_values: ["padding-box padding-box", "no-clip", "margin-box"],
3327 domProp: "maskPosition",
3329 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3355 "top left, top left",
3356 "top left, top right",
3357 "top right, top left",
3359 "10% 20%, 30%, 40%",
3360 "top left, bottom right",
3361 "right bottom, left top",
3365 "0%, 10%, 20%, 30%",
3366 "top, top, top, top, top",
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%)",
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",
3394 subproperties: ["mask-position-x", "mask-position-y"],
3396 "center 10px center 4px",
3397 "center 10px center",
3407 "top 20px bottom 20px",
3409 "0px calc(0px + rubbish)",
3414 "mask-position-x": {
3415 domProp: "maskPositionX",
3417 type: CSS_TYPE_LONGHAND,
3418 initial_values: ["left", "0%"],
3430 "50%, 10%, 20%, 30%",
3431 "center, center, center, center, center",
3461 "top, top, top, top, top",
3462 "calc(0px + rubbish)",
3466 "mask-position-y": {
3467 domProp: "maskPositionY",
3469 type: CSS_TYPE_LONGHAND,
3470 initial_values: ["top", "0%"],
3482 "50%, 10%, 20%, 30%",
3483 "center, center, center, center, center",
3513 "left, left, left, left, left",
3514 "calc(0px + rubbish)",
3519 domProp: "maskRepeat",
3521 type: CSS_TYPE_LONGHAND,
3522 initial_values: ["repeat", "repeat repeat"],
3527 "repeat-x, repeat-x",
3528 "repeat, no-repeat",
3529 "repeat-y, no-repeat, repeat-y",
3530 "repeat, repeat, repeat",
3533 "no-repeat no-repeat",
3535 "no-repeat no-repeat, no-repeat no-repeat",
3538 "repeat repeat repeat",
3539 "repeat-x repeat-y",
3547 domProp: "maskSize",
3549 type: CSS_TYPE_LONGHAND,
3550 initial_values: ["auto", "auto auto"],
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%)",
3583 "10px calc(10px + rubbish)",
3587 domProp: "maskType",
3589 type: CSS_TYPE_LONGHAND,
3590 initial_values: ["luminance"],
3591 other_values: ["alpha"],
3594 "padding-inline-end": {
3595 domProp: "paddingInlineEnd",
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.
3601 /* no subproperties */
3621 "calc(3*25px + 50%)",
3623 invalid_values: ["5"],
3625 "padding-inline-start": {
3626 domProp: "paddingInlineStart",
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.
3632 /* no subproperties */
3652 "calc(3*25px + 50%)",
3654 invalid_values: ["5"],
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"],
3669 type: CSS_TYPE_LONGHAND,
3670 initial_values: ["8"],
3693 "-moz-text-size-adjust": {
3694 domProp: "MozTextSizeAdjust",
3696 type: CSS_TYPE_LONGHAND,
3697 initial_values: ["auto"],
3698 other_values: ["none"],
3699 invalid_values: ["-5%", "0", "100", "0%", "50%", "100%", "220.3%"],
3702 domProp: "transform",
3704 type: CSS_TYPE_LONGHAND,
3705 prerequisites: { width: "300px", height: "50px" },
3706 initial_values: ["none"],
3712 "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
3715 "translate(10px, -3px)",
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)",
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%)",
3771 "translatez(2px) translatez(5px)",
3772 "translate3d(3px, 4px, 5px)",
3773 "translate3d(2em, 3px, 1em)",
3774 "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
3776 "scale3d(4%, 4%, 4%)",
3777 "scale3d(-2, 3, -7)",
3778 "scale3d(-2%, 3%, -7%)",
3783 "rotate3d(2, 3, 4, 45deg)",
3784 "rotate3d(-3, 7, 0, 12rad)",
3788 "rotatex(0.125turn)",
3789 "rotate3d(0, 0, 0, 0rad)",
3791 "perspective(1000px)",
3792 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
3802 "translate(-3, -4)",
3803 "translatex(1px 1px)",
3804 "translatex(translatex(1px))",
3805 "translatex(#0000ff)",
3808 "matrix(1px, 2px, 3px, 4px, 5px, 6px)",
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)",
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)",
3836 domProp: "transformBox",
3838 type: CSS_TYPE_LONGHAND,
3839 initial_values: ["view-box"],
3840 other_values: ["fill-box", "border-box"],
3841 invalid_values: ["padding-box", "margin-box"],
3843 "transform-origin": {
3844 domProp: "transformOrigin",
3846 type: CSS_TYPE_LONGHAND,
3847 /* no subproperties */
3848 prerequisites: { width: "10px", height: "10px", display: "block" },
3849 initial_values: ["50% 50%", "center", "center center"],
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%)",
3895 "0px calc(0px + rubbish)",
3896 "0px 0px calc(0px + rubbish)",
3899 "perspective-origin": {
3900 domProp: "perspectiveOrigin",
3902 type: CSS_TYPE_LONGHAND,
3903 /* no subproperties */
3904 prerequisites: { width: "10px", height: "10px", display: "block" },
3905 initial_values: ["50% 50%", "center", "center center"],
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%)",
3952 domProp: "perspective",
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"],
3959 "backface-visibility": {
3960 domProp: "backfaceVisibility",
3962 type: CSS_TYPE_LONGHAND,
3963 initial_values: ["visible"],
3964 other_values: ["hidden"],
3965 invalid_values: ["collapse"],
3967 "transform-style": {
3968 domProp: "transformStyle",
3970 type: CSS_TYPE_LONGHAND,
3971 initial_values: ["flat"],
3972 other_values: ["preserve-3d"],
3975 "-moz-user-input": {
3976 domProp: "MozUserInput",
3978 type: CSS_TYPE_LONGHAND,
3979 initial_values: ["auto"],
3980 other_values: ["none"],
3983 "-moz-user-select": {
3984 domProp: "MozUserSelect",
3986 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3987 alias_for: "user-select",
3988 subproperties: ["user-select"],
3991 domProp: "userSelect",
3993 type: CSS_TYPE_LONGHAND,
3994 initial_values: ["auto"],
3995 other_values: ["none", "text", "all", "-moz-none"],
3999 domProp: "background",
4001 type: CSS_TYPE_TRUE_SHORTHAND,
4003 "background-attachment",
4006 "background-position-x",
4007 "background-position-y",
4008 "background-repeat",
4010 "background-origin",
4024 "0% 0% / auto auto",
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",
4041 /* without multiple backgrounds */
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",
4049 "none repeat-y transparent scroll 0% 0%",
4051 "0% top transparent fixed repeat none",
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",
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",
4099 /* mixes with keywords have to be in correct order */
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",
4126 "background-attachment": {
4127 domProp: "backgroundAttachment",
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"],
4140 "scroll, fixed, local, scroll",
4145 "background-blend-mode": {
4146 domProp: "backgroundBlendMode",
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"],
4171 invalid_values: ["none", "10px", "multiply multiply", "plus-lighter"],
4173 "background-clip": {
4175 * When we rename this to 'background-clip', we also
4176 * need to rename the values to match the spec.
4178 domProp: "backgroundClip",
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"],
4189 "border-box, padding-box",
4190 "padding-box, padding-box, padding-box",
4191 "border-box, border-box",
4193 "content-box, text",
4199 "border-box border-box",
4206 "background-color": {
4207 domProp: "backgroundColor",
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)"],
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)",
4236 "rgb(100, 100%, 100)",
4238 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4240 "background-image": {
4241 domProp: "backgroundImage",
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"],
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==")',
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),
4262 "background-origin": {
4263 domProp: "backgroundOrigin",
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"],
4274 "border-box, padding-box",
4275 "padding-box, padding-box, padding-box",
4276 "border-box, border-box",
4280 "padding-box padding-box",
4287 "background-position": {
4288 domProp: "backgroundPosition",
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,
4321 "top left, top left",
4322 "top left, top right",
4323 "top right, top left",
4325 "10% 20%, 30%, 40%",
4326 "top left, bottom right",
4327 "right bottom, left top",
4331 "0%, 10%, 20%, 30%",
4332 "top, top, top, top, top",
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%)",
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",
4362 subproperties: ["background-position-x", "background-position-y"],
4364 "center 10px center 4px",
4365 "center 10px center",
4375 "top 20px bottom 20px",
4377 "0px calc(0px + rubbish)",
4380 "20 20": "20px 20px",
4381 "10 5px": "10px 5px",
4385 "background-position-x": {
4386 domProp: "backgroundPositionX",
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%"],
4405 "0%, 10%, 20%, 30%",
4406 "left, left, left, left, left",
4436 "top, top, top, top, top",
4437 "calc(0px + rubbish)",
4440 "background-position-y": {
4441 domProp: "backgroundPositionY",
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%"],
4460 "0%, 10%, 20%, 30%",
4461 "top, top, top, top, top",
4491 "left, left, left, left, left",
4492 "calc(0px + rubbish)",
4495 "background-repeat": {
4496 domProp: "backgroundRepeat",
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"],
4508 "repeat-x, repeat-x",
4509 "repeat, no-repeat",
4510 "repeat-y, no-repeat, repeat-y",
4511 "repeat, repeat, repeat",
4514 "no-repeat no-repeat",
4515 "repeat repeat, repeat repeat",
4517 "round repeat, repeat-x",
4518 "round no-repeat, repeat-y",
4521 "space repeat, repeat-x",
4522 "space no-repeat, repeat-y",
4527 "repeat repeat repeat",
4528 "repeat-x repeat-y",
4533 "round round round",
4538 "space space space",
4545 "background-size": {
4546 domProp: "backgroundSize",
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"],
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%)",
4586 "10px calc(10px + rubbish)",
4592 type: CSS_TYPE_TRUE_SHORTHAND,
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",
4606 "border-image-source",
4607 "border-image-slice",
4608 "border-image-width",
4609 "border-image-outset",
4610 "border-image-repeat",
4617 "none medium currentcolor",
4618 "calc(4px - 1px) none",
4626 "calc(2px) solid blue",
4628 invalid_values: ["5%", "medium solid ff00ff", "5 solid green"],
4631 domProp: "borderBottom",
4633 type: CSS_TYPE_TRUE_SHORTHAND,
4635 "border-bottom-color",
4636 "border-bottom-style",
4637 "border-bottom-width",
4644 "none medium currentcolor",
4655 invalid_values: ["5%", "5", "5 solid green"],
4657 "border-bottom-color": {
4658 domProp: "borderBottomColor",
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" },
4668 "border-bottom-style": {
4669 domProp: "borderBottomStyle",
4671 type: CSS_TYPE_LONGHAND,
4672 applies_to_first_letter: true,
4673 /* XXX hidden is sometimes the same as initial */
4674 initial_values: ["none"],
4687 "border-bottom-width": {
4688 domProp: "borderBottomWidth",
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)"],
4706 "calc(3*25px + 5em)",
4708 invalid_values: ["5%"],
4709 quirks_values: { 5: "5px" },
4711 "border-collapse": {
4712 domProp: "borderCollapse",
4714 type: CSS_TYPE_LONGHAND,
4715 initial_values: ["separate"],
4716 other_values: ["collapse"],
4720 domProp: "borderColor",
4722 type: CSS_TYPE_TRUE_SHORTHAND,
4725 "border-right-color",
4726 "border-bottom-color",
4727 "border-left-color",
4731 "currentColor currentColor",
4732 "currentColor currentColor currentColor",
4733 "currentColor currentColor currentcolor CURRENTcolor",
4737 "currentColor green",
4738 "currentColor currentColor green",
4739 "currentColor currentColor currentColor green",
4740 "rgba(255,128,0,0.5)",
4749 "red rgb(nonsense)",
4752 unbalanced_values: ["red rgb("],
4753 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4756 domProp: "borderLeft",
4758 type: CSS_TYPE_TRUE_SHORTHAND,
4760 "border-left-color",
4761 "border-left-style",
4762 "border-left-width",
4769 "none medium currentcolor",
4784 "calc(5px + rubbish) green solid",
4785 "5px rgb(0, rubbish, 0) solid",
4788 "border-left-color": {
4789 domProp: "borderLeftColor",
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" },
4799 "border-left-style": {
4800 domProp: "borderLeftStyle",
4802 type: CSS_TYPE_LONGHAND,
4803 applies_to_first_letter: true,
4804 /* XXX hidden is sometimes the same as initial */
4805 initial_values: ["none"],
4818 "border-left-width": {
4819 domProp: "borderLeftWidth",
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)"],
4837 "calc(3*25px + 5em)",
4839 invalid_values: ["5%"],
4840 quirks_values: { 5: "5px" },
4843 domProp: "borderRight",
4845 type: CSS_TYPE_TRUE_SHORTHAND,
4847 "border-right-color",
4848 "border-right-style",
4849 "border-right-width",
4856 "none medium currentcolor",
4867 invalid_values: ["5%", "5", "5 solid green"],
4869 "border-right-color": {
4870 domProp: "borderRightColor",
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" },
4880 "border-right-style": {
4881 domProp: "borderRightStyle",
4883 type: CSS_TYPE_LONGHAND,
4884 applies_to_first_letter: true,
4885 /* XXX hidden is sometimes the same as initial */
4886 initial_values: ["none"],
4899 "border-right-width": {
4900 domProp: "borderRightWidth",
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)"],
4918 "calc(3*25px + 5em)",
4920 invalid_values: ["5%"],
4921 quirks_values: { 5: "5px" },
4924 domProp: "borderSpacing",
4926 type: CSS_TYPE_LONGHAND,
4933 "calc(0px) calc(0em)",
4934 "calc(2em - 2em) calc(3px + 7px - 10px)",
4936 "calc(-5px) calc(-5px)",
4946 "calc(0px) calc(7px)",
4947 "calc(7px) calc(0px)",
4960 "0 calc(0px + rubbish)",
4969 domProp: "borderStyle",
4971 type: CSS_TYPE_TRUE_SHORTHAND,
4974 "border-right-style",
4975 "border-bottom-style",
4976 "border-left-style",
4978 /* XXX hidden is sometimes the same as initial */
4983 "none none none none",
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",
5005 domProp: "borderTop",
5007 type: CSS_TYPE_TRUE_SHORTHAND,
5008 subproperties: ["border-top-color", "border-top-style", "border-top-width"],
5014 "none medium currentcolor",
5025 invalid_values: ["5%", "5", "5 solid green"],
5027 "border-top-color": {
5028 domProp: "borderTopColor",
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" },
5038 "border-top-style": {
5039 domProp: "borderTopStyle",
5041 type: CSS_TYPE_LONGHAND,
5042 applies_to_first_letter: true,
5043 /* XXX hidden is sometimes the same as initial */
5044 initial_values: ["none"],
5057 "border-top-width": {
5058 domProp: "borderTopWidth",
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)"],
5076 "calc(3*25px + 5em)",
5078 invalid_values: ["5%"],
5079 quirks_values: { 5: "5px" },
5082 domProp: "borderWidth",
5084 type: CSS_TYPE_TRUE_SHORTHAND,
5087 "border-right-width",
5088 "border-bottom-width",
5089 "border-left-width",
5091 prerequisites: { "border-style": "solid" },
5096 "3px medium medium",
5097 "medium 3px medium medium",
5098 "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)",
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" },
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"],
5122 "calc(3*25px + 50%)",
5125 quirks_values: { 5: "5px" },
5128 domProp: "boxShadow",
5130 type: CSS_TYPE_LONGHAND,
5131 applies_to_first_letter: true,
5132 initial_values: ["none"],
5133 prerequisites: { color: "blue" },
5139 "2px 2px 1px 5px green",
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",
5146 "inset 2px 2px 3px 4px black",
5147 "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px",
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)",
5157 "calc(2px) calc(2px)",
5158 "calc(2px) calc(2px) calc(2px)",
5159 "calc(2px) calc(2px) calc(2px) calc(2px)",
5163 "1px 1px 1px 1px 1px",
5169 "inset 4px 4px black inset",
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)",
5187 domProp: "captionSide",
5189 type: CSS_TYPE_LONGHAND,
5190 initial_values: ["top"],
5191 other_values: ["bottom"],
5192 invalid_values: ["right", "left", "top-outside", "bottom-outside"],
5195 domProp: "caretColor",
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"],
5209 type: CSS_TYPE_LONGHAND,
5210 initial_values: ["none"],
5211 other_values: ["left", "right", "both", "inline-start", "inline-end"],
5217 type: CSS_TYPE_LONGHAND,
5218 initial_values: ["auto"],
5221 "rect(auto,auto,auto,auto)",
5222 "rect(3px, 4px, 4em, 0)",
5223 "rect(auto, 3em, 4pt, 2px)",
5224 "rect(2px 3px 4px 5px)",
5226 invalid_values: ["rect(auto, 3em, 2%, 5px)"],
5227 quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" },
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 */
5244 "-moz-default-color",
5248 /* rgb() and rgba() are aliases of each other. */
5253 /* hsl() and hsla() are aliases of each other. */
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. */
5269 "rgb(0/* comment */0/* comment */0)",
5270 "rgb(0/* comment */0/* comment*/0/1.0)",
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 */
5285 /* Preserve previously available specially prefixed colors */
5286 "-moz-default-color",
5292 "rgba(45,300,12,2)",
5295 "rgba(255,128,0,0.5)",
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 */
5319 /* Preserve previously available specially prefixed colors */
5320 "-moz-activehyperlinktext",
5321 "-moz-default-background-color",
5322 "-moz-hyperlinktext",
5323 "-moz-visitedhyperlinktext",
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)",
5338 "rgb(100%, 0, 100%)",
5339 "rgba(100, 0, 100%, 30%)",
5341 "hsla(0%, 0%, 0%, 0.1)",
5342 /* trailing commas */
5344 "rgba(0, 0, 0, 0,)",
5346 "hsla(0, 0%, 0%, 1,)",
5348 /* comma and comma-less expressions should not mix together. */
5353 "hsl(0, 0%, 0% / 1)",
5356 "hsl(0 0%, 0% / 1)",
5357 /* trailing slash */
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)",
5369 "000000": "#000000",
5370 "96ed2a": "#96ed2a",
5378 type: CSS_TYPE_LONGHAND,
5379 applies_to_marker: true,
5380 // XXX This really depends on pseudo-element-ness.
5381 initial_values: ["normal", "none"],
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==")',
5390 "counter(bar, upper-roman)",
5391 'counters(foo, ".")',
5392 "counters(bar, '-', lower-greek)",
5393 "'-' counter(foo) '.'",
5399 "close-quote attr(title) counters(foo, '.', upper-alpha)",
5404 'attr(title, "fallback")',
5405 'attr(\\32, "fallback")',
5406 'attr(-\\32, "fallback")',
5408 "counters(\\32, '.')",
5409 "counter(-\\32, upper-roman)",
5410 "counters(-\\2, '-', lower-greek)",
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),
5421 "counter(foo, none)",
5422 "counters(bar, '.', none)",
5424 'counter(foo, ".")',
5430 "counters(-2, '.')",
5432 "-moz-alt-content 'foo'",
5433 "'foo' -moz-alt-content",
5434 "counter(one, two, three) 'foo'",
5435 ].concat(invalidNonUrlImageValues),
5437 "counter-increment": {
5438 domProp: "counterIncrement",
5440 type: CSS_TYPE_LONGHAND,
5441 initial_values: ["none"],
5458 invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5459 unbalanced_values: ["foo 1 ("],
5462 domProp: "counterReset",
5464 type: CSS_TYPE_LONGHAND,
5465 initial_values: ["none"],
5482 invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5485 domProp: "counterSet",
5487 type: CSS_TYPE_LONGHAND,
5488 initial_values: ["none"],
5505 invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5510 type: CSS_TYPE_LONGHAND,
5511 initial_values: ["auto"],
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",
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",
5569 domProp: "direction",
5571 type: CSS_TYPE_LONGHAND,
5572 applies_to_marker: true,
5573 initial_values: ["ltr"],
5574 other_values: ["rtl"],
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" },
5591 "inline flow-root list-item",
5596 "table-header-group",
5597 "table-footer-group",
5599 "table-column-group",
5606 "ruby-base-container",
5608 "ruby-text-container",
5615 domProp: "emptyCells",
5617 type: CSS_TYPE_LONGHAND,
5618 initial_values: ["show"],
5619 other_values: ["hide"],
5623 domProp: "cssFloat",
5625 type: CSS_TYPE_LONGHAND,
5626 applies_to_first_letter: true,
5627 initial_values: ["none"],
5628 other_values: ["left", "right", "inline-start", "inline-end"],
5634 type: CSS_TYPE_TRUE_SHORTHAND,
5635 prerequisites: { "writing-mode": "initial" },
5645 "font-feature-settings",
5646 "font-language-override",
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",
5656 gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif",
5661 "condensed bold italic small-caps 24px/1.4 Times New Roman, serif",
5662 "small inherit roman",
5663 "small roman inherit",
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",
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",
5688 domProp: "fontFamily",
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"],
5698 gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif",
5699 "Times New Roman, serif",
5700 "'Times New Roman', serif",
5703 '\\"Times New Roman',
5704 '"Times New Roman"',
5705 'Times, \\"Times New Roman',
5706 'Times, "Times New Roman"',
5707 "-no-such-font-installed",
5710 "Times, inherit roman",
5711 "inherit roman, Times",
5712 "roman inherit, Times",
5713 "Times, roman inherit",
5716 '"Times New" Roman',
5717 '"Times New Roman\n',
5718 'Times, "Times New Roman\n',
5721 "font-feature-settings": {
5722 domProp: "fontFeatureSettings",
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"],
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"',
5763 '"liga" , 0 "smcp"',
5768 domProp: "fontKerning",
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"],
5780 "font-language-override": {
5781 domProp: "fontLanguageOverride",
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"],
5794 domProp: "fontSize",
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,
5806 "calc(0.75rem + 200% - 125% + 0.25rem - 75%)",
5821 "calc(36pt + 75% + (30% + 2em + 2px))",
5826 invalid_values: ["-2em", "-50%", "-1px"],
5827 quirks_values: { 5: "5px" },
5829 "font-size-adjust": {
5830 domProp: "fontSizeAdjust",
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"],
5849 "ch-width from-font",
5865 domProp: "fontStretch",
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"],
5884 invalid_values: ["narrower", "wider"],
5887 domProp: "fontStyle",
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"],
5900 domProp: "fontSynthesis",
5902 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
5904 "font-synthesis-weight",
5905 "font-synthesis-style",
5906 "font-synthesis-small-caps",
5907 "font-synthesis-position",
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,
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",
5930 "weight small-caps",
5931 "small-caps weight",
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",
5957 "small-caps small-caps",
5959 "position position",
5962 "font-synthesis-weight": {
5963 domProp: "fontSynthesisWeight",
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"],
5975 "font-synthesis-style": {
5976 domProp: "fontSynthesisStyle",
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"],
5988 "font-synthesis-small-caps": {
5989 domProp: "fontSynthesisSmallCaps",
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"],
6001 "font-synthesis-position": {
6002 domProp: "fontSynthesisPosition",
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"],
6015 domProp: "fontVariant",
6017 type: CSS_TYPE_TRUE_SHORTHAND,
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",
6026 initial_values: ["normal"],
6030 "traditional oldstyle-nums",
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)",
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)",
6054 "font-variant-alternates": {
6055 domProp: "fontVariantAlternates",
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"],
6066 "styleset(alt-a, alt-b)",
6067 "character-variant(a, b, c)",
6068 "annotation(circled)",
6070 "styleset(complex\\ blob, a)",
6071 "annotation(\\62 lah)",
6074 "historical-forms normal",
6075 "historical-forms historical-forms",
6080 "styleset(1234blah)",
6081 "annotation(a), annotation(b)",
6082 "annotation(a) normal",
6085 "font-variant-caps": {
6086 domProp: "fontVariantCaps",
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"],
6104 "normal small-caps",
6105 "petite-caps normal",
6109 "font-variant-east-asian": {
6110 domProp: "fontVariantEastAsian",
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"],
6127 "proportional-width",
6130 "jis78 full-width ruby",
6131 "simplified proportional-width",
6137 "simplified traditional",
6138 "full-width proportional-width",
6139 "ruby simplified ruby",
6140 "jis78 ruby simplified",
6143 "font-variant-ligatures": {
6144 domProp: "fontVariantLigatures",
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"],
6156 "no-common-ligatures",
6157 "discretionary-ligatures",
6158 "no-discretionary-ligatures",
6159 "historical-ligatures",
6160 "no-historical-ligatures",
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",
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",
6182 "font-variant-numeric": {
6183 domProp: "fontVariantNumeric",
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"],
6195 "proportional-nums",
6197 "diagonal-fractions",
6198 "stacked-fractions",
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",
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",
6217 "font-variant-position": {
6218 domProp: "fontVariantPosition",
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"],
6231 domProp: "fontWeight",
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"],
6263 invalid_values: ["0", "1001", "calc(10%)"],
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" },
6285 "-webkit-fill-available",
6290 "calc(3*25px + 50%)",
6291 "fit-content(100px)",
6293 "fit-content(calc(3*25px + 50%))",
6295 invalid_values: ["none"],
6296 quirks_values: { 5: "5px" },
6301 type: CSS_TYPE_LONGHAND,
6302 initial_values: ["auto"],
6303 other_values: ["normal", "disabled", "active", "inactive"],
6304 invalid_values: ["none", "enabled", "1px"],
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"],
6323 "calc(3*25px + 50%)",
6326 quirks_values: { 5: "5px" },
6329 domProp: "letterSpacing",
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)"],
6347 quirks_values: { 5: "5px" },
6350 domProp: "lineBreak",
6352 type: CSS_TYPE_LONGHAND,
6353 initial_values: ["auto"],
6354 other_values: ["loose", "normal", "strict", "anywhere"],
6358 domProp: "lineHeight",
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,
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'.
6374 "font-size": "19px",
6375 "font-size-adjust": "none",
6376 "font-family": "serif",
6377 "font-weight": "normal",
6378 "font-style": "normal",
6381 "writing-mode": "initial",
6384 initial_values: ["normal"],
6394 "calc(3*25px + 50%)",
6397 invalid_values: ["calc(1 + 2px)", "calc(100% + 0.1)"],
6400 domProp: "listStyle",
6402 type: CSS_TYPE_TRUE_SHORTHAND,
6405 "list-style-position",
6415 "none disc outside",
6416 "none outside disc",
6417 "disc none outside",
6418 "disc outside none",
6419 "outside none disc",
6420 "outside disc none",
6429 "outside none none",
6430 "none outside none",
6431 "none none outside",
6437 "\\32 style inside",
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',
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)",
6475 "list-style-image": {
6476 domProp: "listStyleImage",
6478 type: CSS_TYPE_LONGHAND,
6479 initial_values: ["none"],
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
6494 unbalanced_values: [].concat(unbalancedGradientAndElementValues),
6496 "list-style-position": {
6497 domProp: "listStylePosition",
6499 type: CSS_TYPE_LONGHAND,
6500 initial_values: ["outside"],
6501 other_values: ["inside"],
6504 "list-style-type": {
6505 domProp: "listStyleType",
6507 type: CSS_TYPE_LONGHAND,
6508 initial_values: ["disc"],
6513 "disclosure-closed",
6516 "decimal-leading-zero",
6533 "japanese-informal",
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",
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",
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",
6580 'symbols("*" "\\2020" "\\2021" "\\A7")',
6581 "symbols(cyclic '*' '\\2020' '\\2021' '\\A7')",
6588 type: CSS_TYPE_TRUE_SHORTHAND,
6595 initial_values: ["0", "0px 0 0em", "0% 0px 0em 0pt"],
6600 "1em calc(2em + 3px) 4ex 5cm",
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" },
6607 domProp: "marginBottom",
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)"],
6622 "calc(3*25px + 50%)",
6625 quirks_values: { 5: "5px" },
6628 domProp: "marginLeft",
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)"],
6654 "calc(3*25px + 50%)",
6670 quirks_values: { 5: "5px" },
6673 domProp: "marginRight",
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)"],
6688 "calc(3*25px + 50%)",
6691 quirks_values: { 5: "5px" },
6694 domProp: "marginTop",
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)"],
6709 "calc(3*25px + 50%)",
6712 quirks_values: { 5: "5px" },
6715 domProp: "maxHeight",
6717 type: CSS_TYPE_LONGHAND,
6718 prerequisites: { display: "block" },
6719 initial_values: ["none"],
6732 "-webkit-fill-available",
6739 "calc(3*25px + 50%)",
6740 "fit-content(100px)",
6742 "fit-content(calc(3*25px + 50%))",
6744 invalid_values: ["auto"],
6745 quirks_values: { 5: "5px" },
6748 domProp: "maxWidth",
6750 type: CSS_TYPE_LONGHAND,
6751 prerequisites: { display: "block" },
6752 initial_values: ["none"],
6765 "-webkit-fill-available",
6772 "calc(3*25px + 50%)",
6773 "fit-content(100px)",
6775 "fit-content(calc(3*25px + 50%))",
6777 invalid_values: ["auto"],
6778 quirks_values: { 5: "5px" },
6781 domProp: "minHeight",
6783 type: CSS_TYPE_LONGHAND,
6784 prerequisites: { display: "block" },
6785 initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
6797 "-webkit-fill-available",
6803 "calc(3*25px + 50%)",
6804 "fit-content(100px)",
6806 "fit-content(calc(3*25px + 50%))",
6808 invalid_values: ["none"],
6809 quirks_values: { 5: "5px" },
6812 domProp: "minWidth",
6814 type: CSS_TYPE_LONGHAND,
6815 prerequisites: { display: "block" },
6816 initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
6828 "-webkit-fill-available",
6834 "calc(3*25px + 50%)",
6835 "fit-content(100px)",
6837 "fit-content(calc(3*25px + 50%))",
6839 invalid_values: ["none"],
6840 quirks_values: { 5: "5px" },
6843 domProp: "objectFit",
6845 type: CSS_TYPE_LONGHAND,
6846 initial_values: ["fill"],
6847 other_values: ["contain", "cover", "none", "scale-down"],
6848 invalid_values: ["auto", "5px", "100%"],
6850 "object-position": {
6851 domProp: "objectPosition",
6853 type: CSS_TYPE_LONGHAND,
6854 initial_values: ["50% 50%", "50%", "center", "center center"],
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%)",
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",
6884 "center 10px center 4px",
6885 "center 10px center",
6895 "top 20px bottom 20px",
6905 type: CSS_TYPE_TRUE_SHORTHAND,
6913 initial_values: ["none"],
6915 "none 30deg reverse",
6916 "none 50px reverse 30deg",
6917 "none calc(10px + 20%) auto",
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)",
6935 "100px 0deg path('m 0 0 h 100')",
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') /",
6950 domProp: "offsetAnchor",
6952 type: CSS_TYPE_LONGHAND,
6953 initial_values: ["auto"],
6957 "calc(20% + 10px) center",
6960 "left -10px top -20%",
6961 "right 10% bottom 20em",
6963 invalid_values: ["none", "10deg", "left 10% top"],
6965 "offset-distance": {
6966 domProp: "offsetDistance",
6968 type: CSS_TYPE_LONGHAND,
6969 initial_values: ["0"],
6970 other_values: ["10px", "10%", "190%", "-280%", "calc(30px + 40%)"],
6971 invalid_values: ["none", "45deg"],
6974 domProp: "offsetPath",
6976 type: CSS_TYPE_LONGHAND,
6977 initial_values: ["none"],
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)",
6990 .concat(pathValues.other_values)
6991 .concat(basicShapeOtherValues)
6992 .concat(basicShapeXywhRectValues)
6993 .concat(basicShapeShapeValues),
6996 "ray(closest-side)",
6997 "ray(0deg, closest-side)",
6998 "ray(contain 0deg closest-side contain)",
6999 ].concat(pathValues.invalid_values),
7001 "offset-position": {
7002 domProp: "offsetPosition",
7004 type: CSS_TYPE_LONGHAND,
7005 initial_values: ["normal"],
7010 "calc(20% + 10px) center",
7013 "left -10px top -20%",
7014 "right 10% bottom 20em",
7016 invalid_values: ["none", "10deg", "left 10% top"],
7019 domProp: "offsetRotate",
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"],
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,
7045 other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"],
7046 invalid_values: ["0px", "1px"],
7049 domProp: "MozOrient",
7051 type: CSS_TYPE_LONGHAND,
7052 initial_values: ["inline"],
7053 other_values: ["horizontal", "vertical", "block"],
7054 invalid_values: ["none"],
7059 type: CSS_TYPE_TRUE_SHORTHAND,
7060 subproperties: ["outline-color", "outline-style", "outline-width"],
7065 // XXX Should be invert, but currently currentcolor.
7066 //"invert", "none medium invert"
7068 "none medium currentcolor",
7077 invalid_values: ["5%", "5", "5 solid green"],
7080 domProp: "outlineColor",
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"],
7098 domProp: "outlineOffset",
7100 type: CSS_TYPE_LONGHAND,
7106 "calc(3em + 2px - 2px - 3em)",
7113 "calc(7pt + 3 * 2em)",
7116 invalid_values: ["5%"],
7119 domProp: "outlineStyle",
7121 type: CSS_TYPE_LONGHAND,
7122 applies_to_cue: true,
7123 // XXX Should 'hidden' be the same as initial?
7124 initial_values: ["none"],
7139 domProp: "outlineWidth",
7141 type: CSS_TYPE_LONGHAND,
7142 applies_to_cue: true,
7143 prerequisites: { "outline-style": "solid" },
7144 initial_values: ["medium", "3px", "calc(4px - 1px)"],
7157 "calc(3*25px + 5em)",
7159 invalid_values: ["5%", "5"],
7162 domProp: "overflow",
7164 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
7165 prerequisites: { display: "block", contain: "none" },
7166 subproperties: ["overflow-x", "overflow-y"],
7167 initial_values: ["visible"],
7182 "clip -moz-scrollbars-none",
7183 "-moz-scrollbars-none",
7184 "-moz-scrollbars-horizontal",
7185 "-moz-scrollbars-vertical",
7189 domProp: "overflowX",
7191 type: CSS_TYPE_LONGHAND,
7192 // No applies_to_placeholder because we have a !important rule in forms.css.
7195 "overflow-y": "visible",
7198 initial_values: ["visible"],
7199 other_values: ["auto", "scroll", "hidden", "clip", "overlay"],
7203 domProp: "overflowY",
7205 type: CSS_TYPE_LONGHAND,
7206 // No applies_to_placeholder because we have a !important rule in forms.css.
7209 "overflow-x": "visible",
7212 initial_values: ["visible"],
7213 other_values: ["auto", "scroll", "hidden", "clip", "overlay"],
7216 "overflow-inline": {
7217 domProp: "overflowInline",
7219 type: CSS_TYPE_LONGHAND,
7221 // No applies_to_placeholder because we have a !important rule in forms.css.
7224 "overflow-block": "visible",
7227 initial_values: ["visible"],
7228 other_values: ["auto", "scroll", "hidden", "clip"],
7232 domProp: "overflowBlock",
7234 type: CSS_TYPE_LONGHAND,
7236 // No applies_to_placeholder because we have a !important rule in forms.css.
7239 "overflow-inline": "visible",
7242 initial_values: ["visible"],
7243 other_values: ["auto", "scroll", "hidden", "clip"],
7246 "overflow-clip-margin": {
7247 domProp: "overflowClipMargin",
7249 type: CSS_TYPE_LONGHAND,
7250 initial_values: ["0px"],
7251 other_values: ["1px", "2em", "calc(10px + 1vh)"],
7252 invalid_values: ["-10px"],
7257 type: CSS_TYPE_TRUE_SHORTHAND,
7268 "calc(0px) calc(0em) calc(-2px) calc(-1%)",
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" },
7276 domProp: "paddingBlock",
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("],
7286 domProp: "paddingInline",
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("],
7296 domProp: "paddingBottom",
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.
7318 "calc(3*25px + 50%)",
7321 quirks_values: { 5: "5px" },
7324 domProp: "paddingLeft",
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.
7346 "calc(3*25px + 50%)",
7349 quirks_values: { 5: "5px" },
7352 domProp: "paddingRight",
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.
7374 "calc(3*25px + 50%)",
7377 quirks_values: { 5: "5px" },
7380 domProp: "paddingTop",
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.
7402 "calc(3*25px + 50%)",
7405 quirks_values: { 5: "5px" },
7407 "page-break-after": {
7408 domProp: "pageBreakAfter",
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"],
7418 invalid_values: ["page", "column"],
7420 "page-break-before": {
7421 domProp: "pageBreakBefore",
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"],
7431 invalid_values: ["page", "column"],
7434 domProp: "breakAfter",
7436 type: CSS_TYPE_LONGHAND,
7437 initial_values: ["auto"],
7438 other_values: ["always", "page", "avoid", "left", "right"],
7442 domProp: "breakBefore",
7444 type: CSS_TYPE_LONGHAND,
7445 initial_values: ["auto"],
7446 other_values: ["always", "page", "avoid", "left", "right"],
7450 domProp: "breakInside",
7452 type: CSS_TYPE_LONGHAND,
7453 initial_values: ["auto"],
7454 other_values: ["avoid", "avoid-page", "avoid-column"],
7455 invalid_values: ["left", "right", "always"],
7457 "page-break-inside": {
7458 domProp: "pageBreakInside",
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"],
7468 domProp: "paintOrder",
7470 type: CSS_TYPE_LONGHAND,
7471 applies_to_first_letter: true,
7472 applies_to_first_line: true,
7473 initial_values: ["normal"],
7477 "fill stroke markers",
7478 "stroke markers fill",
7480 invalid_values: ["fill stroke markers fill", "fill normal"],
7483 domProp: "pointerEvents",
7485 type: CSS_TYPE_LONGHAND,
7486 // No applies_to_placeholder because we have a !important rule in forms.css.
7487 initial_values: ["auto"],
7502 domProp: "position",
7504 type: CSS_TYPE_LONGHAND,
7505 initial_values: ["static"],
7506 other_values: ["relative", "absolute", "fixed", "sticky"],
7512 type: CSS_TYPE_LONGHAND,
7513 initial_values: ["auto"],
7518 '"\u201C" "\u201D" "\u2018" "\u2019"',
7519 '"\\201C" "\\201D" "\\2018" "\\2019"',
7521 invalid_values: ["'\"'", '"" "" ""'],
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"],
7540 "calc(3*25px + 50%)",
7543 quirks_values: { 5: "5px" },
7546 domProp: "rubyAlign",
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"],
7554 domProp: "rubyPosition",
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"],
7569 "alternate alternate",
7575 "scroll-behavior": {
7576 domProp: "scrollBehavior",
7578 type: CSS_TYPE_LONGHAND,
7579 initial_values: ["auto"],
7580 other_values: ["smooth"],
7581 invalid_values: ["none", "1px"],
7583 "scroll-snap-stop": {
7584 domProp: "scrollSnapStop",
7586 type: CSS_TYPE_LONGHAND,
7587 initial_values: ["normal"],
7588 other_values: ["always"],
7589 invalid_values: ["auto", "none", "1px"],
7591 "scroll-snap-type": {
7592 domProp: "scrollSnapType",
7594 type: CSS_TYPE_LONGHAND,
7595 initial_values: ["none"],
7610 "block mandatory inline",
7618 "proximity mandatory",
7621 "scroll-snap-align": {
7622 domProp: "scrollSnapAlign",
7624 type: CSS_TYPE_LONGHAND,
7625 initial_values: ["none"],
7634 invalid_values: ["auto", "start invalid", "start end center"],
7637 domProp: "scrollMargin",
7639 type: CSS_TYPE_TRUE_SHORTHAND,
7641 "scroll-margin-top",
7642 "scroll-margin-right",
7643 "scroll-margin-bottom",
7644 "scroll-margin-left",
7646 initial_values: ["0"],
7654 invalid_values: ["auto", "20%", "-30%", "1px 2px 3px 4px 5px"],
7656 "scroll-margin-top": {
7657 domProp: "scrollMarginTop",
7659 type: CSS_TYPE_LONGHAND,
7660 initial_values: ["0"],
7661 other_values: ["-10px", "calc(2em + 3ex)"],
7662 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7664 "scroll-margin-right": {
7665 domProp: "scrollMarginRight",
7667 type: CSS_TYPE_LONGHAND,
7668 initial_values: ["0"],
7669 other_values: ["-10px", "calc(2em + 3ex)"],
7670 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7672 "scroll-margin-bottom": {
7673 domProp: "scrollMarginBottom",
7675 type: CSS_TYPE_LONGHAND,
7676 initial_values: ["0"],
7677 other_values: ["-10px", "calc(2em + 3ex)"],
7678 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7680 "scroll-margin-left": {
7681 domProp: "scrollMarginLeft",
7683 type: CSS_TYPE_LONGHAND,
7684 initial_values: ["0"],
7685 other_values: ["-10px", "calc(2em + 3ex)"],
7686 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7688 "scroll-margin-inline": {
7689 domProp: "scrollMarginInline",
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"],
7697 "scroll-margin-inline-start": {
7698 domProp: "scrollMarginInlineStart",
7700 type: CSS_TYPE_LONGHAND,
7702 initial_values: ["0"],
7703 other_values: ["-10px", "calc(2em + 3ex)"],
7704 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7706 "scroll-margin-inline-end": {
7707 domProp: "scrollMarginInlineEnd",
7709 type: CSS_TYPE_LONGHAND,
7711 initial_values: ["0"],
7712 other_values: ["-10px", "calc(2em + 3ex)"],
7713 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7715 "scroll-margin-block": {
7716 domProp: "scrollMarginBlock",
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"],
7724 "scroll-margin-block-start": {
7725 domProp: "scrollMarginBlockStart",
7727 type: CSS_TYPE_LONGHAND,
7729 initial_values: ["0"],
7730 other_values: ["-10px", "calc(2em + 3ex)"],
7731 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7733 "scroll-margin-block-end": {
7734 domProp: "scrollMarginBlockEnd",
7736 type: CSS_TYPE_LONGHAND,
7738 initial_values: ["0"],
7739 other_values: ["-10px", "calc(2em + 3ex)"],
7740 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7743 domProp: "scrollPadding",
7745 type: CSS_TYPE_TRUE_SHORTHAND,
7747 "scroll-padding-top",
7748 "scroll-padding-right",
7749 "scroll-padding-bottom",
7750 "scroll-padding-left",
7752 initial_values: ["auto"],
7763 invalid_values: ["20", "-20px"],
7765 "scroll-padding-top": {
7766 domProp: "scrollPaddingTop",
7768 type: CSS_TYPE_LONGHAND,
7769 initial_values: ["auto"],
7778 invalid_values: ["20", "-20px"],
7780 "scroll-padding-right": {
7781 domProp: "scrollPaddingRight",
7783 type: CSS_TYPE_LONGHAND,
7784 initial_values: ["auto"],
7793 invalid_values: ["20", "-20px"],
7795 "scroll-padding-bottom": {
7796 domProp: "scrollPaddingBottom",
7798 type: CSS_TYPE_LONGHAND,
7799 initial_values: ["auto"],
7808 invalid_values: ["20", "-20px"],
7810 "scroll-padding-left": {
7811 domProp: "scrollPaddingLeft",
7813 type: CSS_TYPE_LONGHAND,
7814 initial_values: ["auto"],
7823 invalid_values: ["20", "-20px"],
7825 "scroll-padding-inline": {
7826 domProp: "scrollPaddingInline",
7828 type: CSS_TYPE_TRUE_SHORTHAND,
7829 subproperties: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
7830 initial_values: ["auto", "auto auto"],
7839 invalid_values: ["20", "-20px"],
7841 "scroll-padding-inline-start": {
7842 domProp: "scrollPaddingInlineStart",
7844 type: CSS_TYPE_LONGHAND,
7846 initial_values: ["auto"],
7855 invalid_values: ["20", "-20px"],
7857 "scroll-padding-inline-end": {
7858 domProp: "scrollPaddingInlineEnd",
7860 type: CSS_TYPE_LONGHAND,
7862 initial_values: ["auto"],
7871 invalid_values: ["20", "-20px"],
7873 "scroll-padding-block": {
7874 domProp: "scrollPaddingBlock",
7876 type: CSS_TYPE_TRUE_SHORTHAND,
7877 subproperties: ["scroll-padding-block-start", "scroll-padding-block-end"],
7878 initial_values: ["auto", "auto auto"],
7887 invalid_values: ["20", "-20px"],
7889 "scroll-padding-block-start": {
7890 domProp: "scrollPaddingBlockStart",
7892 type: CSS_TYPE_LONGHAND,
7894 initial_values: ["auto"],
7903 invalid_values: ["20", "-20px"],
7905 "scroll-padding-block-end": {
7906 domProp: "scrollPaddingBlockEnd",
7908 type: CSS_TYPE_LONGHAND,
7910 initial_values: ["auto"],
7919 invalid_values: ["20", "-20px"],
7922 domProp: "tableLayout",
7924 type: CSS_TYPE_LONGHAND,
7925 initial_values: ["auto"],
7926 other_values: ["fixed"],
7930 domProp: "textAlign",
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"],
7941 // At least -webkit-center is needed for compat, see bug 1899042.
7953 "-moz-center-or-inherit",
7958 "text-align-last": {
7959 domProp: "textAlignLast",
7961 type: CSS_TYPE_LONGHAND,
7962 initial_values: ["auto"],
7963 other_values: ["center", "justify", "start", "end", "left", "right"],
7966 "text-combine-upright": {
7967 domProp: "textCombineUpright",
7969 type: CSS_TYPE_LONGHAND,
7970 applies_to_cue: true,
7971 applies_to_marker: true,
7972 initial_values: ["none"],
7973 other_values: ["all"],
7991 "text-decoration": {
7992 domProp: "textDecoration",
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,
8000 "text-decoration-color",
8001 "text-decoration-line",
8002 "text-decoration-style",
8003 "text-decoration-thickness",
8005 initial_values: ["none"],
8011 "blink line-through underline",
8012 "underline overline line-through blink",
8013 "underline red solid",
8014 "underline #ff0000",
8017 "#ff0000 underline",
8019 "solid underline 50px",
8020 "underline 50px blue",
8021 "50px dotted line-through purple",
8023 "underline from-font",
8024 "red from-font overline",
8025 "5% underline blue",
8026 "dotted line-through 25%",
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",
8041 "text-decoration-color": {
8042 domProp: "textDecorationColor",
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"],
8062 "text-decoration-line": {
8063 domProp: "textDecorationLine",
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"],
8076 "blink line-through underline",
8077 "underline overline line-through blink",
8083 "line-through blink line-through",
8084 "underline overline line-through blink none",
8085 "underline overline line-throuh blink blink",
8088 "text-decoration-style": {
8089 domProp: "textDecorationStyle",
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"],
8108 "text-decoration-thickness": {
8109 domProp: "textDecorationThickness",
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"],
8127 invalid_values: ["13", "-25", "rubbish", ",./!@#$", "from font"],
8129 "text-decoration-skip-ink": {
8130 domProp: "textDecorationSkipInk",
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"],
8152 "text-underline-offset": {
8153 domProp: "textUnderlineOffset",
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%"],
8170 "text-underline-position": {
8171 domProp: "textUnderlinePosition",
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"],
8206 domProp: "textEmphasis",
8208 type: CSS_TYPE_TRUE_SHORTHAND,
8209 prerequisites: { color: "black" },
8210 subproperties: ["text-emphasis-style", "text-emphasis-color"],
8212 "none currentColor",
8213 "currentColor none",
8221 "sesame filled rgba(0,0,255,0.5)",
8224 "currentColor filled",
8225 "currentColor open",
8229 "filled filled red",
8230 "open open circle #000",
8235 "text-emphasis-color": {
8236 domProp: "textEmphasisColor",
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"],
8253 "text-emphasis-position": {
8254 domProp: "textEmphasisPosition",
8256 type: CSS_TYPE_LONGHAND,
8257 initial_values: ["auto"],
8284 "text-emphasis-style": {
8285 domProp: "textEmphasisStyle",
8287 type: CSS_TYPE_LONGHAND,
8288 initial_values: ["none"],
8300 "filled double-circle",
8305 "double-circle filled",
8310 "double-circle open",
8332 domProp: "textIndent",
8334 type: CSS_TYPE_LONGHAND,
8335 initial_values: ["0", "calc(3em - 5em + 2px + 2em - 2px)"],
8345 "calc(3*25px + 50%)",
8348 quirks_values: { 5: "5px" },
8351 domProp: "textOverflow",
8353 type: CSS_TYPE_LONGHAND,
8354 applies_to_placeholder: true,
8355 initial_values: ["clip"],
8362 "ellipsis ellipsis",
8388 domProp: "textShadow",
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"],
8401 "2px 2px 1px green",
8403 "green 2px 2px 1px",
8404 "green 2px 2px, blue 1px 3px 4px",
8405 "currentColor 3px 3px",
8406 "blue 2px 2px, currentColor 1px 2px",
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)",
8416 "calc(2px) calc(2px)",
8417 "calc(2px) calc(2px) calc(2px)",
8431 "calc(2px) calc(2px) calc(2px) calc(2px)",
8432 "3px 3px calc(3px + rubbish)",
8438 domProp: "textTransform",
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"],
8452 "uppercase full-width",
8453 "full-size-kana capitalize",
8454 "full-width lowercase full-size-kana",
8460 "uppercase lowercase",
8461 "full-width capitalize full-width",
8462 "uppercase full-width lowercase",
8466 domProp: "textWrap",
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"],
8478 domProp: "textWrapMode",
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"],
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"],
8505 "calc(3*25px + 50%)",
8508 quirks_values: { 5: "5px" },
8511 domProp: "transition",
8513 type: CSS_TYPE_TRUE_SHORTHAND,
8514 applies_to_marker: true,
8516 "transition-property",
8517 "transition-duration",
8518 "transition-timing-function",
8521 initial_values: ["all 0s ease 0s", "all", "0s", "0s 0s", "ease"],
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",
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",
8579 "none 2s linear 2s",
8582 "1s width, 2s none",
8583 "2s none, 1s width",
8586 "2s width, 1s inherit",
8587 "2s inherit, 1s width",
8589 "1s width,,2s color",
8590 "1s width, ,2s color",
8591 "bounce 1s cubic-bezier(0, rubbish) 2s",
8592 "bounce 1s steps(rubbish) 2s",
8596 "transition-delay": {
8597 domProp: "transitionDelay",
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"],
8605 "transition-duration": {
8606 domProp: "transitionDuration",
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"],
8614 "transition-property": {
8615 domProp: "transitionProperty",
8617 type: CSS_TYPE_LONGHAND,
8618 applies_to_marker: true,
8619 initial_values: ["all"],
8625 "width, height, opacity",
8654 "transition-timing-function": {
8655 domProp: "transitionTimingFunction",
8657 type: CSS_TYPE_LONGHAND,
8658 applies_to_marker: true,
8659 initial_values: ["ease"],
8661 "cubic-bezier(0.25, 0.1, 0.25, 1.0)",
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)",
8675 "steps(1, jump-start)",
8676 "steps(1, jump-end)",
8677 "steps(2, jump-none)",
8678 "steps(1, jump-both)",
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)",
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)",
8700 domProp: "unicodeBidi",
8702 type: CSS_TYPE_LONGHAND,
8703 applies_to_marker: true,
8704 initial_values: ["normal"],
8717 "-moz-isolate-override",
8721 domProp: "verticalAlign",
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"],
8736 "-moz-middle-with-baseline",
8747 "calc(3*25px + 50%)",
8750 quirks_values: { 5: "5px" },
8752 "baseline-source": {
8753 domProp: "baselineSource",
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"],
8764 domProp: "visibility",
8766 type: CSS_TYPE_LONGHAND,
8767 applies_to_cue: true,
8768 initial_values: ["visible"],
8769 other_values: ["hidden", "collapse"],
8773 domProp: "whiteSpace",
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"],
8791 "white-space-collapse": {
8792 domProp: "whiteSpaceCollapse",
8794 type: CSS_TYPE_LONGHAND,
8795 applies_to_placeholder: true,
8796 applies_to_cue: true,
8797 applies_to_marker: true,
8798 initial_values: ["collapse"],
8805 invalid_values: ["normal", "auto"],
8810 type: CSS_TYPE_LONGHAND,
8812 // computed value tests for width test more with 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",
8818 initial_values: [" auto"],
8819 /* XXX these have prerequisites */
8832 "-webkit-fill-available",
8857 /* valid calc() values */
8864 "calc( 50% + 2px )",
8875 "calc(3*25px + 50%)",
8876 "calc(50% - 3em + 2px)",
8877 "calc(50% - (3em + 2px))",
8878 "calc((50% - 3em) + 2px)",
8882 "calc(50px/(2 - 1))",
8884 "calc(min(5px,2em))",
8886 "calc(max(5px,2em))",
8891 "fit-content(100px)",
8893 "fit-content(calc(3*25px + 50%))",
8898 "content" /* (valid for 'flex-basis' but not 'width') */,
8899 /* invalid calc() values */
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
8917 "calc((3em / 100%) * 3em)",
8918 "calc(3em / 100% * 3em)",
8919 "calc(3em * (3em / 100%))",
8920 "calc(3em * 3em / 100%)",
8922 quirks_values: { 5: "5px" },
8925 domProp: "willChange",
8927 type: CSS_TYPE_LONGHAND,
8928 initial_values: ["auto"],
8934 "scroll-position, transform",
8935 "transform, opacity",
8936 "contents, transform",
8937 "property-that-doesnt-exist-yet",
8943 "auto, scroll-position",
8944 "scroll-position, auto",
8945 "transform scroll-position",
8949 "transform, will-change",
8953 domProp: "wordBreak",
8955 type: CSS_TYPE_LONGHAND,
8956 initial_values: ["normal"],
8957 other_values: ["break-all", "keep-all"],
8961 domProp: "wordSpacing",
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)"],
8981 "calc(-10%/2 - 1em)",
8984 quirks_values: { 5: "5px" },
8987 domProp: "overflowWrap",
8989 type: CSS_TYPE_LONGHAND,
8990 initial_values: ["normal"],
8991 other_values: ["break-word"],
8997 type: CSS_TYPE_LONGHAND,
8998 initial_values: ["manual"],
8999 other_values: ["none", "auto"],
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"],
9012 domProp: "clipPath",
9014 type: CSS_TYPE_LONGHAND,
9015 initial_values: ["none"],
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')",
9021 "url('404.svg#mypath')",
9022 "url(#my-clip-path)",
9025 .concat(basicShapeSVGBoxValues)
9026 .concat(basicShapeOtherValues)
9027 .concat(basicShapeOtherValuesWithFillRule)
9028 .concat(basicShapeXywhRectValues)
9029 .concat(basicShapeShapeValues)
9030 .concat(basicShapeShapeValuesWithFillRule),
9033 "path(abs, 'M 10 10 L 10 10 z')",
9034 "path(evenodd, '')",
9036 ].concat(basicShapeInvalidValues),
9037 unbalanced_values: basicShapeUnbalancedValues,
9040 domProp: "clipRule",
9042 type: CSS_TYPE_LONGHAND,
9043 initial_values: ["nonzero"],
9044 other_values: ["evenodd"],
9047 "color-interpolation": {
9048 domProp: "colorInterpolation",
9050 type: CSS_TYPE_LONGHAND,
9051 initial_values: ["sRGB"],
9052 other_values: ["auto", "linearRGB"],
9055 "color-interpolation-filters": {
9056 domProp: "colorInterpolationFilters",
9058 type: CSS_TYPE_LONGHAND,
9059 initial_values: ["linearRGB"],
9060 other_values: ["sRGB", "auto"],
9063 "dominant-baseline": {
9064 domProp: "dominantBaseline",
9066 type: CSS_TYPE_LONGHAND,
9067 initial_values: ["auto"],
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)"],
9092 "url(foo.svg#myserver)",
9093 'url("#myserver") green',
9099 invalid_values: ["000000", "ff00ff", "url('#myserver') rgb(0, rubbish, 0)"],
9102 domProp: "fillOpacity",
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%"],
9114 "context-fill-opacity",
9115 "context-stroke-opacity",
9120 domProp: "fillRule",
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"],
9132 type: CSS_TYPE_LONGHAND,
9133 initial_values: ["none"],
9135 // SVG reference filters
9137 "url(#my-filter-1) url(#my-filter-2)",
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)",
9148 "url('badscheme:badurl')",
9149 "blur(3px) url('badscheme:badurl') grayscale(50%)",
9158 "blur(calc(-1px))", // Parses and becomes blur(0px).
9161 "blur(calc(2 * 5px))",
9170 "brightness(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))",
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)",
9259 "url(#my-filter) none",
9260 "none url(#my-filter)",
9261 "blur(2px) none url(#my-filter)",
9264 "grayscale(invert(1.0))",
9266 // Comma delimited filters
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
9281 "blur(calc(0))", // Unitless zero in calc is not a valid length.
9284 "blur(calc(20px - 5%))",
9287 "brightness(0.5 0.5)",
9289 "brightness(0.5, 0.5)",
9290 "brightness(#my-filter)",
9294 "contrast(0.5 0.5)",
9296 "contrast(0.5, 0.5)",
9297 "contrast(#my-filter)",
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)",
9321 "grayscale(0.5, 0.5)",
9322 "grayscale(#my-filter)",
9326 "hue-rotate(0.5 0.5)",
9328 "hue-rotate(0.5, 0.5)",
9329 "hue-rotate(#my-filter)",
9332 "hue-rotate(45deg,)",
9337 "invert(#my-filter)",
9343 "opacity(0.5, 0.5)",
9344 "opacity(#my-filter)",
9348 "saturate(0.5 0.5)",
9350 "saturate(0.5, 0.5)",
9351 "saturate(#my-filter)",
9358 "sepia(#my-filter)",
9364 domProp: "floodColor",
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"],
9372 "url(foo.svg#myserver)",
9373 'url("#myserver") green',
9379 domProp: "floodOpacity",
9381 type: CSS_TYPE_LONGHAND,
9382 initial_values: ["1", "2.8", "1.000", "300%"],
9383 other_values: ["0", "0.3", "-7.3", "-100%", "50%"],
9386 "image-orientation": {
9387 domProp: "imageOrientation",
9389 type: CSS_TYPE_LONGHAND,
9390 initial_values: ["from-image"],
9391 other_values: ["none"],
9392 invalid_values: ["0", "0deg"],
9394 "image-rendering": {
9395 domProp: "imageRendering",
9397 type: CSS_TYPE_LONGHAND,
9398 initial_values: ["auto"],
9410 domProp: "isolation",
9412 type: CSS_TYPE_LONGHAND,
9413 initial_values: ["auto"],
9414 other_values: ["isolate"],
9418 domProp: "lightingColor",
9420 type: CSS_TYPE_LONGHAND,
9421 prerequisites: { color: "blue" },
9427 "rgba(255,255,255,1.0)",
9428 "rgba(255,255,255,42.0)",
9430 other_values: ["green", "#fc3", "currentColor"],
9433 "url(foo.svg#myserver)",
9434 'url("#myserver") green',
9442 type: CSS_TYPE_TRUE_SHORTHAND,
9443 subproperties: ["marker-start", "marker-mid", "marker-end"],
9444 initial_values: ["none"],
9445 other_values: ["url(#mysym)"],
9448 "url(#mysym) url(#mysym)",
9454 domProp: "markerEnd",
9456 type: CSS_TYPE_LONGHAND,
9457 initial_values: ["none"],
9458 other_values: ["url(#mysym)"],
9462 domProp: "markerMid",
9464 type: CSS_TYPE_LONGHAND,
9465 initial_values: ["none"],
9466 other_values: ["url(#mysym)"],
9470 domProp: "markerStart",
9472 type: CSS_TYPE_LONGHAND,
9473 initial_values: ["none"],
9474 other_values: ["url(#mysym)"],
9478 domProp: "mixBlendMode",
9480 type: CSS_TYPE_LONGHAND,
9481 initial_values: ["normal"],
9502 "shape-image-threshold": {
9503 domProp: "shapeImageThreshold",
9505 type: CSS_TYPE_LONGHAND,
9506 applies_to_first_letter: true,
9507 initial_values: ["0", "0.0000", "-3", "0%", "-100%"],
9522 invalid_values: ["0px", "1px", "default", "auto"],
9525 domProp: "shapeMargin",
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%"],
9534 domProp: "shapeOutside",
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
9544 invalid_values: [].concat(
9545 basicShapeSVGBoxValues,
9546 basicShapeInvalidValues,
9547 invalidNonUrlImageValues
9549 unbalanced_values: [].concat(
9550 basicShapeUnbalancedValues,
9551 unbalancedGradientAndElementValues
9554 "shape-rendering": {
9555 domProp: "shapeRendering",
9557 type: CSS_TYPE_LONGHAND,
9558 initial_values: ["auto"],
9559 other_values: ["optimizeSpeed", "crispEdges", "geometricPrecision"],
9563 domProp: "stopColor",
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"],
9571 "url(foo.svg#myserver)",
9572 'url("#myserver") green',
9578 domProp: "stopOpacity",
9580 type: CSS_TYPE_LONGHAND,
9581 initial_values: ["1", "2.8", "1.000", "300%"],
9582 other_values: ["0", "0.3", "-7.3", "-100%", "50%"],
9588 type: CSS_TYPE_LONGHAND,
9589 applies_to_first_letter: true,
9590 applies_to_first_line: true,
9591 initial_values: ["none"],
9601 "url(foo.svg#myserver)",
9602 'url("#myserver") green',
9607 invalid_values: ["000000", "ff00ff"],
9609 "stroke-dasharray": {
9610 domProp: "strokeDasharray",
9612 type: CSS_TYPE_LONGHAND,
9613 applies_to_first_letter: true,
9614 applies_to_first_line: true,
9615 initial_values: ["none"],
9619 " 5px ,3px\t, 2px ",
9626 invalid_values: ["-5px,3px,2px", "5px,3px,-2px"],
9628 "stroke-dashoffset": {
9629 domProp: "strokeDashoffset",
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"],
9639 domProp: "strokeLinecap",
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"],
9648 "stroke-linejoin": {
9649 domProp: "strokeLinejoin",
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"],
9658 "stroke-miterlimit": {
9659 domProp: "strokeMiterlimit",
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"],
9669 domProp: "strokeOpacity",
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%"],
9681 "context-fill-opacity",
9682 "context-stroke-opacity",
9687 domProp: "strokeWidth",
9689 type: CSS_TYPE_LONGHAND,
9690 applies_to_first_letter: true,
9691 applies_to_first_line: true,
9692 initial_values: ["1px"],
9702 invalid_values: ["-0.1px", "-3px"],
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"],
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"],
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"],
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"],
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"],
9747 type: CSS_TYPE_LONGHAND,
9748 initial_values: ["auto"],
9749 other_values: ["17px", "0.2em", "23.4%"],
9750 invalid_values: ["hello", "-12px", "0.0002"],
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"],
9761 domProp: "textAnchor",
9763 type: CSS_TYPE_LONGHAND,
9764 initial_values: ["start"],
9765 other_values: ["middle", "end"],
9769 domProp: "textRendering",
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"],
9779 domProp: "vectorEffect",
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"],
9788 "-moz-window-dragging": {
9789 domProp: "MozWindowDragging",
9791 type: CSS_TYPE_LONGHAND,
9792 initial_values: ["default"],
9793 other_values: ["drag", "no-drag"],
9794 invalid_values: ["none"],
9797 domProp: "accentColor",
9799 type: CSS_TYPE_LONGHAND,
9800 prerequisites: { color: "black" },
9801 initial_values: ["auto"],
9807 "rgba(128,128,128,.5)",
9810 invalid_values: ["#0", "#00", "#00000", "cc00ff"],
9813 domProp: "alignContent",
9815 type: CSS_TYPE_LONGHAND,
9816 initial_values: ["normal"],
9845 "safe end unsafe start",
9847 "normal safe start",
9850 "space-between unsafe",
9860 domProp: "alignItems",
9862 type: CSS_TYPE_LONGHAND,
9863 initial_values: ["normal"],
9898 domProp: "alignSelf",
9900 type: CSS_TYPE_LONGHAND,
9901 initial_values: ["auto"],
9926 "justify-content": {
9927 domProp: "justifyContent",
9929 type: CSS_TYPE_LONGHAND,
9930 initial_values: ["normal"],
9958 "safe end unsafe start",
9960 "normal safe start",
9963 "space-around unsafe",
9971 domProp: "justifyItems",
9973 type: CSS_TYPE_LONGHAND,
9974 initial_values: ["legacy", "normal"],
10004 "safe legacy left",
10005 "legacy left safe",
10006 "legacy safe left",
10007 "safe left legacy",
10008 "legacy left legacy",
10011 "safe left unsafe",
10017 domProp: "justifySelf",
10019 type: CSS_TYPE_LONGHAND,
10020 initial_values: ["auto"],
10055 domProp: "placeContent",
10057 type: CSS_TYPE_TRUE_SHORTHAND,
10058 subproperties: ["align-content", "justify-content"],
10059 initial_values: ["normal"],
10064 "space-between flex-end",
10065 "last baseline start",
10085 domProp: "placeItems",
10087 type: CSS_TYPE_TRUE_SHORTHAND,
10088 subproperties: ["align-items", "justify-items"],
10089 initial_values: ["normal"],
10096 "last baseline start",
10103 "start space-evenly",
10115 domProp: "placeSelf",
10117 type: CSS_TYPE_TRUE_SHORTHAND,
10118 subproperties: ["align-self", "justify-self"],
10119 initial_values: ["auto"],
10122 "first baseline end",
10130 "last baseline start",
10135 "start space-evenly",
10138 "auto legacy left",
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"],
10181 "0 1 calc(0px + rubbish)",
10185 domProp: "flexBasis",
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?)
10203 "-moz-max-content",
10204 "-moz-min-content",
10205 "-moz-fit-content",
10207 "-webkit-fill-available",
10208 // valid calc() values
10213 "calc( 50% + 2px)",
10214 "calc(50% + 2px )",
10215 "calc( 50% + 2px )",
10216 "calc(50% - -2px)",
10217 "calc(2px - -50%)",
10226 "calc(3*25px + 50%)",
10227 "calc(50% - 3em + 2px)",
10228 "calc(50% - (3em + 2px))",
10229 "calc((50% - 3em) + 2px)",
10233 "calc(50px/(2 - 1))",
10235 "calc(min(5px,2em))",
10237 "calc(max(5px,2em))",
10246 // invalid calc() values
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%)",
10269 "flex-direction": {
10270 domProp: "flexDirection",
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"],
10278 domProp: "flexFlow",
10280 type: CSS_TYPE_TRUE_SHORTHAND,
10281 subproperties: ["flex-direction", "flex-wrap"],
10282 initial_values: ["row nowrap", "nowrap row", "row", "nowrap"],
10284 // only specifying one property:
10288 // specifying both properties, 'flex-direction' first:
10290 "row wrap-reverse",
10292 "column wrap-reverse",
10293 // specifying both properties, 'flex-wrap' first:
10296 "wrap-reverse row",
10297 "wrap-reverse column",
10300 // specifying flex-direction twice (invalid):
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:
10318 domProp: "flexGrow",
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"],
10326 domProp: "flexShrink",
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"],
10334 domProp: "flexWrap",
10336 type: CSS_TYPE_LONGHAND,
10337 initial_values: ["nowrap"],
10338 other_values: ["wrap", "wrap-reverse"],
10339 invalid_values: ["10px", "30%", "justify", "column wrap", "auto"],
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"],
10352 domProp: "wordWrap",
10354 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10355 alias_for: "overflow-wrap",
10356 subproperties: ["overflow-wrap"],
10359 domProp: "MozTabSize",
10361 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10362 alias_for: "tab-size",
10363 subproperties: ["tab-size"],
10365 "-moz-border-image": {
10366 domProp: "MozBorderImage",
10368 type: CSS_TYPE_TRUE_SHORTHAND,
10369 alias_for: "border-image",
10371 "border-image-source",
10372 "border-image-slice",
10373 "border-image-width",
10374 "border-image-outset",
10375 "border-image-repeat",
10378 "-moz-font-feature-settings": {
10379 domProp: "MozFontFeatureSettings",
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"],
10390 "-moz-font-language-override": {
10391 domProp: "MozFontLanguageOverride",
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"],
10403 domProp: "MozHyphens",
10405 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10406 alias_for: "hyphens",
10407 subproperties: ["hyphens"],
10409 // vertical text properties
10411 domProp: "writingMode",
10413 type: CSS_TYPE_LONGHAND,
10414 initial_values: ["horizontal-tb", "lr", "lr-tb", "rl", "rl-tb"],
10423 invalid_values: ["10px", "30%", "justify", "auto", "1em"],
10425 "text-orientation": {
10426 domProp: "textOrientation",
10428 type: CSS_TYPE_LONGHAND,
10429 initial_values: ["mixed"],
10434 ] /* sideways-right alias for backward compatibility */,
10439 ] /* sideways-left removed from CSS Writing Modes */,
10442 domProp: "blockSize",
10444 type: CSS_TYPE_LONGHAND,
10447 /* XXX testing auto has prerequisites */
10448 initial_values: ["auto"],
10449 prerequisites: { display: "block" },
10458 "-moz-max-content",
10459 "-moz-min-content",
10460 "-moz-fit-content",
10462 "-webkit-fill-available",
10467 "calc(3*25px + 50%)",
10468 "fit-content(100px)",
10469 "fit-content(10%)",
10470 "fit-content(calc(3*25px + 50%))",
10472 invalid_values: ["none"],
10475 domProp: "borderBlock",
10477 type: CSS_TYPE_TRUE_SHORTHAND,
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",
10491 "none medium currentcolor",
10502 invalid_values: ["5%", "5", "5 solid green"],
10504 "border-block-end": {
10505 domProp: "borderBlockEnd",
10507 type: CSS_TYPE_TRUE_SHORTHAND,
10509 "border-block-end-color",
10510 "border-block-end-style",
10511 "border-block-end-width",
10518 "none medium currentcolor",
10529 invalid_values: ["5%", "5", "5 solid green"],
10531 "border-block-color": {
10532 domProp: "borderBlockColor",
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"],
10540 "border-block-end-color": {
10541 domProp: "borderBlockEndColor",
10543 type: CSS_TYPE_LONGHAND,
10544 applies_to_first_letter: 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"],
10550 "border-block-style": {
10551 domProp: "borderBlockStyle",
10553 type: CSS_TYPE_TRUE_SHORTHAND,
10554 subproperties: ["border-block-start-style", "border-block-end-style"],
10555 initial_values: ["none"],
10566 invalid_values: [],
10568 "border-block-end-style": {
10569 domProp: "borderBlockEndStyle",
10571 type: CSS_TYPE_LONGHAND,
10572 applies_to_first_letter: true,
10574 /* XXX hidden is sometimes the same as initial */
10575 initial_values: ["none"],
10586 invalid_values: [],
10588 "border-block-width": {
10589 domProp: "borderBlockWidth",
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"],
10603 "calc(-2px) thick",
10605 "medium calc(0em)",
10611 invalid_values: ["5%", "5", "5 thin", "thin 5%", "blue", "solid"],
10613 "border-block-end-width": {
10614 domProp: "borderBlockEndWidth",
10616 type: CSS_TYPE_LONGHAND,
10617 applies_to_first_letter: true,
10619 prerequisites: { "border-block-end-style": "solid" },
10620 initial_values: ["medium", "3px", "calc(4px - 1px)"],
10633 "calc(3*25px + 5em)",
10635 invalid_values: ["5%", "5"],
10637 "border-block-start": {
10638 domProp: "borderBlockStart",
10640 type: CSS_TYPE_TRUE_SHORTHAND,
10642 "border-block-start-color",
10643 "border-block-start-style",
10644 "border-block-start-width",
10651 "none medium currentcolor",
10662 invalid_values: ["5%", "5", "5 solid green"],
10664 "border-block-start-color": {
10665 domProp: "borderBlockStartColor",
10667 type: CSS_TYPE_LONGHAND,
10668 applies_to_first_letter: 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"],
10674 "border-block-start-style": {
10675 domProp: "borderBlockStartStyle",
10677 type: CSS_TYPE_LONGHAND,
10678 applies_to_first_letter: true,
10680 /* XXX hidden is sometimes the same as initial */
10681 initial_values: ["none"],
10692 invalid_values: [],
10694 "border-block-start-width": {
10695 domProp: "borderBlockStartWidth",
10697 type: CSS_TYPE_LONGHAND,
10698 applies_to_first_letter: true,
10700 prerequisites: { "border-block-start-style": "solid" },
10701 initial_values: ["medium", "3px", "calc(4px - 1px)"],
10714 "calc(3*25px + 5em)",
10716 invalid_values: ["5%", "5"],
10718 "-moz-border-end": {
10719 domProp: "MozBorderEnd",
10721 type: CSS_TYPE_TRUE_SHORTHAND,
10722 alias_for: "border-inline-end",
10724 "-moz-border-end-color",
10725 "-moz-border-end-style",
10726 "-moz-border-end-width",
10729 "-moz-border-end-color": {
10730 domProp: "MozBorderEndColor",
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"],
10737 "-moz-border-end-style": {
10738 domProp: "MozBorderEndStyle",
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"],
10745 "-moz-border-end-width": {
10746 domProp: "MozBorderEndWidth",
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"],
10753 "-moz-border-start": {
10754 domProp: "MozBorderStart",
10756 type: CSS_TYPE_TRUE_SHORTHAND,
10757 alias_for: "border-inline-start",
10759 "-moz-border-start-color",
10760 "-moz-border-start-style",
10761 "-moz-border-start-width",
10764 "-moz-border-start-color": {
10765 domProp: "MozBorderStartColor",
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"],
10772 "-moz-border-start-style": {
10773 domProp: "MozBorderStartStyle",
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"],
10780 "-moz-border-start-width": {
10781 domProp: "MozBorderStartWidth",
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"],
10789 domProp: "inlineSize",
10791 type: CSS_TYPE_LONGHAND,
10794 /* XXX testing auto has prerequisites */
10795 initial_values: ["auto"],
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",
10810 "-moz-max-content",
10811 "-moz-min-content",
10812 "-moz-fit-content",
10814 "-webkit-fill-available",
10819 "calc(3*25px + 50%)",
10820 "fit-content(100px)",
10821 "fit-content(10%)",
10822 "fit-content(calc(3*25px + 50%))",
10824 invalid_values: ["none"],
10827 domProp: "marginBlock",
10829 type: CSS_TYPE_TRUE_SHORTHAND,
10830 subproperties: ["margin-block-start", "margin-block-end"],
10831 initial_values: ["0", "0px 0em"],
10839 "calc(3*25px) calc(2px)",
10840 "calc(25px*3) 1em",
10841 "calc(3*25px + 50%) calc(3*25px - 50%)",
10859 "margin-block-end": {
10860 domProp: "marginBlockEnd",
10862 type: CSS_TYPE_LONGHAND,
10863 applies_to_first_letter: true,
10865 /* XXX testing auto has prerequisites */
10866 initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
10876 "calc(3*25px + 50%)",
10893 "margin-block-start": {
10894 domProp: "marginBlockStart",
10896 type: CSS_TYPE_LONGHAND,
10897 applies_to_first_letter: true,
10899 /* XXX testing auto has prerequisites */
10900 initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
10910 "calc(3*25px + 50%)",
10927 "-moz-margin-end": {
10928 domProp: "MozMarginEnd",
10930 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10931 applies_to_first_letter: true,
10932 alias_for: "margin-inline-end",
10933 subproperties: ["margin-inline-end"],
10935 "-moz-margin-start": {
10936 domProp: "MozMarginStart",
10938 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10939 applies_to_first_letter: true,
10940 alias_for: "margin-inline-start",
10941 subproperties: ["margin-inline-start"],
10943 "max-block-size": {
10944 domProp: "maxBlockSize",
10946 type: CSS_TYPE_LONGHAND,
10949 prerequisites: { display: "block" },
10950 initial_values: ["none"],
10958 "-moz-max-content",
10959 "-moz-min-content",
10960 "-moz-fit-content",
10962 "-webkit-fill-available",
10967 "calc(3*25px + 50%)",
10968 "fit-content(100px)",
10969 "fit-content(10%)",
10970 "fit-content(calc(3*25px + 50%))",
10972 invalid_values: ["auto", "5"],
10974 "max-inline-size": {
10975 domProp: "maxInlineSize",
10977 type: CSS_TYPE_LONGHAND,
10980 prerequisites: { display: "block" },
10981 initial_values: ["none"],
10989 "-moz-max-content",
10990 "-moz-min-content",
10991 "-moz-fit-content",
10993 "-webkit-fill-available",
10998 "calc(3*25px + 50%)",
10999 "fit-content(100px)",
11000 "fit-content(10%)",
11001 "fit-content(calc(3*25px + 50%))",
11003 invalid_values: ["auto", "5"],
11005 "min-block-size": {
11006 domProp: "minBlockSize",
11008 type: CSS_TYPE_LONGHAND,
11011 prerequisites: { display: "block" },
11012 initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
11020 "-moz-max-content",
11021 "-moz-min-content",
11022 "-moz-fit-content",
11024 "-webkit-fill-available",
11030 "calc(3*25px + 50%)",
11031 "fit-content(100px)",
11032 "fit-content(10%)",
11033 "fit-content(calc(3*25px + 50%))",
11035 invalid_values: ["none", "5"],
11037 "min-inline-size": {
11038 domProp: "minInlineSize",
11040 type: CSS_TYPE_LONGHAND,
11043 prerequisites: { display: "block" },
11044 initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
11052 "-moz-max-content",
11053 "-moz-min-content",
11054 "-moz-fit-content",
11056 "-webkit-fill-available",
11062 "calc(3*25px + 50%)",
11063 "fit-content(100px)",
11064 "fit-content(10%)",
11065 "fit-content(calc(3*25px + 50%))",
11067 invalid_values: ["none", "5"],
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"],
11081 "1em calc(2em + 3px) 4ex 5cm",
11083 invalid_values: ["1px calc(nonsense)", "1px red", "3"],
11084 unbalanced_values: ["1px calc("],
11087 domProp: "insetBlock",
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"],
11108 "calc(3*25px) auto",
11110 "auto calc(25px*3)",
11111 "calc(3*25px + 50%)",
11112 "auto calc(3*25px + 50%)",
11114 invalid_values: ["none"],
11116 "inset-block-end": {
11117 domProp: "insetBlockEnd",
11119 type: CSS_TYPE_LONGHAND,
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"],
11134 "calc(3*25px + 50%)",
11136 invalid_values: [],
11138 "inset-block-start": {
11139 domProp: "insetBlockStart",
11141 type: CSS_TYPE_LONGHAND,
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"],
11156 "calc(3*25px + 50%)",
11158 invalid_values: [],
11161 domProp: "insetInline",
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"],
11182 "calc(3*25px) auto",
11184 "auto calc(25px*3)",
11185 "calc(3*25px + 50%)",
11186 "auto calc(3*25px + 50%)",
11188 invalid_values: ["none"],
11190 "inset-inline-end": {
11191 domProp: "insetInlineEnd",
11193 type: CSS_TYPE_LONGHAND,
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"],
11208 "calc(3*25px + 50%)",
11210 invalid_values: [],
11212 "inset-inline-start": {
11213 domProp: "insetInlineStart",
11215 type: CSS_TYPE_LONGHAND,
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"],
11230 "calc(3*25px + 50%)",
11232 invalid_values: [],
11234 "padding-block-end": {
11235 domProp: "paddingBlockEnd",
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.
11258 "calc(3*25px + 50%)",
11260 invalid_values: [],
11262 "padding-block-start": {
11263 domProp: "paddingBlockStart",
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.
11286 "calc(3*25px + 50%)",
11288 invalid_values: [],
11290 "-moz-padding-end": {
11291 domProp: "MozPaddingEnd",
11293 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11294 applies_to_first_letter: true,
11295 alias_for: "padding-inline-end",
11296 subproperties: ["padding-inline-end"],
11298 "-moz-padding-start": {
11299 domProp: "MozPaddingStart",
11301 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11302 applies_to_first_letter: true,
11303 alias_for: "padding-inline-start",
11304 subproperties: ["padding-inline-start"],
11306 "-webkit-animation": {
11307 domProp: "webkitAnimation",
11309 type: CSS_TYPE_TRUE_SHORTHAND,
11310 applies_to_marker: true,
11311 alias_for: "animation",
11314 "animation-duration",
11315 "animation-timing-function",
11317 "animation-direction",
11318 "animation-fill-mode",
11319 "animation-iteration-count",
11320 "animation-play-state",
11323 "-webkit-animation-delay": {
11324 domProp: "webkitAnimationDelay",
11326 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11327 applies_to_marker: true,
11328 alias_for: "animation-delay",
11329 subproperties: ["animation-delay"],
11331 "-webkit-animation-direction": {
11332 domProp: "webkitAnimationDirection",
11334 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11335 applies_to_marker: true,
11336 alias_for: "animation-direction",
11337 subproperties: ["animation-direction"],
11339 "-webkit-animation-duration": {
11340 domProp: "webkitAnimationDuration",
11342 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11343 applies_to_marker: true,
11344 alias_for: "animation-duration",
11345 subproperties: ["animation-duration"],
11347 "-webkit-animation-fill-mode": {
11348 domProp: "webkitAnimationFillMode",
11350 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11351 applies_to_marker: true,
11352 alias_for: "animation-fill-mode",
11353 subproperties: ["animation-fill-mode"],
11355 "-webkit-animation-iteration-count": {
11356 domProp: "webkitAnimationIterationCount",
11358 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11359 applies_to_marker: true,
11360 alias_for: "animation-iteration-count",
11361 subproperties: ["animation-iteration-count"],
11363 "-webkit-animation-name": {
11364 domProp: "webkitAnimationName",
11366 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11367 applies_to_marker: true,
11368 alias_for: "animation-name",
11369 subproperties: ["animation-name"],
11371 "-webkit-animation-play-state": {
11372 domProp: "webkitAnimationPlayState",
11374 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11375 applies_to_marker: true,
11376 alias_for: "animation-play-state",
11377 subproperties: ["animation-play-state"],
11379 "-webkit-animation-timing-function": {
11380 domProp: "webkitAnimationTimingFunction",
11382 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11383 applies_to_marker: true,
11384 alias_for: "animation-timing-function",
11385 subproperties: ["animation-timing-function"],
11387 "-webkit-clip-path": {
11388 domProp: "webkitClipPath",
11390 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11391 alias_for: "clip-path",
11392 subproperties: ["clip-path"],
11394 "-webkit-filter": {
11395 domProp: "webkitFilter",
11397 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11398 alias_for: "filter",
11399 subproperties: ["filter"],
11401 "-webkit-text-security": {
11402 domProp: "webkitTextSecurity",
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", "'*'"],
11412 "-webkit-text-fill-color": {
11413 domProp: "webkitTextFillColor",
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"],
11430 "rgb(255,xxx,255)",
11433 "-webkit-text-stroke": {
11434 domProp: "webkitTextStroke",
11436 type: CSS_TYPE_TRUE_SHORTHAND,
11437 prerequisites: { color: "black" },
11438 subproperties: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"],
11441 "currentColor 0px",
11449 "thick rgba(0,0,255,0.5)",
11450 "calc(4px - 8px) green",
11453 "currentColor 4em",
11454 "currentColor calc(5px - 1px)",
11456 invalid_values: ["-3px black", "calc(50%+ 2px) #000", "30% #f00"],
11458 "-webkit-text-stroke-color": {
11459 domProp: "webkitTextStrokeColor",
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"],
11476 "rgb(255,xxx,255)",
11479 "-webkit-text-stroke-width": {
11480 domProp: "webkitTextStrokeWidth",
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)"],
11493 "calc(3*25px + 5em)",
11498 "1px calc(nonsense)",
11505 "-webkit-text-size-adjust": {
11506 domProp: "webkitTextSizeAdjust",
11508 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11509 alias_for: "-moz-text-size-adjust",
11510 subproperties: ["-moz-text-size-adjust"],
11512 "-webkit-transform": {
11513 domProp: "webkitTransform",
11515 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11516 alias_for: "transform",
11517 subproperties: ["transform"],
11519 "-webkit-transform-origin": {
11520 domProp: "webkitTransformOrigin",
11522 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11523 alias_for: "transform-origin",
11524 subproperties: ["transform-origin"],
11526 "-webkit-transform-style": {
11527 domProp: "webkitTransformStyle",
11529 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11530 alias_for: "transform-style",
11531 subproperties: ["transform-style"],
11533 "-webkit-backface-visibility": {
11534 domProp: "webkitBackfaceVisibility",
11536 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11537 alias_for: "backface-visibility",
11538 subproperties: ["backface-visibility"],
11540 "-webkit-perspective": {
11541 domProp: "webkitPerspective",
11543 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11544 alias_for: "perspective",
11545 subproperties: ["perspective"],
11547 "-webkit-perspective-origin": {
11548 domProp: "webkitPerspectiveOrigin",
11550 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11551 alias_for: "perspective-origin",
11552 subproperties: ["perspective-origin"],
11554 "-webkit-transition": {
11555 domProp: "webkitTransition",
11557 type: CSS_TYPE_TRUE_SHORTHAND,
11558 applies_to_marker: true,
11559 alias_for: "transition",
11561 "transition-property",
11562 "transition-duration",
11563 "transition-timing-function",
11564 "transition-delay",
11567 "-webkit-transition-delay": {
11568 domProp: "webkitTransitionDelay",
11570 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11571 applies_to_marker: true,
11572 alias_for: "transition-delay",
11573 subproperties: ["transition-delay"],
11575 "-webkit-transition-duration": {
11576 domProp: "webkitTransitionDuration",
11578 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11579 applies_to_marker: true,
11580 alias_for: "transition-duration",
11581 subproperties: ["transition-duration"],
11583 "-webkit-transition-property": {
11584 domProp: "webkitTransitionProperty",
11586 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11587 applies_to_marker: true,
11588 alias_for: "transition-property",
11589 subproperties: ["transition-property"],
11591 "-webkit-transition-timing-function": {
11592 domProp: "webkitTransitionTimingFunction",
11594 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11595 applies_to_marker: true,
11596 alias_for: "transition-timing-function",
11597 subproperties: ["transition-timing-function"],
11599 "-webkit-border-radius": {
11600 domProp: "webkitBorderRadius",
11602 type: CSS_TYPE_TRUE_SHORTHAND,
11603 alias_for: "border-radius",
11605 "border-bottom-left-radius",
11606 "border-bottom-right-radius",
11607 "border-top-left-radius",
11608 "border-top-right-radius",
11611 "-webkit-border-top-left-radius": {
11612 domProp: "webkitBorderTopLeftRadius",
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"],
11619 "-webkit-border-top-right-radius": {
11620 domProp: "webkitBorderTopRightRadius",
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"],
11627 "-webkit-border-bottom-left-radius": {
11628 domProp: "webkitBorderBottomLeftRadius",
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"],
11635 "-webkit-border-bottom-right-radius": {
11636 domProp: "webkitBorderBottomRightRadius",
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"],
11643 "-webkit-background-clip": {
11644 domProp: "webkitBackgroundClip",
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"],
11654 "-webkit-background-origin": {
11655 domProp: "webkitBackgroundOrigin",
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"],
11665 "-webkit-background-size": {
11666 domProp: "webkitBackgroundSize",
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"],
11676 "-webkit-border-image": {
11677 domProp: "webkitBorderImage",
11679 type: CSS_TYPE_TRUE_SHORTHAND,
11680 alias_for: "border-image",
11682 "border-image-source",
11683 "border-image-slice",
11684 "border-image-width",
11685 "border-image-outset",
11686 "border-image-repeat",
11689 "-webkit-box-shadow": {
11690 domProp: "webkitBoxShadow",
11692 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11693 applies_to_first_letter: true,
11694 alias_for: "box-shadow",
11695 subproperties: ["box-shadow"],
11697 "-webkit-box-sizing": {
11698 domProp: "webkitBoxSizing",
11700 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11701 alias_for: "box-sizing",
11702 subproperties: ["box-sizing"],
11704 "-webkit-box-flex": {
11705 domProp: "webkitBoxFlex",
11707 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11708 alias_for: "-moz-box-flex",
11709 subproperties: ["-moz-box-flex"],
11711 "-webkit-box-ordinal-group": {
11712 domProp: "webkitBoxOrdinalGroup",
11714 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11715 alias_for: "-moz-box-ordinal-group",
11716 subproperties: ["-moz-box-ordinal-group"],
11718 "-webkit-box-orient": {
11719 domProp: "webkitBoxOrient",
11721 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11722 alias_for: "-moz-box-orient",
11723 subproperties: ["-moz-box-orient"],
11725 "-webkit-box-direction": {
11726 domProp: "webkitBoxDirection",
11728 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11729 alias_for: "-moz-box-direction",
11730 subproperties: ["-moz-box-direction"],
11732 "-webkit-box-align": {
11733 domProp: "webkitBoxAlign",
11735 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11736 alias_for: "-moz-box-align",
11737 subproperties: ["-moz-box-align"],
11739 "-webkit-box-pack": {
11740 domProp: "webkitBoxPack",
11742 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11743 alias_for: "-moz-box-pack",
11744 subproperties: ["-moz-box-pack"],
11746 "-webkit-flex-direction": {
11747 domProp: "webkitFlexDirection",
11749 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11750 alias_for: "flex-direction",
11751 subproperties: ["flex-direction"],
11753 "-webkit-flex-wrap": {
11754 domProp: "webkitFlexWrap",
11756 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11757 alias_for: "flex-wrap",
11758 subproperties: ["flex-wrap"],
11760 "-webkit-flex-flow": {
11761 domProp: "webkitFlexFlow",
11763 type: CSS_TYPE_TRUE_SHORTHAND,
11764 alias_for: "flex-flow",
11765 subproperties: ["flex-direction", "flex-wrap"],
11767 "-webkit-font-feature-settings": {
11768 domProp: "webkitFontFeatureSettings",
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"],
11779 "-webkit-line-clamp": {
11780 domProp: "webkitLineClamp",
11782 type: CSS_TYPE_LONGHAND,
11783 initial_values: ["none"],
11784 other_values: ["1", "2"],
11785 invalid_values: ["auto", "0", "-1"],
11788 domProp: "webkitOrder",
11790 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11791 alias_for: "order",
11792 subproperties: ["order"],
11795 domProp: "webkitFlex",
11797 type: CSS_TYPE_TRUE_SHORTHAND,
11799 subproperties: ["flex-grow", "flex-shrink", "flex-basis"],
11801 "-webkit-flex-grow": {
11802 domProp: "webkitFlexGrow",
11804 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11805 alias_for: "flex-grow",
11806 subproperties: ["flex-grow"],
11808 "-webkit-flex-shrink": {
11809 domProp: "webkitFlexShrink",
11811 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11812 alias_for: "flex-shrink",
11813 subproperties: ["flex-shrink"],
11815 "-webkit-flex-basis": {
11816 domProp: "webkitFlexBasis",
11818 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11819 alias_for: "flex-basis",
11820 subproperties: ["flex-basis"],
11822 "-webkit-justify-content": {
11823 domProp: "webkitJustifyContent",
11825 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11826 alias_for: "justify-content",
11827 subproperties: ["justify-content"],
11829 "-webkit-align-items": {
11830 domProp: "webkitAlignItems",
11832 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11833 alias_for: "align-items",
11834 subproperties: ["align-items"],
11836 "-webkit-align-self": {
11837 domProp: "webkitAlignSelf",
11839 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11840 alias_for: "align-self",
11841 subproperties: ["align-self"],
11843 "-webkit-align-content": {
11844 domProp: "webkitAlignContent",
11846 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11847 alias_for: "align-content",
11848 subproperties: ["align-content"],
11850 "-webkit-user-select": {
11851 domProp: "webkitUserSelect",
11853 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11854 alias_for: "user-select",
11855 subproperties: ["user-select"],
11858 domProp: "webkitMask",
11860 type: CSS_TYPE_TRUE_SHORTHAND,
11873 "-webkit-mask-clip": {
11874 domProp: "webkitMaskClip",
11876 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11877 alias_for: "mask-clip",
11878 subproperties: ["mask-clip"],
11881 "-webkit-mask-composite": {
11882 domProp: "webkitMaskComposite",
11884 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11885 alias_for: "mask-composite",
11886 subproperties: ["mask-composite"],
11889 "-webkit-mask-image": {
11890 domProp: "webkitMaskImage",
11892 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11893 alias_for: "mask-image",
11894 subproperties: ["mask-image"],
11896 "-webkit-mask-origin": {
11897 domProp: "webkitMaskOrigin",
11899 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11900 alias_for: "mask-origin",
11901 subproperties: ["mask-origin"],
11903 "-webkit-mask-position": {
11904 domProp: "webkitMaskPosition",
11906 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11907 alias_for: "mask-position",
11908 subproperties: ["mask-position"],
11910 "-webkit-mask-position-x": {
11911 domProp: "webkitMaskPositionX",
11913 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11914 alias_for: "mask-position-x",
11915 subproperties: ["mask-position-x"],
11917 "-webkit-mask-position-y": {
11918 domProp: "webkitMaskPositionY",
11920 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11921 alias_for: "mask-position-y",
11922 subproperties: ["mask-position-y"],
11924 "-webkit-mask-repeat": {
11925 domProp: "webkitMaskRepeat",
11927 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11928 alias_for: "mask-repeat",
11929 subproperties: ["mask-repeat"],
11931 "-webkit-mask-size": {
11932 domProp: "webkitMaskSize",
11934 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11935 alias_for: "mask-size",
11936 subproperties: ["mask-size"],
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];
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"))
11951 for (var idx in info.subproperties) {
11952 var subprop = info.subproperties[idx];
11953 results.push(get_computed_value(cs, subprop));
11955 return results.join(" ; ");
11957 return cs.getPropertyValue(property);
11961 const mozHiddenUnscrollableEnabled = IsCSSPropertyPrefEnabled(
11962 "layout.css.overflow-moz-hidden-unscrollable.enabled"
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"
11978 if (IsCSSPropertyPrefEnabled("layout.css.moz-user-modify.enabled")) {
11979 Object.assign(gCSSProperties, {
11980 "-moz-user-modify": {
11981 domProp: "MozUserModify",
11983 type: CSS_TYPE_LONGHAND,
11984 initial_values: ["read-only"],
11985 other_values: ["read-write", "write-only"],
11986 invalid_values: [],
11991 gCSSProperties.rotate = {
11994 type: CSS_TYPE_LONGHAND,
11995 initial_values: ["none"],
12013 /* valid calc() values */
12014 "calc(1) 0 0 calc(45deg + 5rad)",
12015 "0 1 0 calc(400grad + 1rad)",
12016 "calc(0.5turn + 10deg)",
12031 /* invalid calc() values */
12032 "0.5 1 0 calc(45deg + 10)",
12033 "calc(0.5turn + 10%)",
12037 gCSSProperties.translate = {
12038 domProp: "translate",
12040 type: CSS_TYPE_LONGHAND,
12041 prerequisites: { width: "10px", height: "10px", display: "block" },
12042 initial_values: ["none"],
12052 /* valid calc() values */
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%))",
12062 "-moz-min(5px,10%)",
12066 /* invalid calc() values */
12067 "calc(max(5px,10%) 10%)",
12071 gCSSProperties.scale = {
12074 type: CSS_TYPE_LONGHAND,
12075 initial_values: ["none"],
12092 /* valid calc() values */
12094 "calc(10) calc(20) 30",
12100 /* invalid calc() values */
12102 "10 calc(1 + 10px)",
12107 IsCSSPropertyPrefEnabled("layout.css.transform-box-content-stroke.enabled")
12109 gCSSProperties["transform-box"]["other_values"].push(
12115 gCSSProperties["touch-action"] = {
12116 domProp: "touchAction",
12118 type: CSS_TYPE_LONGHAND,
12119 initial_values: ["auto"],
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",
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",
12266 gCSSProperties["page"] = {
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",
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(
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)"
12296 gCSSProperties["text-indent"].invalid_values.push(
12299 "-10px hanging hanging",
12300 "each-line calc(2px) each-line"
12304 if (IsCSSPropertyPrefEnabled("layout.css.font-variations.enabled")) {
12305 gCSSProperties["font-variation-settings"] = {
12306 domProp: "fontVariationSettings",
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"],
12319 "'wdth' 2, 'wght' 3",
12324 "wdth 1", // unquoted tags
12327 "'wdth', 'wght'", // missing values
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
12337 unbalanced_values: [
12339 "\"wdth' 1", // mismatched quotes
12342 gCSSProperties["font"].subproperties.push("font-variation-settings");
12343 gCSSProperties["font-optical-sizing"] = {
12344 domProp: "fontOpticalSizing",
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"],
12356 gCSSProperties["font"].subproperties.push("font-optical-sizing");
12357 gCSSProperties["font-variation-settings"].other_values.push(
12362 if (IsCSSPropertyPrefEnabled("layout.css.font-palette.enabled")) {
12363 gCSSProperties["font-palette"] = {
12364 domProp: "fontPalette",
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"],
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",
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"],
12401 var isGridTemplateMasonryValueEnabled = IsCSSPropertyPrefEnabled(
12402 "layout.css.grid-template-masonry-value.enabled"
12405 if (isGridTemplateMasonryValueEnabled) {
12406 gCSSProperties["masonry-auto-flow"] = {
12407 domProp: "masonryAutoFlow",
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"],
12416 gCSSProperties["display"].other_values.push("grid", "inline-grid");
12417 gCSSProperties["grid-auto-flow"] = {
12418 domProp: "gridAutoFlow",
12420 type: CSS_TYPE_LONGHAND,
12421 initial_values: ["row"],
12430 invalid_values: ["", "auto", "none", "10px", "column row", "dense row dense"],
12433 gCSSProperties["grid-auto-columns"] = {
12434 domProp: "gridAutoColumns",
12436 type: CSS_TYPE_LONGHAND,
12437 initial_values: ["auto"],
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%)",
12455 "2.5fr min-content fit-content(1px)",
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)",
12477 gCSSProperties["grid-auto-rows"] = {
12478 domProp: "gridAutoRows",
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",
12489 type: CSS_TYPE_LONGHAND,
12490 initial_values: ["none"],
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",
12503 "[] 40px [-foo] 2em [bar baz This is one ident]",
12504 // TODO bug 978478: "[a] repeat(3, [b] 20px [c] 40px [d]) [e]",
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",
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] [] []",
12561 "[foo[] bar] 40px",
12564 "[foo] [bar] 40px",
12565 "40px [foo] [bar]",
12568 "mÄ°nmax(20px, 100px)",
12569 "minmax(20px, 100px, 200px)",
12570 "maxmin(100px, 20px)",
12571 "minmax(min-content, minmax(30px, max-content))",
12573 "repeat(-3, 20px)",
12574 "rêpeat(1, 20px)",
12577 "repeat(3px, 20px)",
12578 "repeat(2.0, 20px)",
12579 "repeat(2.5, 20px)",
12580 "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]",
12612 "subgrid [default]",
12614 "subgrid [foo] 40px",
12615 "subgrid [foo 40px]",
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, [])",
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(
12650 "masonry [foo] 40px",
12657 "masonry repeat(1, [])"
12660 gCSSProperties["grid-template-rows"] = {
12661 domProp: "gridTemplateRows",
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",
12671 type: CSS_TYPE_LONGHAND,
12672 initial_values: ["none"],
12674 "'1a-é_ .' \"b .\"",
12675 "' Z\t\\aZ' 'Z Z'",
12676 " '. . a b' '. .a b' ",
12680 "'...-blah' '. .'",
12681 "'.. ..' '.. ...'",
12692 "'a a'\n'..'\n'a a'",
12696 gCSSProperties["grid-template"] = {
12697 domProp: "gridTemplate",
12699 type: CSS_TYPE_TRUE_SHORTHAND,
12701 "grid-template-areas",
12702 "grid-template-rows",
12703 "grid-template-columns",
12705 initial_values: ["none", "none / none"],
12707 // <'grid-template-rows'> / <'grid-template-columns'>
12709 "[foo] 40px [bar] / [baz] repeat(auto-fill,100px) [fizz]",
12712 // [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?
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]",
12727 "subgrid [foo] [] [bar baz]/subgrid [foo] [] [bar baz]",
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",
12738 "subgrid [] / 'fizz'",
12739 "subgrid / 'fizz'",
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"
12753 gCSSProperties["grid-template"].invalid_values.push(
12759 gCSSProperties["grid"] = {
12762 type: CSS_TYPE_TRUE_SHORTHAND,
12764 "grid-template-areas",
12765 "grid-template-rows",
12766 "grid-template-columns",
12769 "grid-auto-columns",
12771 initial_values: ["none", "none / none"],
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),
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",
12796 gCSSProperties["grid-template"].invalid_values,
12797 gCSSProperties["grid-auto-flow"].other_values,
12798 gCSSProperties["grid-auto-flow"].invalid_values.filter(v => v != "none")
12802 var gridLineOtherValues = [
12819 var gridLineInvalidValues = [
12843 gCSSProperties["grid-column-start"] = {
12844 domProp: "gridColumnStart",
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",
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",
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",
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",
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",
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 = [
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",
12932 type: CSS_TYPE_TRUE_SHORTHAND,
12935 "grid-column-start",
12942 "auto / auto / auto",
12943 "auto / auto / auto / auto",
12945 other_values: gridAreaOtherValues,
12946 invalid_values: gridAreaInvalidValues,
12949 gCSSProperties["column-gap"] = {
12950 domProp: "columnGap",
12952 type: CSS_TYPE_LONGHAND,
12953 initial_values: ["normal"],
12969 "fit-content(1px)",
12972 gCSSProperties["grid-column-gap"] = {
12973 domProp: "gridColumnGap",
12975 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
12976 alias_for: "column-gap",
12977 subproperties: ["column-gap"],
12979 gCSSProperties["row-gap"] = {
12982 type: CSS_TYPE_LONGHAND,
12983 initial_values: ["normal"],
12993 invalid_values: ["-1px", "auto", "none", "1px 1px", "-1%", "min-content"],
12995 gCSSProperties["grid-row-gap"] = {
12996 domProp: "gridRowGap",
12998 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
12999 alias_for: "row-gap",
13000 subproperties: ["row-gap"],
13002 gCSSProperties["gap"] = {
13005 type: CSS_TYPE_TRUE_SHORTHAND,
13006 subproperties: ["column-gap", "row-gap"],
13007 initial_values: ["normal", "normal normal"],
13012 "calc(1px) calc(1%)",
13024 gCSSProperties["grid-gap"] = {
13025 domProp: "gridGap",
13027 type: CSS_TYPE_TRUE_SHORTHAND,
13029 subproperties: ["column-gap", "row-gap"],
13032 gCSSProperties["contain"] = {
13033 domProp: "contain",
13035 type: CSS_TYPE_LONGHAND,
13036 initial_values: ["none"],
13047 "layout size paint",
13048 "layout paint size",
13049 "size paint layout",
13050 "paint size layout",
13056 "strict layout size",
13060 "layout size strict",
13061 "layout size paint strict",
13067 "content strict size",
13068 "paint layout content",
13069 "layout size content",
13078 if (IsCSSPropertyPrefEnabled("layout.css.initial-letter.enabled")) {
13079 gCSSProperties["initial-letter"] = {
13080 domProp: "initialLetter",
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"],
13090 if (IsCSSPropertyPrefEnabled("layout.css.osx-font-smoothing.enabled")) {
13091 gCSSProperties["-moz-osx-font-smoothing"] = {
13092 domProp: "MozOsxFontSmoothing",
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"],
13105 gCSSProperties["-webkit-font-smoothing"] = {
13106 domProp: "webkitFontSmoothing",
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"],
13119 if (IsCSSPropertyPrefEnabled("layout.css.scroll-anchoring.enabled")) {
13120 gCSSProperties["overflow-anchor"] = {
13121 domProp: "overflowAnchor",
13123 type: CSS_TYPE_LONGHAND,
13124 initial_values: ["auto"],
13125 other_values: ["none"],
13126 invalid_values: [],
13130 if (IsCSSPropertyPrefEnabled("layout.css.overflow-clip-box.enabled")) {
13131 gCSSProperties["overflow-clip-box-block"] = {
13132 domProp: "overflowClipBoxBlock",
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"],
13140 gCSSProperties["overflow-clip-box-inline"] = {
13141 domProp: "overflowClipBoxInline",
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"],
13149 gCSSProperties["overflow-clip-box"] = {
13150 domProp: "overflowClipBox",
13152 type: CSS_TYPE_TRUE_SHORTHAND,
13153 subproperties: ["overflow-clip-box-block", "overflow-clip-box-inline"],
13154 initial_values: ["padding-box"],
13157 "padding-box content-box",
13158 "content-box padding-box",
13159 "content-box content-box",
13164 "content-box none",
13167 "content-box, content-box",
13172 if (IsCSSPropertyPrefEnabled("layout.css.overscroll-behavior.enabled")) {
13173 gCSSProperties["overscroll-behavior-x"] = {
13174 domProp: "overscrollBehaviorX",
13176 type: CSS_TYPE_LONGHAND,
13177 initial_values: ["auto"],
13178 other_values: ["contain", "none"],
13179 invalid_values: ["left", "1px"],
13181 gCSSProperties["overscroll-behavior-y"] = {
13182 domProp: "overscrollBehaviorY",
13184 type: CSS_TYPE_LONGHAND,
13185 initial_values: ["auto"],
13186 other_values: ["contain", "none"],
13187 invalid_values: ["left", "1px"],
13189 gCSSProperties["overscroll-behavior-inline"] = {
13190 domProp: "overscrollBehaviorInline",
13193 type: CSS_TYPE_LONGHAND,
13194 initial_values: ["auto"],
13195 other_values: ["contain", "none"],
13196 invalid_values: ["left", "1px"],
13198 gCSSProperties["overscroll-behavior-block"] = {
13199 domProp: "overscrollBehaviorBlock",
13202 type: CSS_TYPE_LONGHAND,
13203 initial_values: ["auto"],
13204 other_values: ["contain", "none"],
13205 invalid_values: ["left", "1px"],
13207 gCSSProperties["overscroll-behavior"] = {
13208 domProp: "overscrollBehavior",
13210 type: CSS_TYPE_TRUE_SHORTHAND,
13211 subproperties: ["overscroll-behavior-x", "overscroll-behavior-y"],
13212 initial_values: ["auto"],
13220 invalid_values: ["left", "1px", "contain auto none", "contain nonsense"],
13227 "{} scroll no-repeat",
13229 "url(404.png), {}, -moz-element(#a) black",
13232 "{} add no-repeat",
13234 "url(404.png), {}, -moz-element(#a) alpha",
13238 for (const prop of ["background", "mask"]) {
13240 const p = patterns[prop];
13241 for (const v of invalidNonUrlImageValues) {
13242 gCSSProperties[prop].invalid_values.push(
13243 p[i++ % p.length].replace("{}", v)
13246 for (const v of validNonUrlImageValues) {
13247 gCSSProperties[prop].other_values.push(
13248 p[i++ % p.length].replace("{}", v)
13254 gCSSProperties["display"].other_values.push("flow-root");
13256 gCSSProperties["hyphenate-character"] = {
13257 domProp: "hyphenateCharacter",
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",
13271 type: CSS_TYPE_LONGHAND,
13272 initial_values: ["visible"],
13273 other_values: ["auto", "hidden"],
13276 "partially-visible",
13282 if (IsCSSPropertyPrefEnabled("layout.css.contain-intrinsic-size.enabled")) {
13283 gCSSProperties["contain-intrinsic-width"] = {
13284 domProp: "containIntrinsicWidth",
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"],
13291 gCSSProperties["contain-intrinsic-height"] = {
13292 domProp: "containIntrinsicHeight",
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"],
13299 gCSSProperties["contain-intrinsic-block-size"] = {
13300 domProp: "containIntrinsicBlockSize",
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"],
13308 gCSSProperties["contain-intrinsic-inline-size"] = {
13309 domProp: "containIntrinsicInlineSize",
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"],
13318 gCSSProperties["contain-intrinsic-size"] = {
13319 domProp: "containIntrinsicSize",
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"],
13329 if (IsCSSPropertyPrefEnabled("layout.css.anchor-positioning.enabled")) {
13330 gCSSProperties["anchor-name"] = {
13331 domProp: "anchorName",
13333 type: CSS_TYPE_LONGHAND,
13334 initial_values: ["none"],
13335 other_values: ["--foo", "--foo, --baz", "--foo,--baz", "--foo ,--baz"],
13347 gCSSProperties["anchor-scope"] = {
13348 domProp: "anchorScope",
13350 type: CSS_TYPE_LONGHAND,
13351 initial_values: ["none"],
13372 gCSSProperties["position-anchor"] = {
13373 domProp: "positionAnchor",
13375 type: CSS_TYPE_LONGHAND,
13376 initial_values: ["auto"],
13377 other_values: ["--foo"],
13378 invalid_values: ["none", "--foo, auto", "auto, --bar", "foo"],
13381 gCSSProperties["position-area"] = {
13382 domProp: "positionArea",
13384 type: CSS_TYPE_LONGHAND,
13385 initial_values: ["none"],
13399 "span-x-self-start",
13411 "span-y-self-start",
13415 "span-block-start",
13419 "span-inline-start",
13421 "self-block-start",
13423 "span-self-block-start",
13424 "span-self-block-end",
13425 "self-inline-start",
13427 "span-self-inline-start",
13428 "span-self-inline-end",
13439 "span-left bottom",
13440 "span-block-end inline-start",
13441 "span-inline-start block-end",
13442 "self-block-end span-self-inline-start",
13444 "span-start span-end",
13445 "self-end span-self-start",
13453 "inline-start self-block-end",
13454 "span-self-inline-start start",
13455 "end span-self-start",
13459 gCSSProperties["position-try-fallbacks"] = {
13460 domProp: "positionTryFallbacks",
13462 type: CSS_TYPE_LONGHAND,
13463 initial_values: ["none"],
13471 "span-block-start inline-end",
13472 "span-all self-block-end",
13476 invalid_values: ["foo", "none none", "span-y-start self-block-end"],
13479 gCSSProperties["position-try-order"] = {
13480 domProp: "positionTryOrder",
13482 type: CSS_TYPE_LONGHAND,
13483 initial_values: ["normal"],
13488 "most-inline-size",
13490 invalid_values: ["auto", "none", "foo"],
13493 gCSSProperties["position-visibility"] = {
13494 domProp: "positionVisibility",
13496 type: CSS_TYPE_LONGHAND,
13497 initial_values: ["always"],
13498 other_values: ["anchors-valid", "anchors-visible", "no-overflow"],
13502 "always anchors-valid",
13503 "anchors-visible always",
13507 gCSSProperties["position-try"] = {
13508 domProp: "positionTry",
13510 type: CSS_TYPE_TRUE_SHORTHAND,
13511 subproperties: ["position-try-order", "position-try-fallbacks"],
13512 initial_values: ["none"],
13520 "span-block-start inline-end",
13521 "span-all self-block-end",
13524 "most-width --foo",
13525 "most-width flip-block",
13526 "most-width flip-inline",
13527 "most-width flip-start",
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",
13568 "--foo span-y-start self-block-end",
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",
13579 type: CSS_TYPE_LONGHAND,
13580 initial_values: ["default"],
13581 other_values: ["none", "menu", "tooltip", "sheet", "cliprounded"],
13582 invalid_values: [],
13585 gCSSProperties["-moz-window-opacity"] = {
13586 // domProp: "MozWindowOpacity",
13588 type: CSS_TYPE_LONGHAND,
13600 other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"],
13601 invalid_values: ["0px", "1px", "20%", "default", "auto"],
13604 gCSSProperties["-moz-window-transform"] = {
13605 // domProp: "MozWindowTransform",
13607 type: CSS_TYPE_LONGHAND,
13608 prerequisites: { width: "300px", height: "50px" },
13609 initial_values: ["none"],
13613 "translatex(-4px)",
13615 "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
13618 "translate(10px, -3px)",
13622 "rotate(0.25turn)",
13639 "scale(10%, -20%)",
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)",
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))",
13669 "translatez(-4px)",
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%)",
13683 "rotate3d(2, 3, 4, 45deg)",
13684 "rotate3d(-3, 7, 0, 12rad)",
13686 "rotatey(-12grad)",
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%)",
13704 "translate(-3, -4)",
13705 "translatex(1px 1px)",
13706 "translatex(translatex(1px))",
13707 "translatex(#0000ff)",
13710 "matrix(1px, 2px, 3px, 4px, 5px, 6px)",
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)",
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)",
13738 gCSSProperties["-moz-window-transform-origin"] = {
13739 // domProp: "MozWindowTransformOrigin",
13741 type: CSS_TYPE_LONGHAND,
13742 /* no subproperties */
13743 prerequisites: { width: "10px", height: "10px", display: "block" },
13744 initial_values: ["50% 50%", "center", "center center"],
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%)",
13788 "0px calc(0px + rubbish)",
13789 "0px 0px calc(0px + rubbish)",
13795 gCSSProperties["-moz-context-properties"] = {
13796 //domProp: "MozContextProperties",
13798 type: CSS_TYPE_LONGHAND,
13799 initial_values: ["none"],
13804 "fill, stroke, fill",
13820 gCSSProperties["scrollbar-color"] = {
13821 domProp: "scrollbarColor",
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",
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 = [
13845 "linear(0 0% 50%, 1 50% 100%)",
13848 let linear_function_invalid_values = [
13851 "linear(0% 0 100%)",
13854 gCSSProperties["animation-timing-function"].other_values.push(
13855 ...linear_function_other_values
13857 gCSSProperties["animation-timing-function"].invalid_values.push(
13858 ...linear_function_invalid_values
13861 gCSSProperties["transition-timing-function"].other_values.push(
13862 ...linear_function_other_values
13864 gCSSProperties["transition-timing-function"].invalid_values.push(
13865 ...linear_function_invalid_values
13868 gCSSProperties["animation"].other_values.push(
13869 "1s 2s linear(0, 1) bounce",
13870 "4s linear(0, 0.5 25% 75%, 1 100% 100%)"
13874 if (IsCSSPropertyPrefEnabled("layout.css.backdrop-filter.enabled")) {
13875 gCSSProperties["backdrop-filter"] = {
13876 domProp: "backdropFilter",
13878 type: CSS_TYPE_LONGHAND,
13879 initial_values: ["none"],
13880 other_values: gCSSProperties["filter"].other_values,
13881 invalid_values: gCSSProperties["filter"].invalid_values,
13885 gCSSProperties["math-depth"] = {
13886 domProp: "mathDepth",
13888 type: CSS_TYPE_LONGHAND,
13889 initial_values: ["0"],
13891 // auto-add cannot be tested here because it has no effect when the
13892 // inherited math-style is equal to the default (normal).
13898 "add(calc(4 - 2/3))",
13900 invalid_values: ["auto", "1,23", "1.23", "add(1,23)", "add(1.23)"],
13903 gCSSProperties["math-style"] = {
13904 domProp: "mathStyle",
13906 type: CSS_TYPE_LONGHAND,
13907 initial_values: ["normal"],
13908 other_values: ["compact"],
13909 invalid_values: [],
13912 gCSSProperties["forced-color-adjust"] = {
13913 domProp: "forcedColorAdjust",
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",
13925 type: CSS_TYPE_LONGHAND,
13926 applies_to_marker: true,
13927 initial_values: ["replace"],
13933 "replace, add, accumulate",
13935 invalid_values: ["all", "none"],
13939 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.animations")) {
13940 Object.assign(gCSSProperties, {
13941 "-moz-animation": {
13942 domProp: "MozAnimation",
13944 type: CSS_TYPE_TRUE_SHORTHAND,
13945 applies_to_marker: true,
13946 alias_for: "animation",
13949 "animation-duration",
13950 "animation-timing-function",
13952 "animation-direction",
13953 "animation-fill-mode",
13954 "animation-iteration-count",
13955 "animation-play-state",
13958 "-moz-animation-delay": {
13959 domProp: "MozAnimationDelay",
13961 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13962 applies_to_marker: true,
13963 alias_for: "animation-delay",
13964 subproperties: ["animation-delay"],
13966 "-moz-animation-direction": {
13967 domProp: "MozAnimationDirection",
13969 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13970 applies_to_marker: true,
13971 alias_for: "animation-direction",
13972 subproperties: ["animation-direction"],
13974 "-moz-animation-duration": {
13975 domProp: "MozAnimationDuration",
13977 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13978 applies_to_marker: true,
13979 alias_for: "animation-duration",
13980 subproperties: ["animation-duration"],
13982 "-moz-animation-fill-mode": {
13983 domProp: "MozAnimationFillMode",
13985 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13986 applies_to_marker: true,
13987 alias_for: "animation-fill-mode",
13988 subproperties: ["animation-fill-mode"],
13990 "-moz-animation-iteration-count": {
13991 domProp: "MozAnimationIterationCount",
13993 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13994 applies_to_marker: true,
13995 alias_for: "animation-iteration-count",
13996 subproperties: ["animation-iteration-count"],
13998 "-moz-animation-name": {
13999 domProp: "MozAnimationName",
14001 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14002 applies_to_marker: true,
14003 alias_for: "animation-name",
14004 subproperties: ["animation-name"],
14006 "-moz-animation-play-state": {
14007 domProp: "MozAnimationPlayState",
14009 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14010 applies_to_marker: true,
14011 alias_for: "animation-play-state",
14012 subproperties: ["animation-play-state"],
14014 "-moz-animation-timing-function": {
14015 domProp: "MozAnimationTimingFunction",
14017 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14018 applies_to_marker: true,
14019 alias_for: "animation-timing-function",
14020 subproperties: ["animation-timing-function"],
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",
14037 type: CSS_TYPE_LONGHAND,
14038 applies_to_marker: true,
14039 initial_values: ["auto"],
14046 "--bounce, --bubble, --opacity",
14059 "scroll(inline nearest)",
14066 "view(inline auto)",
14067 "view(y auto auto)",
14069 "view(1px 1% block)",
14073 "--bounce, initial",
14074 "initial, --bounce",
14075 "--bounce, inherit",
14076 "inherit, --bounce",
14082 gCSSProperties["scroll-timeline-name"] = {
14083 domProp: "scrollTimelineName",
14085 type: CSS_TYPE_LONGHAND,
14086 initial_values: ["none"],
14099 invalid_values: ["abc", "abc --bounce", "10px", "rgb(1, 2, 3)"],
14102 gCSSProperties["scroll-timeline-axis"] = {
14103 domProp: "scrollTimelineAxis",
14105 type: CSS_TYPE_LONGHAND,
14106 initial_values: ["block"],
14107 other_values: ["inline", "x", "y"],
14108 invalid_values: ["auto", "none", "abc", "horizontal"],
14111 gCSSProperties["scroll-timeline"] = {
14112 domProp: "scrollTimeline",
14114 type: CSS_TYPE_TRUE_SHORTHAND,
14115 subproperties: ["scroll-timeline-name", "scroll-timeline-axis"],
14116 initial_values: ["none block", "none"],
14121 "--\\32bounce inline",
14123 "--\\32 0bounce y",
14124 "--\\32 0bounce x",
14126 "--a block, --b inline, --c y",
14128 invalid_values: ["", "--bounce --bounce", "x --a", "block --abc"],
14131 gCSSProperties["view-timeline-name"] = {
14132 domProp: "viewTimelineName",
14134 type: CSS_TYPE_LONGHAND,
14135 initial_values: ["none"],
14150 invalid_values: ["abc", "abc --bounce", "10px", "rgb(1, 2, 3)"],
14153 gCSSProperties["view-timeline-axis"] = {
14154 domProp: "viewTimelineAxis",
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"],
14162 gCSSProperties["view-timeline-inset"] = {
14163 domProp: "viewTimelineInset",
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"],
14171 gCSSProperties["view-timeline"] = {
14172 domProp: "viewTimeline",
14174 type: CSS_TYPE_TRUE_SHORTHAND,
14175 subproperties: ["view-timeline-name", "view-timeline-axis"],
14176 initial_values: ["none block", "none"],
14181 "--\\32bounce inline",
14183 "--\\32 0bounce y",
14184 "--\\32 0bounce x",
14186 "--a block, --b inline, --c y",
14188 invalid_values: ["", ",", "--abc --abc", "x --a", "block --abc"],
14192 gCSSProperties["scrollbar-gutter"] = {
14193 domProp: "scrollbarGutter",
14195 type: CSS_TYPE_LONGHAND,
14196 initial_values: ["auto"],
14197 other_values: ["stable", "stable both-edges", "both-edges stable"],
14203 // The following values are from scrollbar-gutter extension in CSS
14204 // Overflow 4 https://drafts.csswg.org/css-overflow-4/#sbg-ext.
14206 "always both-edges",
14208 "always both-edges force",
14209 "stable both-edges force",
14214 if (IsCSSPropertyPrefEnabled("layout.css.text-wrap-balance.enabled")) {
14215 gCSSProperties["text-wrap-style"] = {
14216 domProp: "textWrapStyle",
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"],
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",
14238 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14239 alias_for: "transform",
14240 subproperties: ["transform"],
14242 "-moz-transform-origin": {
14243 domProp: "MozTransformOrigin",
14245 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14246 alias_for: "transform-origin",
14247 subproperties: ["transform-origin"],
14249 "-moz-perspective-origin": {
14250 domProp: "MozPerspectiveOrigin",
14252 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14253 alias_for: "perspective-origin",
14254 subproperties: ["perspective-origin"],
14256 "-moz-perspective": {
14257 domProp: "MozPerspective",
14259 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14260 alias_for: "perspective",
14261 subproperties: ["perspective"],
14263 "-moz-backface-visibility": {
14264 domProp: "MozBackfaceVisibility",
14266 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14267 alias_for: "backface-visibility",
14268 subproperties: ["backface-visibility"],
14270 "-moz-transform-style": {
14271 domProp: "MozTransformStyle",
14273 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14274 alias_for: "transform-style",
14275 subproperties: ["transform-style"],
14280 if (IsCSSPropertyPrefEnabled("layout.css.zoom.enabled")) {
14281 Object.assign(gCSSProperties, {
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%"],
14293 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transitions")) {
14294 Object.assign(gCSSProperties, {
14295 "-moz-transition": {
14296 domProp: "MozTransition",
14298 type: CSS_TYPE_TRUE_SHORTHAND,
14299 applies_to_marker: true,
14300 alias_for: "transition",
14302 "transition-property",
14303 "transition-duration",
14304 "transition-timing-function",
14305 "transition-delay",
14308 "-moz-transition-delay": {
14309 domProp: "MozTransitionDelay",
14311 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14312 applies_to_marker: true,
14313 alias_for: "transition-delay",
14314 subproperties: ["transition-delay"],
14316 "-moz-transition-duration": {
14317 domProp: "MozTransitionDuration",
14319 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14320 applies_to_marker: true,
14321 alias_for: "transition-duration",
14322 subproperties: ["transition-duration"],
14324 "-moz-transition-property": {
14325 domProp: "MozTransitionProperty",
14327 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14328 applies_to_marker: true,
14329 alias_for: "transition-property",
14330 subproperties: ["transition-property"],
14332 "-moz-transition-timing-function": {
14333 domProp: "MozTransitionTimingFunction",
14335 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14336 applies_to_marker: true,
14337 alias_for: "transition-timing-function",
14338 subproperties: ["transition-timing-function"],
14343 if (IsCSSPropertyPrefEnabled("layout.css.transition-behavior.enabled")) {
14344 Object.assign(gCSSProperties, {
14345 "transition-behavior": {
14346 domProp: "transitionBehavior",
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"],
14356 gCSSProperties["transition"].subproperties.push("transition-behavior");
14357 gCSSProperties["transition"].initial_values.push("normal");
14358 gCSSProperties["transition"].other_values.push(
14360 "width allow-discrete",
14361 "1s allow-discrete",
14362 "linear allow-discrete"
14364 gCSSProperties["-webkit-transition"].subproperties.push(
14365 "transition-behavior"
14368 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transitions")) {
14369 gCSSProperties["-moz-transition"].subproperties.push("transition-behavior");
14373 if (IsCSSPropertyPrefEnabled("layout.css.field-sizing.enabled")) {
14374 Object.assign(gCSSProperties, {
14376 domProp: "fieldSizing",
14378 type: CSS_TYPE_LONGHAND,
14379 initial_values: ["fixed"],
14380 other_values: ["content"],
14381 invalid_values: ["none", "auto"],
14386 if (IsCSSPropertyPrefEnabled("dom.viewTransitions.enabled")) {
14387 Object.assign(gCSSProperties, {
14388 "view-transition-name": {
14389 domProp: "viewTransitionName",
14391 type: CSS_TYPE_LONGHAND,
14392 initial_values: ["none"],
14407 invalid_values: ["auto", "abc --bounce", "10px", "rgb(1, 2, 3)"],
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
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) {
14424 "' alias_for field, '" +
14427 "must be set to a recognized CSS property in gCSSProperties"
14430 // Copy 'values' fields & 'prerequisites' field from aliasTargetEntry:
14431 var fieldsToCopy = [
14436 "unbalanced_values",
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];