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%"],
2959 type: CSS_TYPE_LONGHAND,
2960 initial_values: ["none"],
2961 other_values: ["path('')", "path(' ')"].concat(pathValues.other_values),
2962 invalid_values: pathValues.invalid_values,
2964 "-moz-float-edge": {
2965 domProp: "MozFloatEdge",
2967 type: CSS_TYPE_LONGHAND,
2968 initial_values: ["content-box"],
2969 other_values: ["margin-box"],
2970 invalid_values: ["content", "padding", "border", "margin"],
2972 "-moz-force-broken-image-icon": {
2973 domProp: "MozForceBrokenImageIcon",
2975 type: CSS_TYPE_LONGHAND,
2976 initial_values: ["0"],
2977 other_values: ["1"],
2981 domProp: "marginInline",
2983 type: CSS_TYPE_TRUE_SHORTHAND,
2984 subproperties: ["margin-inline-start", "margin-inline-end"],
2985 initial_values: ["0", "0px 0em"],
2993 "calc(3*25px) calc(2px)",
2995 "calc(3*25px + 50%) calc(3*25px - 50%)",
3013 "margin-inline-end": {
3014 domProp: "marginInlineEnd",
3016 type: CSS_TYPE_LONGHAND,
3017 applies_to_first_letter: true,
3019 /* no subproperties */
3020 /* auto may or may not be initial */
3039 "calc(3*25px + 50%)",
3057 "margin-inline-start": {
3058 domProp: "marginInlineStart",
3060 type: CSS_TYPE_LONGHAND,
3061 applies_to_first_letter: true,
3063 /* no subproperties */
3064 /* auto may or may not be initial */
3083 "calc(3*25px + 50%)",
3104 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3105 /* FIXME: All mask-border-* should be added when we implement them. */
3127 "0% 0% / auto auto",
3133 "top left / auto none",
3134 "left top / auto none",
3135 "top left / auto auto none",
3136 "match-source none repeat add top left",
3137 "top left repeat none add",
3138 "none repeat add top left / auto",
3139 "top left / auto repeat none add match-source",
3140 "none repeat add 0% 0% / auto auto match-source",
3142 "border-box border-box",
3145 "none alpha repeat add left top",
3146 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3147 "no-repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') alpha left top add",
3151 "none repeat-y alpha add 0% 0%",
3153 "0% top subtract alpha repeat none",
3162 "10em / calc(20px)",
3163 "top left / 100px 100px",
3164 "top left / 100px auto",
3165 "top left / 100px 10%",
3166 "top left / 100px calc(20px)",
3167 "bottom right add none alpha repeat",
3172 "radial-gradient(at 10% bottom, #ffffff, black) add no-repeat",
3173 "repeating-radial-gradient(at 10% bottom, #ffffff, black) no-repeat",
3174 "-moz-element(#test) alpha",
3175 /* multiple mask-image */
3176 "url(404.png), url(404.png)",
3177 "repeat-x, subtract, none",
3178 "0% top url(404.png), url(404.png) 50% top",
3179 "subtract repeat-y top left url(404.png), repeat-x alpha",
3180 "top left / contain, bottom right / cover",
3181 /* test cases with clip+origin in the shorthand */
3182 "url(404.png) alpha padding-box",
3183 "url(404.png) border-box alpha",
3184 "content-box url(404.png)",
3185 "url(404.png) alpha padding-box padding-box",
3186 "url(404.png) alpha padding-box border-box",
3187 "content-box border-box url(404.png)",
3188 "alpha padding-box url(404.png) border-box",
3189 "alpha padding-box url(404.png) padding-box",
3192 /* mixes with keywords have to be in correct order */
3195 /* no quirks mode colors */
3196 "radial-gradient(at 10% bottom, ffffff, black) add no-repeat",
3197 /* no quirks mode lengths */
3198 "linear-gradient(red -99, yellow, green, blue 120%)",
3199 /* bug 258080: don't accept background-position separated */
3200 "left url(404.png) top",
3201 "top url(404.png) left",
3202 "-moz-element(#a rubbish)",
3203 "left top / match-source",
3207 domProp: "maskClip",
3209 type: CSS_TYPE_LONGHAND,
3210 initial_values: ["border-box"],
3218 "border-box, padding-box",
3219 "padding-box, padding-box, padding-box",
3220 "border-box, border-box",
3222 invalid_values: ["content-box content-box", "margin-box"],
3225 domProp: "maskComposite",
3227 type: CSS_TYPE_LONGHAND,
3228 initial_values: ["add"],
3234 "subtract, intersect",
3235 "subtract, subtract, add",
3237 invalid_values: ["add subtract", "intersect exclude"],
3240 domProp: "maskImage",
3242 type: CSS_TYPE_LONGHAND,
3243 initial_values: ["none"],
3245 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3246 "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
3247 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
3249 "none, none, none, none, none",
3251 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
3252 "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
3253 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3254 ].concat(validNonUrlImageValues),
3255 invalid_values: [].concat(invalidNonUrlImageValues),
3256 unbalanced_values: [].concat(unbalancedGradientAndElementValues),
3259 domProp: "maskMode",
3261 type: CSS_TYPE_LONGHAND,
3262 initial_values: ["match-source"],
3266 "match-source, match-source",
3267 "match-source, alpha",
3268 "alpha, luminance, match-source",
3270 invalid_values: ["match-source match-source", "alpha match-source"],
3273 domProp: "maskOrigin",
3275 type: CSS_TYPE_LONGHAND,
3276 initial_values: ["border-box"],
3283 "border-box, padding-box",
3284 "padding-box, padding-box, padding-box",
3285 "border-box, border-box",
3287 invalid_values: ["padding-box padding-box", "no-clip", "margin-box"],
3290 domProp: "maskPosition",
3292 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3318 "top left, top left",
3319 "top left, top right",
3320 "top right, top left",
3322 "10% 20%, 30%, 40%",
3323 "top left, bottom right",
3324 "right bottom, left top",
3328 "0%, 10%, 20%, 30%",
3329 "top, top, top, top, top",
3335 "calc(20px) calc(20px)",
3336 "calc(20px + 1em) calc(20px / 2)",
3337 "calc(20px + 50%) calc(50% - 10px)",
3338 "calc(-20px) calc(-50%)",
3339 "calc(-20%) calc(-50%)",
3341 "right 20px top 60px",
3342 "right 20px bottom 60px",
3343 "left 20px top 60px",
3344 "left 20px bottom 60px",
3345 "right -50px top -50px",
3346 "left -50px bottom -50px",
3347 "right 20px top -50px",
3348 "right -20px top 50px",
3349 "right 3em bottom 10px",
3350 "bottom 3em right 10px",
3351 "top 3em right 10px",
3357 subproperties: ["mask-position-x", "mask-position-y"],
3359 "center 10px center 4px",
3360 "center 10px center",
3370 "top 20px bottom 20px",
3372 "0px calc(0px + rubbish)",
3377 "mask-position-x": {
3378 domProp: "maskPositionX",
3380 type: CSS_TYPE_LONGHAND,
3381 initial_values: ["left", "0%"],
3393 "50%, 10%, 20%, 30%",
3394 "center, center, center, center, center",
3424 "top, top, top, top, top",
3425 "calc(0px + rubbish)",
3429 "mask-position-y": {
3430 domProp: "maskPositionY",
3432 type: CSS_TYPE_LONGHAND,
3433 initial_values: ["top", "0%"],
3445 "50%, 10%, 20%, 30%",
3446 "center, center, center, center, center",
3476 "left, left, left, left, left",
3477 "calc(0px + rubbish)",
3482 domProp: "maskRepeat",
3484 type: CSS_TYPE_LONGHAND,
3485 initial_values: ["repeat", "repeat repeat"],
3490 "repeat-x, repeat-x",
3491 "repeat, no-repeat",
3492 "repeat-y, no-repeat, repeat-y",
3493 "repeat, repeat, repeat",
3496 "no-repeat no-repeat",
3498 "no-repeat no-repeat, no-repeat no-repeat",
3501 "repeat repeat repeat",
3502 "repeat-x repeat-y",
3510 domProp: "maskSize",
3512 type: CSS_TYPE_LONGHAND,
3513 initial_values: ["auto", "auto auto"],
3528 "calc(20px) calc(20px)",
3529 "calc(20px + 1em) calc(20px / 2)",
3530 "calc(20px + 50%) calc(50% - 10px)",
3531 "calc(-20px) calc(-50%)",
3532 "calc(-20%) calc(-50%)",
3546 "10px calc(10px + rubbish)",
3550 domProp: "maskType",
3552 type: CSS_TYPE_LONGHAND,
3553 initial_values: ["luminance"],
3554 other_values: ["alpha"],
3557 "padding-inline-end": {
3558 domProp: "paddingInlineEnd",
3560 type: CSS_TYPE_LONGHAND,
3561 applies_to_first_letter: true,
3562 // No applies_to_placeholder because we have a !important rule in forms.css.
3564 /* no subproperties */
3584 "calc(3*25px + 50%)",
3586 invalid_values: ["5"],
3588 "padding-inline-start": {
3589 domProp: "paddingInlineStart",
3591 type: CSS_TYPE_LONGHAND,
3592 applies_to_first_letter: true,
3593 // No applies_to_placeholder because we have a !important rule in forms.css.
3595 /* no subproperties */
3615 "calc(3*25px + 50%)",
3617 invalid_values: ["5"],
3622 type: CSS_TYPE_LONGHAND,
3623 // No applies_to_placeholder because we have a !important rule in forms.css.
3624 prerequisites: { display: "block", overflow: "auto" },
3625 initial_values: ["none"],
3626 other_values: ["both", "horizontal", "vertical", "inline", "block"],
3632 type: CSS_TYPE_LONGHAND,
3633 initial_values: ["8"],
3656 "-moz-text-size-adjust": {
3657 domProp: "MozTextSizeAdjust",
3659 type: CSS_TYPE_LONGHAND,
3660 initial_values: ["auto"],
3661 other_values: ["none"],
3662 invalid_values: ["-5%", "0", "100", "0%", "50%", "100%", "220.3%"],
3665 domProp: "transform",
3667 type: CSS_TYPE_LONGHAND,
3668 prerequisites: { width: "300px", height: "50px" },
3669 initial_values: ["none"],
3675 "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
3678 "translate(10px, -3px)",
3712 "rotate(45deg) scale(2, 1)",
3713 "skewx(45deg) skewx(-50grad)",
3714 "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
3718 "translate(3%, 5px)",
3719 "translate(5px, 3%)",
3720 "matrix(1, 2, 3, 4, 5, 6)",
3721 /* valid calc() values */
3722 "translatex(calc(5px + 10%))",
3723 "translatey(calc(0.25 * 5px + 10% / 3))",
3724 "translate(calc(5px - 10% * 3))",
3725 "translate(calc(5px - 3 * 10%), 50px)",
3726 "translate(-50px, calc(5px - 10% * 3))",
3727 "translate(10px, calc(min(5px,10%)))",
3728 "translate(calc(max(5px,10%)), 10%)",
3729 "translate(max(5px,10%), 10%)",
3734 "translatez(2px) translatez(5px)",
3735 "translate3d(3px, 4px, 5px)",
3736 "translate3d(2em, 3px, 1em)",
3737 "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
3739 "scale3d(4%, 4%, 4%)",
3740 "scale3d(-2, 3, -7)",
3741 "scale3d(-2%, 3%, -7%)",
3746 "rotate3d(2, 3, 4, 45deg)",
3747 "rotate3d(-3, 7, 0, 12rad)",
3751 "rotatex(0.125turn)",
3752 "rotate3d(0, 0, 0, 0rad)",
3754 "perspective(1000px)",
3755 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
3765 "translate(-3, -4)",
3766 "translatex(1px 1px)",
3767 "translatex(translatex(1px))",
3768 "translatex(#0000ff)",
3771 "matrix(1px, 2px, 3px, 4px, 5px, 6px)",
3773 "matrix(1%, 0, 0, 0, 0px, 0px)",
3774 "matrix(0, 1%, 2, 3, 4px,5px)",
3775 "matrix(0, 1, 2%, 3, 4px, 5px)",
3776 "matrix(0, 1, 2, 3%, 4%, 5%)",
3777 "matrix(1, 2, 3, 4, 5px, 6%)",
3778 "matrix(1, 2, 3, 4, 5%, 6px)",
3779 "matrix(1, 2, 3, 4, 5%, 6%)",
3780 "matrix(1, 2, 3, 4, 5px, 6em)",
3781 /* invalid calc() values */
3782 "translatey(-moz-min(5px,10%))",
3783 "translatex(-moz-max(5px,10%))",
3784 "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
3785 "perspective(-10px)",
3786 "matrix3d(dinosaur)",
3787 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
3788 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
3789 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
3790 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
3793 "translate3d(3px, 4px, 1px, 7px)",
3794 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
3795 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)",
3799 domProp: "transformBox",
3801 type: CSS_TYPE_LONGHAND,
3802 initial_values: ["view-box"],
3803 other_values: ["fill-box", "border-box"],
3804 invalid_values: ["padding-box", "margin-box"],
3806 "transform-origin": {
3807 domProp: "transformOrigin",
3809 type: CSS_TYPE_LONGHAND,
3810 /* no subproperties */
3811 prerequisites: { width: "10px", height: "10px", display: "block" },
3812 initial_values: ["50% 50%", "center", "center center"],
3840 "calc(20px) calc(20px)",
3841 "calc(20px + 1em) calc(20px / 2)",
3842 "calc(20px + 50%) calc(50% - 10px)",
3843 "calc(-20px) calc(-50%)",
3844 "calc(-20%) calc(-50%)",
3858 "0px calc(0px + rubbish)",
3859 "0px 0px calc(0px + rubbish)",
3862 "perspective-origin": {
3863 domProp: "perspectiveOrigin",
3865 type: CSS_TYPE_LONGHAND,
3866 /* no subproperties */
3867 prerequisites: { width: "10px", height: "10px", display: "block" },
3868 initial_values: ["50% 50%", "center", "center center"],
3896 "calc(20px) calc(20px)",
3897 "calc(20px + 1em) calc(20px / 2)",
3898 "calc(20px + 50%) calc(50% - 10px)",
3899 "calc(-20px) calc(-50%)",
3900 "calc(-20%) calc(-50%)",
3915 domProp: "perspective",
3917 type: CSS_TYPE_LONGHAND,
3918 initial_values: ["none"],
3919 other_values: ["1000px", "500.2px", "0", "0px"],
3920 invalid_values: ["pants", "200", "-100px", "-27.2em"],
3922 "backface-visibility": {
3923 domProp: "backfaceVisibility",
3925 type: CSS_TYPE_LONGHAND,
3926 initial_values: ["visible"],
3927 other_values: ["hidden"],
3928 invalid_values: ["collapse"],
3930 "transform-style": {
3931 domProp: "transformStyle",
3933 type: CSS_TYPE_LONGHAND,
3934 initial_values: ["flat"],
3935 other_values: ["preserve-3d"],
3938 "-moz-user-input": {
3939 domProp: "MozUserInput",
3941 type: CSS_TYPE_LONGHAND,
3942 initial_values: ["auto"],
3943 other_values: ["none"],
3946 "-moz-user-modify": {
3947 domProp: "MozUserModify",
3949 type: CSS_TYPE_LONGHAND,
3950 initial_values: ["read-only"],
3951 other_values: ["read-write", "write-only"],
3954 "-moz-user-select": {
3955 domProp: "MozUserSelect",
3957 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3958 alias_for: "user-select",
3959 subproperties: ["user-select"],
3962 domProp: "userSelect",
3964 type: CSS_TYPE_LONGHAND,
3965 initial_values: ["auto"],
3966 other_values: ["none", "text", "all", "-moz-none"],
3970 domProp: "background",
3972 type: CSS_TYPE_TRUE_SHORTHAND,
3974 "background-attachment",
3977 "background-position-x",
3978 "background-position-y",
3979 "background-repeat",
3981 "background-origin",
3995 "0% 0% / auto auto",
4002 "left top / auto none",
4003 "left top / auto auto none",
4004 "transparent none repeat scroll top left",
4005 "left top repeat none scroll transparent",
4006 "transparent none repeat scroll top left / auto",
4007 "left top / auto repeat none scroll transparent",
4008 "none repeat scroll 0% 0% / auto auto transparent",
4009 "padding-box border-box",
4012 /* without multiple backgrounds */
4014 "none green repeat scroll left top",
4015 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4016 "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll",
4020 "none repeat-y transparent scroll 0% 0%",
4022 "0% top transparent fixed repeat none",
4031 "10em / calc(20px)",
4032 "top left / 100px 100px",
4033 "top left / 100px auto",
4034 "top left / 100px 10%",
4035 "top left / 100px calc(20px)",
4036 "bottom right 8px scroll none transparent repeat",
4040 "radial-gradient(at 10% bottom, #ffffff, black) scroll no-repeat",
4041 "repeating-radial-gradient(at 10% bottom, #ffffff, black) scroll no-repeat",
4042 "-moz-element(#test) lime",
4043 /* multiple backgrounds */
4044 "url(404.png), url(404.png)",
4045 "url(404.png), url(404.png) transparent",
4046 "url(404.png), url(404.png) red",
4047 "repeat-x, fixed, none",
4048 "0% top url(404.png), url(404.png) 0% top",
4049 "fixed repeat-y top left url(404.png), repeat-x green",
4050 "top left / contain, bottom right / cover",
4051 /* test cases with clip+origin in the shorthand */
4052 "url(404.png) green padding-box",
4053 "url(404.png) border-box transparent",
4054 "content-box url(404.png) blue",
4055 "url(404.png) green padding-box padding-box",
4056 "url(404.png) green padding-box border-box",
4057 "content-box border-box url(404.png) blue",
4058 "url(404.png) green padding-box text",
4059 "content-box text url(404.png) blue",
4060 /* clip and origin separated in the shorthand */
4061 "url(404.png) padding-box green border-box",
4062 "url(404.png) padding-box green padding-box",
4063 "transparent padding-box url(404.png) border-box",
4064 "transparent padding-box url(404.png) padding-box",
4070 /* mixes with keywords have to be in correct order */
4073 /* no quirks mode colors */
4074 "radial-gradient(at 10% bottom, ffffff, black) scroll no-repeat",
4075 /* no quirks mode lengths */
4076 "linear-gradient(red -99, yellow, green, blue 120%)",
4077 /* bug 258080: don't accept background-position separated */
4078 "left url(404.png) top",
4079 "top url(404.png) left",
4080 /* not allowed to have color in non-bottom layer */
4081 "url(404.png) transparent, url(404.png)",
4082 "url(404.png) red, url(404.png)",
4083 "url(404.png) transparent, url(404.png) transparent",
4084 "url(404.png) transparent red, url(404.png) transparent red",
4085 "url(404.png) red, url(404.png) red",
4086 "url(404.png) rgba(0, 0, 0, 0), url(404.png)",
4087 "url(404.png) rgb(255, 0, 0), url(404.png)",
4088 "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)",
4089 "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)",
4090 "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)",
4091 /* error inside functions */
4092 "-moz-element(#a rubbish) black",
4093 "content-box text text",
4094 "padding-box text url(404.png) text",
4097 "background-attachment": {
4098 domProp: "backgroundAttachment",
4100 type: CSS_TYPE_LONGHAND,
4101 applies_to_first_letter: true,
4102 applies_to_first_line: true,
4103 applies_to_placeholder: true,
4104 applies_to_cue: true,
4105 initial_values: ["scroll"],
4111 "scroll, fixed, local, scroll",
4116 "background-blend-mode": {
4117 domProp: "backgroundBlendMode",
4119 type: CSS_TYPE_LONGHAND,
4120 applies_to_first_letter: true,
4121 applies_to_first_line: true,
4122 applies_to_placeholder: true,
4123 applies_to_cue: true,
4124 initial_values: ["normal"],
4142 invalid_values: ["none", "10px", "multiply multiply", "plus-lighter"],
4144 "background-clip": {
4146 * When we rename this to 'background-clip', we also
4147 * need to rename the values to match the spec.
4149 domProp: "backgroundClip",
4151 type: CSS_TYPE_LONGHAND,
4152 applies_to_first_letter: true,
4153 applies_to_first_line: true,
4154 applies_to_placeholder: true,
4155 applies_to_cue: true,
4156 initial_values: ["border-box"],
4160 "border-box, padding-box",
4161 "padding-box, padding-box, padding-box",
4162 "border-box, border-box",
4164 "content-box, text",
4170 "border-box border-box",
4177 "background-color": {
4178 domProp: "backgroundColor",
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: ["transparent", "rgba(0, 0, 0, 0)"],
4192 "rgba(255,255,0,3)",
4193 "hsl(240, 50%, 50%)",
4194 "rgb(50%, 50%, 50%)",
4195 "-moz-default-background-color",
4196 "rgb(100, 100.0, 100)",
4197 "rgba(255, 127, 15, 0)",
4198 "hsla(240, 97%, 50%, 0.0)",
4199 "rgba(255,255,255,-3.7)",
4207 "rgb(100, 100%, 100)",
4209 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4211 "background-image": {
4212 domProp: "backgroundImage",
4214 type: CSS_TYPE_LONGHAND,
4215 applies_to_first_letter: true,
4216 applies_to_first_line: true,
4217 applies_to_placeholder: true,
4218 applies_to_cue: true,
4219 initial_values: ["none"],
4221 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4222 "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
4223 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
4225 "none, none, none, none, none",
4226 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
4227 "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
4228 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4229 ].concat(validNonUrlImageValues),
4230 invalid_values: [].concat(invalidNonUrlImageValues),
4231 unbalanced_values: [].concat(unbalancedGradientAndElementValues),
4233 "background-origin": {
4234 domProp: "backgroundOrigin",
4236 type: CSS_TYPE_LONGHAND,
4237 applies_to_first_letter: true,
4238 applies_to_first_line: true,
4239 applies_to_placeholder: true,
4240 applies_to_cue: true,
4241 initial_values: ["padding-box"],
4245 "border-box, padding-box",
4246 "padding-box, padding-box, padding-box",
4247 "border-box, border-box",
4251 "padding-box padding-box",
4258 "background-position": {
4259 domProp: "backgroundPosition",
4261 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4262 applies_to_first_letter: true,
4263 applies_to_first_line: true,
4264 applies_to_placeholder: true,
4265 applies_to_cue: true,
4292 "top left, top left",
4293 "top left, top right",
4294 "top right, top left",
4296 "10% 20%, 30%, 40%",
4297 "top left, bottom right",
4298 "right bottom, left top",
4302 "0%, 10%, 20%, 30%",
4303 "top, top, top, top, top",
4309 "calc(20px) calc(20px)",
4310 "calc(20px + 1em) calc(20px / 2)",
4311 "calc(20px + 50%) calc(50% - 10px)",
4312 "calc(-20px) calc(-50%)",
4313 "calc(-20%) calc(-50%)",
4315 "right 20px top 60px",
4316 "right 20px bottom 60px",
4317 "left 20px top 60px",
4318 "left 20px bottom 60px",
4319 "right -50px top -50px",
4320 "left -50px bottom -50px",
4321 "right 20px top -50px",
4322 "right -20px top 50px",
4323 "right 3em bottom 10px",
4324 "bottom 3em right 10px",
4325 "top 3em right 10px",
4333 subproperties: ["background-position-x", "background-position-y"],
4335 "center 10px center 4px",
4336 "center 10px center",
4346 "top 20px bottom 20px",
4348 "0px calc(0px + rubbish)",
4351 "20 20": "20px 20px",
4352 "10 5px": "10px 5px",
4356 "background-position-x": {
4357 domProp: "backgroundPositionX",
4359 type: CSS_TYPE_LONGHAND,
4360 applies_to_first_letter: true,
4361 applies_to_first_line: true,
4362 applies_to_placeholder: true,
4363 applies_to_cue: true,
4364 initial_values: ["left 0%", "left", "0%"],
4376 "0%, 10%, 20%, 30%",
4377 "left, left, left, left, left",
4407 "top, top, top, top, top",
4408 "calc(0px + rubbish)",
4411 "background-position-y": {
4412 domProp: "backgroundPositionY",
4414 type: CSS_TYPE_LONGHAND,
4415 applies_to_first_letter: true,
4416 applies_to_first_line: true,
4417 applies_to_placeholder: true,
4418 applies_to_cue: true,
4419 initial_values: ["top 0%", "top", "0%"],
4431 "0%, 10%, 20%, 30%",
4432 "top, top, top, top, top",
4462 "left, left, left, left, left",
4463 "calc(0px + rubbish)",
4466 "background-repeat": {
4467 domProp: "backgroundRepeat",
4469 type: CSS_TYPE_LONGHAND,
4470 applies_to_first_letter: true,
4471 applies_to_first_line: true,
4472 applies_to_placeholder: true,
4473 applies_to_cue: true,
4474 initial_values: ["repeat", "repeat repeat"],
4479 "repeat-x, repeat-x",
4480 "repeat, no-repeat",
4481 "repeat-y, no-repeat, repeat-y",
4482 "repeat, repeat, repeat",
4485 "no-repeat no-repeat",
4486 "repeat repeat, repeat repeat",
4488 "round repeat, repeat-x",
4489 "round no-repeat, repeat-y",
4492 "space repeat, repeat-x",
4493 "space no-repeat, repeat-y",
4498 "repeat repeat repeat",
4499 "repeat-x repeat-y",
4504 "round round round",
4509 "space space space",
4516 "background-size": {
4517 domProp: "backgroundSize",
4519 type: CSS_TYPE_LONGHAND,
4520 applies_to_first_letter: true,
4521 applies_to_first_line: true,
4522 applies_to_placeholder: true,
4523 applies_to_cue: true,
4524 initial_values: ["auto", "auto auto"],
4539 "calc(20px) calc(20px)",
4540 "calc(20px + 1em) calc(20px / 2)",
4541 "calc(20px + 50%) calc(50% - 10px)",
4542 "calc(-20px) calc(-50%)",
4543 "calc(-20%) calc(-50%)",
4557 "10px calc(10px + rubbish)",
4563 type: CSS_TYPE_TRUE_SHORTHAND,
4565 "border-bottom-color",
4566 "border-bottom-style",
4567 "border-bottom-width",
4568 "border-left-color",
4569 "border-left-style",
4570 "border-left-width",
4571 "border-right-color",
4572 "border-right-style",
4573 "border-right-width",
4577 "border-image-source",
4578 "border-image-slice",
4579 "border-image-width",
4580 "border-image-outset",
4581 "border-image-repeat",
4588 "none medium currentcolor",
4589 "calc(4px - 1px) none",
4597 "calc(2px) solid blue",
4599 invalid_values: ["5%", "medium solid ff00ff", "5 solid green"],
4602 domProp: "borderBottom",
4604 type: CSS_TYPE_TRUE_SHORTHAND,
4606 "border-bottom-color",
4607 "border-bottom-style",
4608 "border-bottom-width",
4615 "none medium currentcolor",
4626 invalid_values: ["5%", "5", "5 solid green"],
4628 "border-bottom-color": {
4629 domProp: "borderBottomColor",
4631 type: CSS_TYPE_LONGHAND,
4632 applies_to_first_letter: true,
4633 prerequisites: { color: "black" },
4634 initial_values: ["currentColor"],
4635 other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4636 invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4637 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4639 "border-bottom-style": {
4640 domProp: "borderBottomStyle",
4642 type: CSS_TYPE_LONGHAND,
4643 applies_to_first_letter: true,
4644 /* XXX hidden is sometimes the same as initial */
4645 initial_values: ["none"],
4658 "border-bottom-width": {
4659 domProp: "borderBottomWidth",
4661 type: CSS_TYPE_LONGHAND,
4662 applies_to_first_letter: true,
4663 prerequisites: { "border-bottom-style": "solid" },
4664 initial_values: ["medium", "3px", "calc(4px - 1px)"],
4677 "calc(3*25px + 5em)",
4679 invalid_values: ["5%"],
4680 quirks_values: { 5: "5px" },
4682 "border-collapse": {
4683 domProp: "borderCollapse",
4685 type: CSS_TYPE_LONGHAND,
4686 initial_values: ["separate"],
4687 other_values: ["collapse"],
4691 domProp: "borderColor",
4693 type: CSS_TYPE_TRUE_SHORTHAND,
4696 "border-right-color",
4697 "border-bottom-color",
4698 "border-left-color",
4702 "currentColor currentColor",
4703 "currentColor currentColor currentColor",
4704 "currentColor currentColor currentcolor CURRENTcolor",
4708 "currentColor green",
4709 "currentColor currentColor green",
4710 "currentColor currentColor currentColor green",
4711 "rgba(255,128,0,0.5)",
4720 "red rgb(nonsense)",
4723 unbalanced_values: ["red rgb("],
4724 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4727 domProp: "borderLeft",
4729 type: CSS_TYPE_TRUE_SHORTHAND,
4731 "border-left-color",
4732 "border-left-style",
4733 "border-left-width",
4740 "none medium currentcolor",
4755 "calc(5px + rubbish) green solid",
4756 "5px rgb(0, rubbish, 0) solid",
4759 "border-left-color": {
4760 domProp: "borderLeftColor",
4762 type: CSS_TYPE_LONGHAND,
4763 applies_to_first_letter: true,
4764 prerequisites: { color: "black" },
4765 initial_values: ["currentColor"],
4766 other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4767 invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4768 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4770 "border-left-style": {
4771 domProp: "borderLeftStyle",
4773 type: CSS_TYPE_LONGHAND,
4774 applies_to_first_letter: true,
4775 /* XXX hidden is sometimes the same as initial */
4776 initial_values: ["none"],
4789 "border-left-width": {
4790 domProp: "borderLeftWidth",
4792 type: CSS_TYPE_LONGHAND,
4793 applies_to_first_letter: true,
4794 prerequisites: { "border-left-style": "solid" },
4795 initial_values: ["medium", "3px", "calc(4px - 1px)"],
4808 "calc(3*25px + 5em)",
4810 invalid_values: ["5%"],
4811 quirks_values: { 5: "5px" },
4814 domProp: "borderRight",
4816 type: CSS_TYPE_TRUE_SHORTHAND,
4818 "border-right-color",
4819 "border-right-style",
4820 "border-right-width",
4827 "none medium currentcolor",
4838 invalid_values: ["5%", "5", "5 solid green"],
4840 "border-right-color": {
4841 domProp: "borderRightColor",
4843 type: CSS_TYPE_LONGHAND,
4844 applies_to_first_letter: true,
4845 prerequisites: { color: "black" },
4846 initial_values: ["currentColor"],
4847 other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4848 invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4849 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4851 "border-right-style": {
4852 domProp: "borderRightStyle",
4854 type: CSS_TYPE_LONGHAND,
4855 applies_to_first_letter: true,
4856 /* XXX hidden is sometimes the same as initial */
4857 initial_values: ["none"],
4870 "border-right-width": {
4871 domProp: "borderRightWidth",
4873 type: CSS_TYPE_LONGHAND,
4874 applies_to_first_letter: true,
4875 prerequisites: { "border-right-style": "solid" },
4876 initial_values: ["medium", "3px", "calc(4px - 1px)"],
4889 "calc(3*25px + 5em)",
4891 invalid_values: ["5%"],
4892 quirks_values: { 5: "5px" },
4895 domProp: "borderSpacing",
4897 type: CSS_TYPE_LONGHAND,
4904 "calc(0px) calc(0em)",
4905 "calc(2em - 2em) calc(3px + 7px - 10px)",
4907 "calc(-5px) calc(-5px)",
4917 "calc(0px) calc(7px)",
4918 "calc(7px) calc(0px)",
4931 "0 calc(0px + rubbish)",
4940 domProp: "borderStyle",
4942 type: CSS_TYPE_TRUE_SHORTHAND,
4945 "border-right-style",
4946 "border-bottom-style",
4947 "border-left-style",
4949 /* XXX hidden is sometimes the same as initial */
4954 "none none none none",
4967 "none none none solid",
4968 "groove none none none",
4969 "none ridge none none",
4970 "none none double none",
4971 "none none none dotted",
4976 domProp: "borderTop",
4978 type: CSS_TYPE_TRUE_SHORTHAND,
4979 subproperties: ["border-top-color", "border-top-style", "border-top-width"],
4985 "none medium currentcolor",
4996 invalid_values: ["5%", "5", "5 solid green"],
4998 "border-top-color": {
4999 domProp: "borderTopColor",
5001 type: CSS_TYPE_LONGHAND,
5002 applies_to_first_letter: true,
5003 prerequisites: { color: "black" },
5004 initial_values: ["currentColor"],
5005 other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
5006 invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
5007 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
5009 "border-top-style": {
5010 domProp: "borderTopStyle",
5012 type: CSS_TYPE_LONGHAND,
5013 applies_to_first_letter: true,
5014 /* XXX hidden is sometimes the same as initial */
5015 initial_values: ["none"],
5028 "border-top-width": {
5029 domProp: "borderTopWidth",
5031 type: CSS_TYPE_LONGHAND,
5032 applies_to_first_letter: true,
5033 prerequisites: { "border-top-style": "solid" },
5034 initial_values: ["medium", "3px", "calc(4px - 1px)"],
5047 "calc(3*25px + 5em)",
5049 invalid_values: ["5%"],
5050 quirks_values: { 5: "5px" },
5053 domProp: "borderWidth",
5055 type: CSS_TYPE_TRUE_SHORTHAND,
5058 "border-right-width",
5059 "border-bottom-width",
5060 "border-left-width",
5062 prerequisites: { "border-style": "solid" },
5067 "3px medium medium",
5068 "medium 3px medium medium",
5069 "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)",
5071 other_values: ["thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)"],
5072 invalid_values: ["5%", "1px calc(nonsense)", "1px red"],
5073 unbalanced_values: ["1px calc("],
5074 quirks_values: { 5: "5px" },
5079 type: CSS_TYPE_LONGHAND,
5080 /* FIXME: run tests with multiple prerequisites */
5081 prerequisites: { position: "relative" },
5082 /* XXX 0 may or may not be equal to auto */
5083 initial_values: ["auto"],
5093 "calc(3*25px + 50%)",
5096 quirks_values: { 5: "5px" },
5099 domProp: "boxShadow",
5101 type: CSS_TYPE_LONGHAND,
5102 applies_to_first_letter: true,
5103 initial_values: ["none"],
5104 prerequisites: { color: "blue" },
5110 "2px 2px 1px 5px green",
5112 "green 2px 2px 1px",
5113 "green 2px 2px, blue 1px 3px 4px",
5114 "currentColor 3px 3px",
5115 "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange",
5117 "inset 2px 2px 3px 4px black",
5118 "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px",
5120 "2px 2px calc(-5px)" /* clamped */,
5121 "calc(3em - 2px) 2px green",
5122 "green calc(3em - 2px) 2px",
5123 "2px calc(2px + 0.2em)",
5124 "blue 2px calc(2px + 0.2em)",
5125 "2px calc(2px + 0.2em) blue",
5126 "calc(-2px) calc(-2px)",
5128 "calc(2px) calc(2px)",
5129 "calc(2px) calc(2px) calc(2px)",
5130 "calc(2px) calc(2px) calc(2px) calc(2px)",
5134 "1px 1px 1px 1px 1px",
5140 "inset 4px 4px black inset",
5148 "3px calc(3px + rubbish)",
5149 "3px 3px calc(3px + rubbish)",
5150 "3px 3px 3px calc(3px + rubbish)",
5151 "3px 3px 3px 3px rgb(0, rubbish, 0)",
5158 domProp: "captionSide",
5160 type: CSS_TYPE_LONGHAND,
5161 initial_values: ["top"],
5162 other_values: ["bottom"],
5163 invalid_values: ["right", "left", "top-outside", "bottom-outside"],
5166 domProp: "caretColor",
5168 type: CSS_TYPE_LONGHAND,
5169 prerequisites: { color: "black" },
5170 // Though "auto" is an independent computed-value time keyword value,
5171 // it is not distinguishable from currentcolor because getComputedStyle
5172 // always returns used value for <color>.
5173 initial_values: ["auto", "currentcolor", "black", "rgb(0,0,0)"],
5174 other_values: ["green", "transparent", "rgba(128,128,128,.5)", "#123"],
5175 invalid_values: ["#0", "#00", "#00000", "cc00ff"],
5180 type: CSS_TYPE_LONGHAND,
5181 initial_values: ["none"],
5182 other_values: ["left", "right", "both", "inline-start", "inline-end"],
5188 type: CSS_TYPE_LONGHAND,
5189 initial_values: ["auto"],
5192 "rect(auto,auto,auto,auto)",
5193 "rect(3px, 4px, 4em, 0)",
5194 "rect(auto, 3em, 4pt, 2px)",
5195 "rect(2px 3px 4px 5px)",
5197 invalid_values: ["rect(auto, 3em, 2%, 5px)"],
5198 quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" },
5203 type: CSS_TYPE_LONGHAND,
5204 applies_to_first_letter: true,
5205 applies_to_first_line: true,
5206 applies_to_marker: true,
5207 applies_to_placeholder: true,
5208 applies_to_cue: true,
5209 /* XXX should test currentColor, but may or may not be initial */
5215 "-moz-default-color",
5219 /* rgb() and rgba() are aliases of each other. */
5224 /* hsl() and hsla() are aliases of each other. */
5227 "hsl(0, 0%, 0%, 1)",
5228 "hsla(0, 0%, 0%, 1)",
5229 /* rgb() and rgba() functions now accept <number> rather than <integer>. */
5230 "rgb(0.0, 0.0, 0.0)",
5231 "rgba(0.0, 0.0, 0.0)",
5232 "rgb(0.0, 0.0, 0.0, 1)",
5233 "rgba(0.0, 0.0, 0.0, 1)",
5234 /* <alpha-value> now accepts <percentage> as well as <number> in rgba() and hsla(). */
5235 "rgb(0.0, 0.0, 0.0, 100%)",
5236 "hsl(0, 0%, 0%, 100%)",
5237 /* rgb() and hsl() now support comma-less expression. */
5240 "rgb(0/* comment */0/* comment */0)",
5241 "rgb(0/* comment */0/* comment*/0/1.0)",
5244 "hsl(0/* comment */0%/* comment */0%)",
5245 "hsl(0/* comment */0%/* comment */0%/1)",
5246 /* Support <angle> for hsl() hue component. */
5247 "hsl(0deg, 0%, 0%)",
5248 "hsl(360deg, 0%, 0%)",
5249 "hsl(0grad, 0%, 0%)",
5250 "hsl(400grad, 0%, 0%)",
5251 "hsl(0rad, 0%, 0%)",
5252 "hsl(0turn, 0%, 0%)",
5253 "hsl(1turn, 0%, 0%)",
5254 /* CSS4 System Colors */
5256 /* Preserve previously available specially prefixed colors */
5257 "-moz-default-color",
5263 "rgba(45,300,12,2)",
5266 "rgba(255,128,0,0.5)",
5270 "rgb(100, 100.0, 100)",
5271 "rgb(300 300 300 / 200%)",
5272 "rgb(300.0 300.0 300.0 / 2.0)",
5273 "hsl(720, 200%, 200%, 2.0)",
5274 "hsla(720 200% 200% / 200%)",
5275 "hsl(480deg, 20%, 30%, 0.3)",
5276 "hsl(55grad, 400%, 30%)",
5277 "hsl(0.5grad 400% 500% / 9.0)",
5278 "hsl(33rad 100% 90% / 4)",
5279 "hsl(0.33turn, 40%, 40%, 10%)",
5280 "hsl(63e292, 41%, 34%)",
5281 /* CSS4 System Colors */
5290 /* Preserve previously available specially prefixed colors */
5291 "-moz-activehyperlinktext",
5292 "-moz-default-background-color",
5293 "-moz-hyperlinktext",
5294 "-moz-visitedhyperlinktext",
5296 "color-mix(in srgb, red, blue)",
5297 "color-mix(in srgb, highlight, rgba(0, 0, 0, .5))",
5298 "color-mix(in srgb, color-mix(in srgb, red 10%, blue), green)",
5299 "color-mix(in srgb, blue, red 80%)",
5300 "color-mix(in srgb, rgba(0, 200, 32, .5) 90%, red 50%)",
5301 "color-mix(in srgb, currentColor, red)",
5309 "rgb(100%, 0, 100%)",
5310 "rgba(100, 0, 100%, 30%)",
5312 "hsla(0%, 0%, 0%, 0.1)",
5313 /* trailing commas */
5315 "rgba(0, 0, 0, 0,)",
5317 "hsla(0, 0%, 0%, 1,)",
5319 /* comma and comma-less expressions should not mix together. */
5324 "hsl(0, 0%, 0% / 1)",
5327 "hsl(0 0%, 0% / 1)",
5328 /* trailing slash */
5334 "color-mix(red, blue)",
5335 "color-mix(red blue)",
5336 "color-mix(in srgb, red blue)",
5337 "color-mix(in srgb, red 10% blue)",
5340 "000000": "#000000",
5341 "96ed2a": "#96ed2a",
5349 type: CSS_TYPE_LONGHAND,
5350 applies_to_marker: true,
5351 // XXX This really depends on pseudo-element-ness.
5352 initial_values: ["normal", "none"],
5357 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
5358 "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
5359 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
5361 "counter(bar, upper-roman)",
5362 'counters(foo, ".")',
5363 "counters(bar, '-', lower-greek)",
5364 "'-' counter(foo) '.'",
5370 "close-quote attr(title) counters(foo, '.', upper-alpha)",
5375 'attr(title, "fallback")',
5376 'attr(\\32, "fallback")',
5377 'attr(-\\32, "fallback")',
5379 "counters(\\32, '.')",
5380 "counter(-\\32, upper-roman)",
5381 "counters(-\\2, '-', lower-greek)",
5383 "counters(a\\+b, '.')",
5384 "counter(\\}, upper-alpha)",
5386 "counter(foo, symbols('*'))",
5387 "counter(foo, symbols(numeric '0' '1'))",
5388 "counters(foo, '.', symbols('*'))",
5389 "counters(foo, '.', symbols(numeric '0' '1'))",
5390 "image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==))",
5391 ].concat(validNonUrlImageValues),
5393 "counter(foo, none)",
5394 "counters(bar, '.', none)",
5396 'counter(foo, ".")',
5402 "counters(-2, '.')",
5403 "-moz-alt-content 'foo'",
5404 "'foo' -moz-alt-content",
5405 "counter(one, two, three) 'foo'",
5406 ].concat(invalidNonUrlImageValues),
5408 "counter-increment": {
5409 domProp: "counterIncrement",
5411 type: CSS_TYPE_LONGHAND,
5412 initial_values: ["none"],
5429 invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5430 unbalanced_values: ["foo 1 ("],
5433 domProp: "counterReset",
5435 type: CSS_TYPE_LONGHAND,
5436 initial_values: ["none"],
5453 invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5456 domProp: "counterSet",
5458 type: CSS_TYPE_LONGHAND,
5459 initial_values: ["none"],
5476 invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5481 type: CSS_TYPE_LONGHAND,
5482 initial_values: ["auto"],
5523 "url(foo.png), move",
5524 "url(foo.png) 5 7, move",
5525 "url(foo.png) 12 3, url(bar.png), no-drop",
5526 "url(foo.png), url(bar.png) 7 2, wait",
5527 "url(foo.png) 3 2, url(bar.png) 7 9, pointer",
5528 "url(foo.png) calc(1 + 2) calc(3), pointer",
5529 "image-set(url(foo.png)), auto",
5534 "image-set(linear-gradient(red, blue)), auto",
5535 // Gradients are supported per spec, but we don't have support for it yet
5536 "linear-gradient(red, blue), auto",
5540 domProp: "direction",
5542 type: CSS_TYPE_LONGHAND,
5543 applies_to_marker: true,
5544 initial_values: ["ltr"],
5545 other_values: ["rtl"],
5551 type: CSS_TYPE_LONGHAND,
5552 // No applies_to_placeholder because we have a !important rule in forms.css.
5553 initial_values: ["inline"],
5554 /* XXX none will really mess with other properties */
5555 prerequisites: { float: "none", position: "static", contain: "none" },
5562 "inline flow-root list-item",
5567 "table-header-group",
5568 "table-footer-group",
5570 "table-column-group",
5577 "ruby-base-container",
5579 "ruby-text-container",
5586 domProp: "emptyCells",
5588 type: CSS_TYPE_LONGHAND,
5589 initial_values: ["show"],
5590 other_values: ["hide"],
5594 domProp: "cssFloat",
5596 type: CSS_TYPE_LONGHAND,
5597 applies_to_first_letter: true,
5598 initial_values: ["none"],
5599 other_values: ["left", "right", "inline-start", "inline-end"],
5605 type: CSS_TYPE_TRUE_SHORTHAND,
5606 prerequisites: { "writing-mode": "initial" },
5616 "font-feature-settings",
5617 "font-language-override",
5619 "font-variant-alternates",
5620 "font-variant-caps",
5621 "font-variant-east-asian",
5622 "font-variant-ligatures",
5623 "font-variant-numeric",
5624 "font-variant-position",
5627 gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif",
5632 "condensed bold italic small-caps 24px/1.4 Times New Roman, serif",
5633 "small inherit roman",
5634 "small roman inherit",
5642 // line-height with calc()
5643 "condensed bold italic small-caps 24px/calc(2px) Times New Roman, serif",
5644 "condensed bold italic small-caps 24px/calc(50%) Times New Roman, serif",
5645 "condensed bold italic small-caps 24px/calc(3*25px) Times New Roman, serif",
5646 "condensed bold italic small-caps 24px/calc(25px*3) Times New Roman, serif",
5647 "condensed bold italic small-caps 24px/calc(3*25px + 50%) Times New Roman, serif",
5648 "condensed bold italic small-caps 24px/calc(1 + 2*3/4) Times New Roman, serif",
5653 // line-height with calc()
5654 "condensed bold italic small-caps 24px/calc(1 + 2px) Times New Roman, serif",
5655 "condensed bold italic small-caps 24px/calc(100% + 0.1) Times New Roman, serif",
5659 domProp: "fontFamily",
5661 type: CSS_TYPE_LONGHAND,
5662 applies_to_first_letter: true,
5663 applies_to_first_line: true,
5664 applies_to_marker: true,
5665 applies_to_placeholder: true,
5666 applies_to_cue: true,
5667 initial_values: [gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif"],
5669 gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif",
5670 "Times New Roman, serif",
5671 "'Times New Roman', serif",
5674 '\\"Times New Roman',
5675 '"Times New Roman"',
5676 'Times, \\"Times New Roman',
5677 'Times, "Times New Roman"',
5678 "-no-such-font-installed",
5681 "Times, inherit roman",
5682 "inherit roman, Times",
5683 "roman inherit, Times",
5684 "Times, roman inherit",
5687 '"Times New" Roman',
5688 '"Times New Roman\n',
5689 'Times, "Times New Roman\n',
5692 "font-feature-settings": {
5693 domProp: "fontFeatureSettings",
5695 type: CSS_TYPE_LONGHAND,
5696 applies_to_first_letter: true,
5697 applies_to_first_line: true,
5698 applies_to_marker: true,
5699 applies_to_placeholder: true,
5700 applies_to_cue: true,
5701 initial_values: ["normal"],
5709 '"cv01" 3, "cv02" 4',
5710 '"cswh", "smcp" off, "salt" 4',
5711 '"cswh" 1, "smcp" off, "salt" 4',
5712 '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4',
5713 '"liga" ,"smcp" 0 , "blah"',
5734 '"liga" , 0 "smcp"',
5739 domProp: "fontKerning",
5741 type: CSS_TYPE_LONGHAND,
5742 applies_to_first_letter: true,
5743 applies_to_first_line: true,
5744 applies_to_marker: true,
5745 applies_to_placeholder: true,
5746 applies_to_cue: true,
5747 initial_values: ["auto"],
5748 other_values: ["normal", "none"],
5749 invalid_values: ["on"],
5751 "font-language-override": {
5752 domProp: "fontLanguageOverride",
5754 type: CSS_TYPE_LONGHAND,
5755 applies_to_first_letter: true,
5756 applies_to_first_line: true,
5757 applies_to_marker: true,
5758 applies_to_placeholder: true,
5759 applies_to_cue: true,
5760 initial_values: ["normal"],
5761 other_values: ["'ENG'", "'TRK'", '"TRK"', "'N\\'Ko'"],
5762 invalid_values: ["TRK", "ja"],
5765 domProp: "fontSize",
5767 type: CSS_TYPE_LONGHAND,
5768 applies_to_first_letter: true,
5769 applies_to_first_line: true,
5770 applies_to_marker: true,
5771 applies_to_placeholder: true,
5772 applies_to_cue: true,
5777 "calc(0.75rem + 200% - 125% + 0.25rem - 75%)",
5792 "calc(36pt + 75% + (30% + 2em + 2px))",
5797 invalid_values: ["-2em", "-50%", "-1px"],
5798 quirks_values: { 5: "5px" },
5800 "font-size-adjust": {
5801 domProp: "fontSizeAdjust",
5803 type: CSS_TYPE_LONGHAND,
5804 applies_to_first_letter: true,
5805 applies_to_first_line: true,
5806 applies_to_marker: true,
5807 applies_to_placeholder: true,
5808 applies_to_cue: true,
5809 initial_values: ["none"],
5820 "ch-width from-font",
5836 domProp: "fontStretch",
5838 type: CSS_TYPE_LONGHAND,
5839 applies_to_first_letter: true,
5840 applies_to_first_line: true,
5841 applies_to_marker: true,
5842 applies_to_placeholder: true,
5843 applies_to_cue: true,
5844 initial_values: ["normal"],
5855 invalid_values: ["narrower", "wider"],
5858 domProp: "fontStyle",
5860 type: CSS_TYPE_LONGHAND,
5861 applies_to_first_letter: true,
5862 applies_to_first_line: true,
5863 applies_to_marker: true,
5864 applies_to_placeholder: true,
5865 applies_to_cue: true,
5866 initial_values: ["normal"],
5867 other_values: ["italic", "oblique"],
5871 domProp: "fontSynthesis",
5873 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
5875 "font-synthesis-weight",
5876 "font-synthesis-style",
5877 "font-synthesis-small-caps",
5878 "font-synthesis-position",
5880 applies_to_first_letter: true,
5881 applies_to_first_line: true,
5882 applies_to_marker: true,
5883 applies_to_placeholder: true,
5884 applies_to_cue: true,
5886 "weight style small-caps position",
5887 "weight small-caps style position",
5888 "small-caps weight position style",
5889 "small-caps style position weight",
5890 "style position weight small-caps",
5891 "style position small-caps weight",
5901 "weight small-caps",
5902 "small-caps weight",
5909 "small-caps position",
5910 "position small-caps",
5911 "weight style small-caps",
5912 "small-caps weight style",
5913 "weight style position",
5914 "position weight style",
5915 "weight small-caps position",
5916 "position weight small-caps",
5928 "small-caps small-caps",
5930 "position position",
5933 "font-synthesis-weight": {
5934 domProp: "fontSynthesisWeight",
5936 type: CSS_TYPE_LONGHAND,
5937 applies_to_first_letter: true,
5938 applies_to_first_line: true,
5939 applies_to_marker: true,
5940 applies_to_placeholder: true,
5941 applies_to_cue: true,
5942 initial_values: ["auto"],
5943 other_values: ["none"],
5944 invalid_values: ["auto none", "weight", "normal", "0"],
5946 "font-synthesis-style": {
5947 domProp: "fontSynthesisStyle",
5949 type: CSS_TYPE_LONGHAND,
5950 applies_to_first_letter: true,
5951 applies_to_first_line: true,
5952 applies_to_marker: true,
5953 applies_to_placeholder: true,
5954 applies_to_cue: true,
5955 initial_values: ["auto"],
5956 other_values: ["none"],
5957 invalid_values: ["auto none", "style", "normal", "0"],
5959 "font-synthesis-small-caps": {
5960 domProp: "fontSynthesisSmallCaps",
5962 type: CSS_TYPE_LONGHAND,
5963 applies_to_first_letter: true,
5964 applies_to_first_line: true,
5965 applies_to_marker: true,
5966 applies_to_placeholder: true,
5967 applies_to_cue: true,
5968 initial_values: ["auto"],
5969 other_values: ["none"],
5970 invalid_values: ["auto none", "small-caps", "normal", "0"],
5972 "font-synthesis-position": {
5973 domProp: "fontSynthesisPosition",
5975 type: CSS_TYPE_LONGHAND,
5976 applies_to_first_letter: true,
5977 applies_to_first_line: true,
5978 applies_to_marker: true,
5979 applies_to_placeholder: true,
5980 applies_to_cue: true,
5981 initial_values: ["auto"],
5982 other_values: ["none"],
5983 invalid_values: ["auto none", "position", "normal", "0"],
5986 domProp: "fontVariant",
5988 type: CSS_TYPE_TRUE_SHORTHAND,
5990 "font-variant-alternates",
5991 "font-variant-caps",
5992 "font-variant-east-asian",
5993 "font-variant-ligatures",
5994 "font-variant-numeric",
5995 "font-variant-position",
5997 initial_values: ["normal"],
6001 "traditional oldstyle-nums",
6003 "common-ligatures no-discretionary-ligatures",
6004 "proportional-nums oldstyle-nums",
6005 "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal",
6006 "traditional historical-forms styleset(ok-alt-a, ok-alt-b)",
6010 "small-caps normal",
6011 "small-caps small-caps",
6012 "none common-ligatures",
6013 "common-ligatures none",
6014 "small-caps potato",
6015 "small-caps jis83 all-small-caps",
6016 "super historical-ligatures sub",
6017 "stacked-fractions diagonal-fractions historical-ligatures",
6018 "common-ligatures traditional common-ligatures",
6019 "lining-nums traditional slashed-zero ordinal normal",
6020 "traditional historical-forms styleset(ok-alt-a, ok-alt-b) historical-forms",
6021 "historical-forms styleset(ok-alt-a, ok-alt-b) traditional styleset(potato)",
6022 "annotation(a,b,c)",
6025 "font-variant-alternates": {
6026 domProp: "fontVariantAlternates",
6028 type: CSS_TYPE_LONGHAND,
6029 applies_to_first_letter: true,
6030 applies_to_first_line: true,
6031 applies_to_marker: true,
6032 applies_to_placeholder: true,
6033 applies_to_cue: true,
6034 initial_values: ["normal"],
6037 "styleset(alt-a, alt-b)",
6038 "character-variant(a, b, c)",
6039 "annotation(circled)",
6041 "styleset(complex\\ blob, a)",
6042 "annotation(\\62 lah)",
6045 "historical-forms normal",
6046 "historical-forms historical-forms",
6051 "styleset(1234blah)",
6052 "annotation(a), annotation(b)",
6053 "annotation(a) normal",
6056 "font-variant-caps": {
6057 domProp: "fontVariantCaps",
6059 type: CSS_TYPE_LONGHAND,
6060 applies_to_first_letter: true,
6061 applies_to_first_line: true,
6062 applies_to_marker: true,
6063 applies_to_placeholder: true,
6064 applies_to_cue: true,
6065 initial_values: ["normal"],
6075 "normal small-caps",
6076 "petite-caps normal",
6080 "font-variant-east-asian": {
6081 domProp: "fontVariantEastAsian",
6083 type: CSS_TYPE_LONGHAND,
6084 applies_to_first_letter: true,
6085 applies_to_first_line: true,
6086 applies_to_marker: true,
6087 applies_to_placeholder: true,
6088 applies_to_cue: true,
6089 initial_values: ["normal"],
6098 "proportional-width",
6101 "jis78 full-width ruby",
6102 "simplified proportional-width",
6108 "simplified traditional",
6109 "full-width proportional-width",
6110 "ruby simplified ruby",
6111 "jis78 ruby simplified",
6114 "font-variant-ligatures": {
6115 domProp: "fontVariantLigatures",
6117 type: CSS_TYPE_LONGHAND,
6118 applies_to_first_letter: true,
6119 applies_to_first_line: true,
6120 applies_to_marker: true,
6121 applies_to_placeholder: true,
6122 applies_to_cue: true,
6123 initial_values: ["normal"],
6127 "no-common-ligatures",
6128 "discretionary-ligatures",
6129 "no-discretionary-ligatures",
6130 "historical-ligatures",
6131 "no-historical-ligatures",
6134 "common-ligatures no-discretionary-ligatures",
6135 "contextual no-discretionary-ligatures",
6136 "historical-ligatures no-common-ligatures",
6137 "no-historical-ligatures discretionary-ligatures",
6138 "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual",
6141 "common-ligatures normal",
6142 "common-ligatures no-common-ligatures",
6143 "common-ligatures common-ligatures",
6144 "no-historical-ligatures historical-ligatures",
6145 "no-discretionary-ligatures discretionary-ligatures",
6146 "no-contextual contextual",
6147 "common-ligatures no-discretionary-ligatures no-common-ligatures",
6148 "common-ligatures none",
6149 "no-discretionary-ligatures none",
6150 "none common-ligatures",
6153 "font-variant-numeric": {
6154 domProp: "fontVariantNumeric",
6156 type: CSS_TYPE_LONGHAND,
6157 applies_to_first_letter: true,
6158 applies_to_first_line: true,
6159 applies_to_marker: true,
6160 applies_to_placeholder: true,
6161 applies_to_cue: true,
6162 initial_values: ["normal"],
6166 "proportional-nums",
6168 "diagonal-fractions",
6169 "stacked-fractions",
6172 "lining-nums diagonal-fractions",
6173 "tabular-nums stacked-fractions",
6174 "tabular-nums slashed-zero stacked-fractions",
6175 "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal",
6178 "lining-nums normal",
6179 "lining-nums oldstyle-nums",
6180 "lining-nums normal slashed-zero ordinal",
6181 "proportional-nums tabular-nums",
6182 "diagonal-fractions stacked-fractions",
6183 "slashed-zero diagonal-fractions slashed-zero",
6184 "lining-nums slashed-zero diagonal-fractions oldstyle-nums",
6185 "diagonal-fractions diagonal-fractions",
6188 "font-variant-position": {
6189 domProp: "fontVariantPosition",
6191 type: CSS_TYPE_LONGHAND,
6192 applies_to_first_letter: true,
6193 applies_to_first_line: true,
6194 applies_to_marker: true,
6195 applies_to_placeholder: true,
6196 applies_to_cue: true,
6197 initial_values: ["normal"],
6198 other_values: ["super", "sub"],
6199 invalid_values: ["normal sub", "super sub"],
6202 domProp: "fontWeight",
6204 type: CSS_TYPE_LONGHAND,
6205 applies_to_first_letter: true,
6206 applies_to_first_line: true,
6207 applies_to_marker: true,
6208 applies_to_placeholder: true,
6209 applies_to_cue: true,
6210 initial_values: ["normal", "400"],
6234 invalid_values: ["0", "1001", "calc(10%)"],
6239 type: CSS_TYPE_LONGHAND,
6240 /* FIXME: test zero, and test calc clamping */
6241 initial_values: [" auto"],
6242 /* computed value tests for height test more with display:block */
6243 prerequisites: { display: "block" },
6253 // these two keywords are the aliases of above first two.
6260 "calc(3*25px + 50%)",
6261 "fit-content(100px)",
6263 "fit-content(calc(3*25px + 50%))",
6265 invalid_values: ["none"],
6266 quirks_values: { 5: "5px" },
6271 type: CSS_TYPE_LONGHAND,
6272 initial_values: ["auto"],
6273 other_values: ["normal", "disabled", "active", "inactive"],
6274 invalid_values: ["none", "enabled", "1px"],
6279 type: CSS_TYPE_LONGHAND,
6280 /* FIXME: run tests with multiple prerequisites */
6281 prerequisites: { position: "relative" },
6282 /* XXX 0 may or may not be equal to auto */
6283 initial_values: ["auto"],
6293 "calc(3*25px + 50%)",
6296 quirks_values: { 5: "5px" },
6299 domProp: "letterSpacing",
6301 type: CSS_TYPE_LONGHAND,
6302 applies_to_first_letter: true,
6303 applies_to_first_line: true,
6304 applies_to_placeholder: true,
6305 initial_values: ["normal", "0", "0px", "calc(0px)"],
6317 quirks_values: { 5: "5px" },
6320 domProp: "lineBreak",
6322 type: CSS_TYPE_LONGHAND,
6323 initial_values: ["auto"],
6324 other_values: ["loose", "normal", "strict", "anywhere"],
6328 domProp: "lineHeight",
6330 type: CSS_TYPE_LONGHAND,
6331 applies_to_marker: true,
6332 applies_to_first_letter: true,
6333 applies_to_first_line: true,
6334 applies_to_placeholder: true,
6335 applies_to_cue: true,
6337 * Inheritance tests require consistent font size, since
6338 * getComputedStyle (which uses the CSS2 computed value, or
6339 * CSS2.1 used value) doesn't match what the CSS2.1 computed
6340 * value is. And they even require consistent font metrics for
6341 * computation of 'normal'.
6344 "font-size": "19px",
6345 "font-size-adjust": "none",
6346 "font-family": "serif",
6347 "font-weight": "normal",
6348 "font-style": "normal",
6351 "writing-mode": "initial",
6354 initial_values: ["normal"],
6364 "calc(3*25px + 50%)",
6367 invalid_values: ["calc(1 + 2px)", "calc(100% + 0.1)"],
6370 domProp: "listStyle",
6372 type: CSS_TYPE_TRUE_SHORTHAND,
6375 "list-style-position",
6385 "none disc outside",
6386 "none outside disc",
6387 "disc none outside",
6388 "disc outside none",
6389 "outside none disc",
6390 "outside disc none",
6399 "outside none none",
6400 "none outside none",
6401 "none none outside",
6407 "\\32 style inside",
6414 'symbols("*" "\\2020" "\\2021" "\\A7")',
6415 'symbols(cyclic "*" "\\2020" "\\2021" "\\A7")',
6416 'inside symbols("*" "\\2020" "\\2021" "\\A7")',
6417 'symbols("*" "\\2020" "\\2021" "\\A7") outside',
6418 'none symbols("*" "\\2020" "\\2021" "\\A7")',
6419 'inside none symbols("*" "\\2020" "\\2021" "\\A7")',
6420 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6421 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6422 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
6423 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
6424 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6425 'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6426 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
6427 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
6428 'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6429 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none',
6430 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside',
6436 "none disc url(404.png)",
6437 "none url(404.png) disc",
6438 "disc none url(404.png)",
6439 "disc url(404.png) none",
6440 "url(404.png) none disc",
6441 "url(404.png) disc none",
6442 "none disc outside url(404.png)",
6445 "list-style-image": {
6446 domProp: "listStyleImage",
6448 type: CSS_TYPE_LONGHAND,
6449 initial_values: ["none"],
6451 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6452 // Add some tests for interesting url() values here to test serialization, etc.
6453 "url('data:text/plain,\"')",
6454 'url("data:text/plain,\'")',
6455 "url('data:text/plain,\\'')",
6456 'url("data:text/plain,\\"")',
6457 "url('data:text/plain,\\\"')",
6458 'url("data:text/plain,\\\'")',
6459 "url(data:text/plain,\\\\)",
6460 ].concat(validNonUrlImageValues),
6461 invalid_values: ["url('border.png') url('border.png')"].concat(
6462 invalidNonUrlImageValues
6464 unbalanced_values: [].concat(unbalancedGradientAndElementValues),
6466 "list-style-position": {
6467 domProp: "listStylePosition",
6469 type: CSS_TYPE_LONGHAND,
6470 initial_values: ["outside"],
6471 other_values: ["inside"],
6474 "list-style-type": {
6475 domProp: "listStyleType",
6477 type: CSS_TYPE_LONGHAND,
6478 initial_values: ["disc"],
6483 "disclosure-closed",
6486 "decimal-leading-zero",
6503 "japanese-informal",
6505 "korean-hangul-formal",
6506 "korean-hanja-informal",
6507 "korean-hanja-formal",
6508 "simp-chinese-informal",
6509 "simp-chinese-formal",
6510 "trad-chinese-informal",
6511 "trad-chinese-formal",
6513 "-moz-cjk-heavenly-stem",
6514 "-moz-cjk-earthly-branch",
6515 "-moz-trad-chinese-informal",
6516 "-moz-trad-chinese-formal",
6517 "-moz-simp-chinese-informal",
6518 "-moz-simp-chinese-formal",
6519 "-moz-japanese-informal",
6520 "-moz-japanese-formal",
6521 "-moz-arabic-indic",
6538 "-moz-hangul-consonant",
6539 "-moz-ethiopic-halehame",
6540 "-moz-ethiopic-numeric",
6541 "-moz-ethiopic-halehame-am",
6542 "-moz-ethiopic-halehame-ti-er",
6543 "-moz-ethiopic-halehame-ti-et",
6550 'symbols("*" "\\2020" "\\2021" "\\A7")',
6551 "symbols(cyclic '*' '\\2020' '\\2021' '\\A7')",
6558 type: CSS_TYPE_TRUE_SHORTHAND,
6565 initial_values: ["0", "0px 0 0em", "0% 0px 0em 0pt"],
6570 "1em calc(2em + 3px) 4ex 5cm",
6572 invalid_values: ["1px calc(nonsense)", "1px red"],
6573 unbalanced_values: ["1px calc("],
6574 quirks_values: { 5: "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
6577 domProp: "marginBottom",
6579 type: CSS_TYPE_LONGHAND,
6580 applies_to_first_letter: true,
6581 /* XXX testing auto has prerequisites */
6582 initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6592 "calc(3*25px + 50%)",
6595 quirks_values: { 5: "5px" },
6598 domProp: "marginLeft",
6600 type: CSS_TYPE_LONGHAND,
6601 applies_to_first_letter: true,
6602 /* XXX testing auto has prerequisites */
6603 initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6624 "calc(3*25px + 50%)",
6640 quirks_values: { 5: "5px" },
6643 domProp: "marginRight",
6645 type: CSS_TYPE_LONGHAND,
6646 applies_to_first_letter: true,
6647 /* XXX testing auto has prerequisites */
6648 initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6658 "calc(3*25px + 50%)",
6661 quirks_values: { 5: "5px" },
6664 domProp: "marginTop",
6666 type: CSS_TYPE_LONGHAND,
6667 applies_to_first_letter: true,
6668 /* XXX testing auto has prerequisites */
6669 initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6679 "calc(3*25px + 50%)",
6682 quirks_values: { 5: "5px" },
6685 domProp: "maxHeight",
6687 type: CSS_TYPE_LONGHAND,
6688 prerequisites: { display: "block" },
6689 initial_values: ["none"],
6699 // these two keywords are the aliases of above first two.
6708 "calc(3*25px + 50%)",
6709 "fit-content(100px)",
6711 "fit-content(calc(3*25px + 50%))",
6713 invalid_values: ["auto"],
6714 quirks_values: { 5: "5px" },
6717 domProp: "maxWidth",
6719 type: CSS_TYPE_LONGHAND,
6720 prerequisites: { display: "block" },
6721 initial_values: ["none"],
6726 // these four keywords compute to the initial value only when the
6727 // writing mode is vertical, and we're testing with a horizontal
6734 // these two keywords are the aliases of above first two.
6743 "calc(3*25px + 50%)",
6744 "fit-content(100px)",
6746 "fit-content(calc(3*25px + 50%))",
6748 invalid_values: ["auto"],
6749 quirks_values: { 5: "5px" },
6752 domProp: "minHeight",
6754 type: CSS_TYPE_LONGHAND,
6755 prerequisites: { display: "block" },
6756 initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
6765 // these two keywords are the aliases of above first two.
6773 "calc(3*25px + 50%)",
6774 "fit-content(100px)",
6776 "fit-content(calc(3*25px + 50%))",
6778 invalid_values: ["none"],
6779 quirks_values: { 5: "5px" },
6782 domProp: "minWidth",
6784 type: CSS_TYPE_LONGHAND,
6785 prerequisites: { display: "block" },
6786 initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
6790 // these four keywords compute to the initial value only when the
6791 // writing mode is vertical, and we're testing with a horizontal
6798 // these two keywords are the aliases of above first two.
6806 "calc(3*25px + 50%)",
6807 "fit-content(100px)",
6809 "fit-content(calc(3*25px + 50%))",
6811 invalid_values: ["none"],
6812 quirks_values: { 5: "5px" },
6815 domProp: "objectFit",
6817 type: CSS_TYPE_LONGHAND,
6818 initial_values: ["fill"],
6819 other_values: ["contain", "cover", "none", "scale-down"],
6820 invalid_values: ["auto", "5px", "100%"],
6822 "object-position": {
6823 domProp: "objectPosition",
6825 type: CSS_TYPE_LONGHAND,
6826 initial_values: ["50% 50%", "50%", "center", "center center"],
6833 "calc(20px) calc(20px)",
6834 "calc(20px + 1em) calc(20px / 2)",
6835 "calc(20px + 50%) calc(50% - 10px)",
6836 "calc(-20px) calc(-50%)",
6837 "calc(-20%) calc(-50%)",
6839 "right 20px top 60px",
6840 "right 20px bottom 60px",
6841 "left 20px top 60px",
6842 "left 20px bottom 60px",
6843 "right -50px top -50px",
6844 "left -50px bottom -50px",
6845 "right 20px top -50px",
6846 "right -20px top 50px",
6847 "right 3em bottom 10px",
6848 "bottom 3em right 10px",
6849 "top 3em right 10px",
6856 "center 10px center 4px",
6857 "center 10px center",
6867 "top 20px bottom 20px",
6877 type: CSS_TYPE_TRUE_SHORTHAND,
6885 initial_values: ["none"],
6887 "none 30deg reverse",
6888 "none 50px reverse 30deg",
6889 "none calc(10px + 20%) auto",
6891 "none / left center",
6892 "path('M 0 0 H 1') -200% auto",
6893 "path('M 0 0 H 1') -200%",
6894 "path('M 0 0 H 1') 50px",
6895 "path('M 0 0 H 1') auto",
6896 "path('M 0 0 H 1') reverse 30deg 50px",
6897 "path('M 0 0 H 1')",
6898 "path('m 20 0 h 100') -7rad 8px / auto",
6899 "path('m 0 30 v 100') -7rad 8px / left top",
6900 "path('m 0 0 h 100') -7rad 8px",
6901 "path('M 0 0 H 100') 100px 0deg",
6902 "top right / top left",
6903 "top right ray(45deg closest-side)",
6904 "50% 50% ray(0rad farthest-side)",
6907 "100px 0deg path('m 0 0 h 100')",
6912 "none / 100px 20px 30deg",
6913 "path('M 20 30 A 60 70 80') bottom",
6914 "path('M 20 30 A 60 70 80') bottom top",
6915 "path('M 20 30 A 60 70 80') 100px 200px",
6916 "path('M 20 30 A 60 70 80') reverse auto",
6917 "path('M 20 30 A 60 70 80') reverse 10px 30deg",
6918 "path('M 20 30 A 60 70 80') /",
6922 domProp: "offsetAnchor",
6924 type: CSS_TYPE_LONGHAND,
6925 initial_values: ["auto"],
6929 "calc(20% + 10px) center",
6932 "left -10px top -20%",
6933 "right 10% bottom 20em",
6935 invalid_values: ["none", "10deg", "left 10% top"],
6937 "offset-distance": {
6938 domProp: "offsetDistance",
6940 type: CSS_TYPE_LONGHAND,
6941 initial_values: ["0"],
6942 other_values: ["10px", "10%", "190%", "-280%", "calc(30px + 40%)"],
6943 invalid_values: ["none", "45deg"],
6946 domProp: "offsetPath",
6948 type: CSS_TYPE_LONGHAND,
6949 initial_values: ["none"],
6952 "ray(45deg closest-side)",
6953 "ray(0rad farthest-side)",
6954 "ray(0.5turn closest-corner contain)",
6955 "ray(200grad farthest-corner)",
6956 "ray(sides 180deg)",
6957 "ray(contain farthest-side 180deg)",
6958 "ray(calc(180deg - 45deg) farthest-side)",
6959 "ray(0deg at center center)",
6960 "ray(at 10% 10% 1rad)",
6962 .concat(pathValues.other_values)
6963 .concat(basicShapeOtherValues)
6964 .concat(basicShapeXywhRectValues)
6965 .concat(basicShapeShapeValues),
6968 "ray(closest-side)",
6969 "ray(0deg, closest-side)",
6970 "ray(contain 0deg closest-side contain)",
6971 ].concat(pathValues.invalid_values),
6973 "offset-position": {
6974 domProp: "offsetPosition",
6976 type: CSS_TYPE_LONGHAND,
6977 initial_values: ["normal"],
6982 "calc(20% + 10px) center",
6985 "left -10px top -20%",
6986 "right 10% bottom 20em",
6988 invalid_values: ["none", "10deg", "left 10% top"],
6991 domProp: "offsetRotate",
6993 type: CSS_TYPE_LONGHAND,
6994 initial_values: ["auto"],
6995 other_values: ["reverse", "0deg", "0rad reverse", "-45deg", "5turn auto"],
6996 invalid_values: ["none", "10px", "reverse 0deg reverse", "reverse auto"],
7001 type: CSS_TYPE_LONGHAND,
7002 applies_to_first_letter: true,
7003 applies_to_first_line: true,
7004 applies_to_placeholder: true,
7005 applies_to_cue: true,
7017 other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"],
7018 invalid_values: ["0px", "1px"],
7021 domProp: "MozOrient",
7023 type: CSS_TYPE_LONGHAND,
7024 initial_values: ["inline"],
7025 other_values: ["horizontal", "vertical", "block"],
7026 invalid_values: ["none"],
7031 type: CSS_TYPE_TRUE_SHORTHAND,
7032 subproperties: ["outline-color", "outline-style", "outline-width"],
7037 // XXX Should be invert, but currently currentcolor.
7038 //"invert", "none medium invert"
7040 "none medium currentcolor",
7049 invalid_values: ["5%", "5", "5 solid green"],
7052 domProp: "outlineColor",
7054 type: CSS_TYPE_LONGHAND,
7055 applies_to_cue: true,
7056 prerequisites: { color: "black" },
7057 initial_values: ["currentColor"], // XXX should be invert
7058 other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
7070 domProp: "outlineOffset",
7072 type: CSS_TYPE_LONGHAND,
7078 "calc(3em + 2px - 2px - 3em)",
7085 "calc(7pt + 3 * 2em)",
7088 invalid_values: ["5%"],
7091 domProp: "outlineStyle",
7093 type: CSS_TYPE_LONGHAND,
7094 applies_to_cue: true,
7095 // XXX Should 'hidden' be the same as initial?
7096 initial_values: ["none"],
7111 domProp: "outlineWidth",
7113 type: CSS_TYPE_LONGHAND,
7114 applies_to_cue: true,
7115 prerequisites: { "outline-style": "solid" },
7116 initial_values: ["medium", "3px", "calc(4px - 1px)"],
7129 "calc(3*25px + 5em)",
7131 invalid_values: ["5%", "5"],
7134 domProp: "overflow",
7136 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
7137 prerequisites: { display: "block", contain: "none" },
7138 subproperties: ["overflow-x", "overflow-y"],
7139 initial_values: ["visible"],
7154 "clip -moz-scrollbars-none",
7155 "-moz-scrollbars-none",
7156 "-moz-scrollbars-horizontal",
7157 "-moz-scrollbars-vertical",
7161 domProp: "overflowX",
7163 type: CSS_TYPE_LONGHAND,
7164 // No applies_to_placeholder because we have a !important rule in forms.css.
7167 "overflow-y": "visible",
7170 initial_values: ["visible"],
7171 other_values: ["auto", "scroll", "hidden", "clip", "overlay"],
7175 domProp: "overflowY",
7177 type: CSS_TYPE_LONGHAND,
7178 // No applies_to_placeholder because we have a !important rule in forms.css.
7181 "overflow-x": "visible",
7184 initial_values: ["visible"],
7185 other_values: ["auto", "scroll", "hidden", "clip", "overlay"],
7188 "overflow-inline": {
7189 domProp: "overflowInline",
7191 type: CSS_TYPE_LONGHAND,
7193 // No applies_to_placeholder because we have a !important rule in forms.css.
7196 "overflow-block": "visible",
7199 initial_values: ["visible"],
7200 other_values: ["auto", "scroll", "hidden", "clip"],
7204 domProp: "overflowBlock",
7206 type: CSS_TYPE_LONGHAND,
7208 // No applies_to_placeholder because we have a !important rule in forms.css.
7211 "overflow-inline": "visible",
7214 initial_values: ["visible"],
7215 other_values: ["auto", "scroll", "hidden", "clip"],
7218 "overflow-clip-margin": {
7219 domProp: "overflowClipMargin",
7221 type: CSS_TYPE_LONGHAND,
7222 initial_values: ["0px"],
7223 other_values: ["1px", "2em", "calc(10px + 1vh)"],
7224 invalid_values: ["-10px"],
7229 type: CSS_TYPE_TRUE_SHORTHAND,
7240 "calc(0px) calc(0em) calc(-2px) calc(-1%)",
7242 other_values: ["3px 0", "2em 4px 2pt", "1em 2em 3px 4px"],
7243 invalid_values: ["1px calc(nonsense)", "1px red", "-1px"],
7244 unbalanced_values: ["1px calc("],
7245 quirks_values: { 5: "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
7248 domProp: "paddingBlock",
7250 type: CSS_TYPE_TRUE_SHORTHAND,
7251 subproperties: ["padding-block-start", "padding-block-end"],
7252 initial_values: ["0", "0px 0em"],
7253 other_values: ["3px 0", "2% 4px", "1em", "calc(1px) calc(-1%)"],
7254 invalid_values: ["1px calc(nonsense)", "1px red", "-1px", "auto", "none"],
7255 unbalanced_values: ["1px calc("],
7258 domProp: "paddingInline",
7260 type: CSS_TYPE_TRUE_SHORTHAND,
7261 subproperties: ["padding-inline-start", "padding-inline-end"],
7262 initial_values: ["0", "0px 0em"],
7263 other_values: ["3px 0", "2% 4px", "1em", "calc(1px) calc(-1%)"],
7264 invalid_values: ["1px calc(nonsense)", "1px red", "-1px", "auto", "none"],
7265 unbalanced_values: ["1px calc("],
7268 domProp: "paddingBottom",
7270 type: CSS_TYPE_LONGHAND,
7271 applies_to_first_letter: true,
7272 // No applies_to_placeholder because we have a !important rule in forms.css.
7290 "calc(3*25px + 50%)",
7293 quirks_values: { 5: "5px" },
7296 domProp: "paddingLeft",
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: "paddingRight",
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: "paddingTop",
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" },
7379 "page-break-after": {
7380 domProp: "pageBreakAfter",
7382 type: CSS_TYPE_LEGACY_SHORTHAND,
7383 alias_for: "break-after",
7384 subproperties: ["break-after"],
7385 initial_values: ["auto"],
7386 other_values: ["always", "avoid", "left", "right"],
7390 invalid_values: ["page", "column"],
7392 "page-break-before": {
7393 domProp: "pageBreakBefore",
7395 type: CSS_TYPE_LEGACY_SHORTHAND,
7396 alias_for: "break-before",
7397 subproperties: ["break-before"],
7398 initial_values: ["auto"],
7399 other_values: ["always", "avoid", "left", "right"],
7403 invalid_values: ["page", "column"],
7406 domProp: "breakAfter",
7408 type: CSS_TYPE_LONGHAND,
7409 initial_values: ["auto"],
7410 other_values: ["always", "page", "avoid", "left", "right"],
7414 domProp: "breakBefore",
7416 type: CSS_TYPE_LONGHAND,
7417 initial_values: ["auto"],
7418 other_values: ["always", "page", "avoid", "left", "right"],
7422 domProp: "breakInside",
7424 type: CSS_TYPE_LONGHAND,
7425 initial_values: ["auto"],
7426 other_values: ["avoid", "avoid-page", "avoid-column"],
7427 invalid_values: ["left", "right", "always"],
7429 "page-break-inside": {
7430 domProp: "pageBreakInside",
7432 type: CSS_TYPE_LEGACY_SHORTHAND,
7433 alias_for: "break-inside",
7434 subproperties: ["break-inside"],
7435 initial_values: ["auto"],
7436 other_values: ["avoid"],
7437 invalid_values: ["avoid-page", "avoid-column"],
7440 domProp: "paintOrder",
7442 type: CSS_TYPE_LONGHAND,
7443 applies_to_first_letter: true,
7444 applies_to_first_line: true,
7445 initial_values: ["normal"],
7449 "fill stroke markers",
7450 "stroke markers fill",
7452 invalid_values: ["fill stroke markers fill", "fill normal"],
7455 domProp: "pointerEvents",
7457 type: CSS_TYPE_LONGHAND,
7458 // No applies_to_placeholder because we have a !important rule in forms.css.
7459 initial_values: ["auto"],
7474 domProp: "position",
7476 type: CSS_TYPE_LONGHAND,
7477 initial_values: ["static"],
7478 other_values: ["relative", "absolute", "fixed", "sticky"],
7484 type: CSS_TYPE_LONGHAND,
7485 initial_values: ["auto"],
7490 '"\u201C" "\u201D" "\u2018" "\u2019"',
7491 '"\\201C" "\\201D" "\\2018" "\\2019"',
7493 invalid_values: ["'\"'", '"" "" ""'],
7498 type: CSS_TYPE_LONGHAND,
7499 /* FIXME: run tests with multiple prerequisites */
7500 prerequisites: { position: "relative" },
7501 /* XXX 0 may or may not be equal to auto */
7502 initial_values: ["auto"],
7512 "calc(3*25px + 50%)",
7515 quirks_values: { 5: "5px" },
7518 domProp: "rubyAlign",
7520 type: CSS_TYPE_LONGHAND,
7521 initial_values: ["space-around"],
7522 other_values: ["start", "center", "space-between"],
7523 invalid_values: ["end", "1", "10px", "50%", "start center"],
7526 domProp: "rubyPosition",
7528 type: CSS_TYPE_LONGHAND,
7529 applies_to_cue: true,
7530 initial_values: ["alternate", "alternate over", "over alternate"],
7531 other_values: ["over", "under", "alternate under", "under alternate"],
7541 "alternate alternate",
7547 "scroll-behavior": {
7548 domProp: "scrollBehavior",
7550 type: CSS_TYPE_LONGHAND,
7551 initial_values: ["auto"],
7552 other_values: ["smooth"],
7553 invalid_values: ["none", "1px"],
7555 "scroll-snap-stop": {
7556 domProp: "scrollSnapStop",
7558 type: CSS_TYPE_LONGHAND,
7559 initial_values: ["normal"],
7560 other_values: ["always"],
7561 invalid_values: ["auto", "none", "1px"],
7563 "scroll-snap-type": {
7564 domProp: "scrollSnapType",
7566 type: CSS_TYPE_LONGHAND,
7567 initial_values: ["none"],
7582 "block mandatory inline",
7590 "proximity mandatory",
7593 "scroll-snap-align": {
7594 domProp: "scrollSnapAlign",
7596 type: CSS_TYPE_LONGHAND,
7597 initial_values: ["none"],
7606 invalid_values: ["auto", "start invalid", "start end center"],
7609 domProp: "scrollMargin",
7611 type: CSS_TYPE_TRUE_SHORTHAND,
7613 "scroll-margin-top",
7614 "scroll-margin-right",
7615 "scroll-margin-bottom",
7616 "scroll-margin-left",
7618 initial_values: ["0"],
7626 invalid_values: ["auto", "20%", "-30%", "1px 2px 3px 4px 5px"],
7628 "scroll-margin-top": {
7629 domProp: "scrollMarginTop",
7631 type: CSS_TYPE_LONGHAND,
7632 initial_values: ["0"],
7633 other_values: ["-10px", "calc(2em + 3ex)"],
7634 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7636 "scroll-margin-right": {
7637 domProp: "scrollMarginRight",
7639 type: CSS_TYPE_LONGHAND,
7640 initial_values: ["0"],
7641 other_values: ["-10px", "calc(2em + 3ex)"],
7642 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7644 "scroll-margin-bottom": {
7645 domProp: "scrollMarginBottom",
7647 type: CSS_TYPE_LONGHAND,
7648 initial_values: ["0"],
7649 other_values: ["-10px", "calc(2em + 3ex)"],
7650 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7652 "scroll-margin-left": {
7653 domProp: "scrollMarginLeft",
7655 type: CSS_TYPE_LONGHAND,
7656 initial_values: ["0"],
7657 other_values: ["-10px", "calc(2em + 3ex)"],
7658 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7660 "scroll-margin-inline": {
7661 domProp: "scrollMarginInline",
7663 type: CSS_TYPE_TRUE_SHORTHAND,
7664 subproperties: ["scroll-margin-inline-start", "scroll-margin-inline-end"],
7665 initial_values: ["0"],
7666 other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
7667 invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
7669 "scroll-margin-inline-start": {
7670 domProp: "scrollMarginInlineStart",
7672 type: CSS_TYPE_LONGHAND,
7674 initial_values: ["0"],
7675 other_values: ["-10px", "calc(2em + 3ex)"],
7676 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7678 "scroll-margin-inline-end": {
7679 domProp: "scrollMarginInlineEnd",
7681 type: CSS_TYPE_LONGHAND,
7683 initial_values: ["0"],
7684 other_values: ["-10px", "calc(2em + 3ex)"],
7685 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7687 "scroll-margin-block": {
7688 domProp: "scrollMarginBlock",
7690 type: CSS_TYPE_TRUE_SHORTHAND,
7691 subproperties: ["scroll-margin-block-start", "scroll-margin-block-end"],
7692 initial_values: ["0"],
7693 other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
7694 invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
7696 "scroll-margin-block-start": {
7697 domProp: "scrollMarginBlockStart",
7699 type: CSS_TYPE_LONGHAND,
7701 initial_values: ["0"],
7702 other_values: ["-10px", "calc(2em + 3ex)"],
7703 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7705 "scroll-margin-block-end": {
7706 domProp: "scrollMarginBlockEnd",
7708 type: CSS_TYPE_LONGHAND,
7710 initial_values: ["0"],
7711 other_values: ["-10px", "calc(2em + 3ex)"],
7712 invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7715 domProp: "scrollPadding",
7717 type: CSS_TYPE_TRUE_SHORTHAND,
7719 "scroll-padding-top",
7720 "scroll-padding-right",
7721 "scroll-padding-bottom",
7722 "scroll-padding-left",
7724 initial_values: ["auto"],
7735 invalid_values: ["20", "-20px"],
7737 "scroll-padding-top": {
7738 domProp: "scrollPaddingTop",
7740 type: CSS_TYPE_LONGHAND,
7741 initial_values: ["auto"],
7750 invalid_values: ["20", "-20px"],
7752 "scroll-padding-right": {
7753 domProp: "scrollPaddingRight",
7755 type: CSS_TYPE_LONGHAND,
7756 initial_values: ["auto"],
7765 invalid_values: ["20", "-20px"],
7767 "scroll-padding-bottom": {
7768 domProp: "scrollPaddingBottom",
7770 type: CSS_TYPE_LONGHAND,
7771 initial_values: ["auto"],
7780 invalid_values: ["20", "-20px"],
7782 "scroll-padding-left": {
7783 domProp: "scrollPaddingLeft",
7785 type: CSS_TYPE_LONGHAND,
7786 initial_values: ["auto"],
7795 invalid_values: ["20", "-20px"],
7797 "scroll-padding-inline": {
7798 domProp: "scrollPaddingInline",
7800 type: CSS_TYPE_TRUE_SHORTHAND,
7801 subproperties: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
7802 initial_values: ["auto", "auto auto"],
7811 invalid_values: ["20", "-20px"],
7813 "scroll-padding-inline-start": {
7814 domProp: "scrollPaddingInlineStart",
7816 type: CSS_TYPE_LONGHAND,
7818 initial_values: ["auto"],
7827 invalid_values: ["20", "-20px"],
7829 "scroll-padding-inline-end": {
7830 domProp: "scrollPaddingInlineEnd",
7832 type: CSS_TYPE_LONGHAND,
7834 initial_values: ["auto"],
7843 invalid_values: ["20", "-20px"],
7845 "scroll-padding-block": {
7846 domProp: "scrollPaddingBlock",
7848 type: CSS_TYPE_TRUE_SHORTHAND,
7849 subproperties: ["scroll-padding-block-start", "scroll-padding-block-end"],
7850 initial_values: ["auto", "auto auto"],
7859 invalid_values: ["20", "-20px"],
7861 "scroll-padding-block-start": {
7862 domProp: "scrollPaddingBlockStart",
7864 type: CSS_TYPE_LONGHAND,
7866 initial_values: ["auto"],
7875 invalid_values: ["20", "-20px"],
7877 "scroll-padding-block-end": {
7878 domProp: "scrollPaddingBlockEnd",
7880 type: CSS_TYPE_LONGHAND,
7882 initial_values: ["auto"],
7891 invalid_values: ["20", "-20px"],
7894 domProp: "tableLayout",
7896 type: CSS_TYPE_LONGHAND,
7897 initial_values: ["auto"],
7898 other_values: ["fixed"],
7902 domProp: "textAlign",
7904 type: CSS_TYPE_LONGHAND,
7905 applies_to_placeholder: true,
7906 // don't know whether left and right are same as start
7907 initial_values: ["start"],
7908 other_values: ["center", "justify", "end", "match-parent"],
7913 "-moz-center-or-inherit",
7918 "text-align-last": {
7919 domProp: "textAlignLast",
7921 type: CSS_TYPE_LONGHAND,
7922 initial_values: ["auto"],
7923 other_values: ["center", "justify", "start", "end", "left", "right"],
7926 "text-combine-upright": {
7927 domProp: "textCombineUpright",
7929 type: CSS_TYPE_LONGHAND,
7930 applies_to_cue: true,
7931 applies_to_marker: true,
7932 initial_values: ["none"],
7933 other_values: ["all"],
7951 "text-decoration": {
7952 domProp: "textDecoration",
7954 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
7955 applies_to_first_letter: true,
7956 applies_to_first_line: true,
7957 applies_to_placeholder: true,
7958 applies_to_cue: true,
7960 "text-decoration-color",
7961 "text-decoration-line",
7962 "text-decoration-style",
7963 "text-decoration-thickness",
7965 initial_values: ["none"],
7971 "blink line-through underline",
7972 "underline overline line-through blink",
7973 "underline red solid",
7974 "underline #ff0000",
7977 "#ff0000 underline",
7979 "solid underline 50px",
7980 "underline 50px blue",
7981 "50px dotted line-through purple",
7983 "underline from-font",
7984 "red from-font overline",
7985 "5% underline blue",
7986 "dotted line-through 25%",
7994 "line-through blink line-through",
7995 "underline overline line-through blink none",
7996 "underline overline line-throuh blink blink",
7997 "rgb(0, rubbish, 0) underline",
7998 "from font blue underline",
8001 "text-decoration-color": {
8002 domProp: "textDecorationColor",
8004 type: CSS_TYPE_LONGHAND,
8005 applies_to_first_letter: true,
8006 applies_to_first_line: true,
8007 applies_to_placeholder: true,
8008 applies_to_cue: true,
8009 prerequisites: { color: "black" },
8010 initial_values: ["currentColor"],
8011 other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
8022 "text-decoration-line": {
8023 domProp: "textDecorationLine",
8025 type: CSS_TYPE_LONGHAND,
8026 applies_to_first_letter: true,
8027 applies_to_first_line: true,
8028 applies_to_placeholder: true,
8029 applies_to_cue: true,
8030 initial_values: ["none"],
8036 "blink line-through underline",
8037 "underline overline line-through blink",
8043 "line-through blink line-through",
8044 "underline overline line-through blink none",
8045 "underline overline line-throuh blink blink",
8048 "text-decoration-style": {
8049 domProp: "textDecorationStyle",
8051 type: CSS_TYPE_LONGHAND,
8052 applies_to_first_letter: true,
8053 applies_to_first_line: true,
8054 applies_to_placeholder: true,
8055 applies_to_cue: true,
8056 initial_values: ["solid"],
8057 other_values: ["double", "dotted", "dashed", "wavy", "-moz-none"],
8068 "text-decoration-thickness": {
8069 domProp: "textDecorationThickness",
8071 type: CSS_TYPE_LONGHAND,
8072 applies_to_first_letter: true,
8073 applies_to_first_line: true,
8074 applies_to_placeholder: true,
8075 applies_to_cue: true,
8076 initial_values: ["auto"],
8087 invalid_values: ["13", "-25", "rubbish", ",./!@#$", "from font"],
8089 "text-decoration-skip-ink": {
8090 domProp: "textDecorationSkipInk",
8092 type: CSS_TYPE_LONGHAND,
8093 applies_to_first_letter: true,
8094 applies_to_first_line: true,
8095 applies_to_placeholder: true,
8096 initial_values: ["auto"],
8097 other_values: ["none", "all"],
8112 "text-underline-offset": {
8113 domProp: "textUnderlineOffset",
8115 type: CSS_TYPE_LONGHAND,
8116 applies_to_first_letter: true,
8117 applies_to_first_line: true,
8118 applies_to_placeholder: true,
8119 initial_values: ["auto"],
8120 other_values: ["0", "-14px", "25px", "100em", "-45em", "43%", "-10%"],
8130 "text-underline-position": {
8131 domProp: "textUnderlinePosition",
8133 type: CSS_TYPE_LONGHAND,
8134 applies_to_first_letter: true,
8135 applies_to_first_line: true,
8136 applies_to_placeholder: true,
8137 initial_values: ["auto"],
8166 domProp: "textEmphasis",
8168 type: CSS_TYPE_TRUE_SHORTHAND,
8169 prerequisites: { color: "black" },
8170 subproperties: ["text-emphasis-style", "text-emphasis-color"],
8172 "none currentColor",
8173 "currentColor none",
8181 "sesame filled rgba(0,0,255,0.5)",
8184 "currentColor filled",
8185 "currentColor open",
8189 "filled filled red",
8190 "open open circle #000",
8195 "text-emphasis-color": {
8196 domProp: "textEmphasisColor",
8198 type: CSS_TYPE_LONGHAND,
8199 prerequisites: { color: "black" },
8200 initial_values: ["currentColor", "black", "rgb(0,0,0)"],
8201 other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
8213 "text-emphasis-position": {
8214 domProp: "textEmphasisPosition",
8216 type: CSS_TYPE_LONGHAND,
8217 initial_values: ["over right", "right over", "over"],
8235 "text-emphasis-style": {
8236 domProp: "textEmphasisStyle",
8238 type: CSS_TYPE_LONGHAND,
8239 initial_values: ["none"],
8251 "filled double-circle",
8256 "double-circle filled",
8261 "double-circle open",
8283 domProp: "textIndent",
8285 type: CSS_TYPE_LONGHAND,
8286 initial_values: ["0", "calc(3em - 5em + 2px + 2em - 2px)"],
8296 "calc(3*25px + 50%)",
8299 quirks_values: { 5: "5px" },
8302 domProp: "textOverflow",
8304 type: CSS_TYPE_LONGHAND,
8305 applies_to_placeholder: true,
8306 initial_values: ["clip"],
8313 "ellipsis ellipsis",
8339 domProp: "textShadow",
8341 type: CSS_TYPE_LONGHAND,
8342 applies_to_first_letter: true,
8343 applies_to_first_line: true,
8344 applies_to_placeholder: true,
8345 applies_to_cue: true,
8346 prerequisites: { color: "blue" },
8347 initial_values: ["none"],
8352 "2px 2px 1px green",
8354 "green 2px 2px 1px",
8355 "green 2px 2px, blue 1px 3px 4px",
8356 "currentColor 3px 3px",
8357 "blue 2px 2px, currentColor 1px 2px",
8359 "2px 2px calc(-5px)" /* clamped */,
8360 "calc(3em - 2px) 2px green",
8361 "green calc(3em - 2px) 2px",
8362 "2px calc(2px + 0.2em)",
8363 "blue 2px calc(2px + 0.2em)",
8364 "2px calc(2px + 0.2em) blue",
8365 "calc(-2px) calc(-2px)",
8367 "calc(2px) calc(2px)",
8368 "calc(2px) calc(2px) calc(2px)",
8382 "calc(2px) calc(2px) calc(2px) calc(2px)",
8383 "3px 3px calc(3px + rubbish)",
8389 domProp: "textTransform",
8391 type: CSS_TYPE_LONGHAND,
8392 applies_to_first_letter: true,
8393 applies_to_first_line: true,
8394 applies_to_placeholder: true,
8395 applies_to_marker: true,
8396 initial_values: ["none"],
8403 "uppercase full-width",
8404 "full-size-kana capitalize",
8405 "full-width lowercase full-size-kana",
8411 "uppercase lowercase",
8412 "full-width capitalize full-width",
8413 "uppercase full-width lowercase",
8417 domProp: "textWrap",
8419 type: CSS_TYPE_TRUE_SHORTHAND,
8420 subproperties: ["text-wrap-mode"],
8421 applies_to_placeholder: true,
8422 applies_to_cue: true,
8423 applies_to_marker: true,
8424 initial_values: ["wrap"],
8425 other_values: ["nowrap"],
8429 domProp: "textWrapMode",
8431 type: CSS_TYPE_LONGHAND,
8432 applies_to_cue: true,
8433 applies_to_placeholder: true,
8434 applies_to_marker: true,
8435 initial_values: ["wrap"],
8436 other_values: ["nowrap"],
8437 invalid_values: ["none", "normal", "on", "off", "wrap nowrap"],
8442 type: CSS_TYPE_LONGHAND,
8443 /* FIXME: run tests with multiple prerequisites */
8444 prerequisites: { position: "relative" },
8445 /* XXX 0 may or may not be equal to auto */
8446 initial_values: ["auto"],
8456 "calc(3*25px + 50%)",
8459 quirks_values: { 5: "5px" },
8462 domProp: "transition",
8464 type: CSS_TYPE_TRUE_SHORTHAND,
8465 applies_to_marker: true,
8467 "transition-property",
8468 "transition-duration",
8469 "transition-timing-function",
8472 initial_values: ["all 0s ease 0s", "all", "0s", "0s 0s", "ease"],
8474 "all 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) 0s",
8475 "width 1s linear 2s",
8476 "width 1s 2s linear",
8477 "width linear 1s 2s",
8478 "linear width 1s 2s",
8479 "linear 1s width 2s",
8480 "linear 1s 2s width",
8481 "1s width linear 2s",
8482 "1s width 2s linear",
8483 "1s 2s width linear",
8484 "1s linear width 2s",
8485 "1s linear 2s width",
8486 "1s 2s linear width",
8514 "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)",
8515 "1s \\32width linear 2s",
8516 "1s -width linear 2s",
8517 "1s -\\32width linear 2s",
8518 "1s \\32 0width linear 2s",
8519 "1s -\\32 0width linear 2s",
8520 "1s \\2width linear 2s",
8521 "1s -\\2width linear 2s",
8530 "none 2s linear 2s",
8533 "1s width, 2s none",
8534 "2s none, 1s width",
8537 "2s width, 1s inherit",
8538 "2s inherit, 1s width",
8540 "1s width,,2s color",
8541 "1s width, ,2s color",
8542 "bounce 1s cubic-bezier(0, rubbish) 2s",
8543 "bounce 1s steps(rubbish) 2s",
8547 "transition-delay": {
8548 domProp: "transitionDelay",
8550 type: CSS_TYPE_LONGHAND,
8551 applies_to_marker: true,
8552 initial_values: ["0s", "0ms"],
8553 other_values: ["1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
8554 invalid_values: ["0", "0px"],
8556 "transition-duration": {
8557 domProp: "transitionDuration",
8559 type: CSS_TYPE_LONGHAND,
8560 applies_to_marker: true,
8561 initial_values: ["0s", "0ms"],
8562 other_values: ["1s", "250ms", "1s, 250ms, 2.3s"],
8563 invalid_values: ["0", "0px", "-1ms", "-2s"],
8565 "transition-property": {
8566 domProp: "transitionProperty",
8568 type: CSS_TYPE_LONGHAND,
8569 applies_to_marker: true,
8570 initial_values: ["all"],
8576 "width, height, opacity",
8605 "transition-timing-function": {
8606 domProp: "transitionTimingFunction",
8608 type: CSS_TYPE_LONGHAND,
8609 applies_to_marker: true,
8610 initial_values: ["ease"],
8612 "cubic-bezier(0.25, 0.1, 0.25, 1.0)",
8617 "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)",
8618 "cubic-bezier(0.5, 0.5, 0.5, 0.5)",
8619 "cubic-bezier(0.25, 1.5, 0.75, -0.5)",
8626 "steps(1, jump-start)",
8627 "steps(1, jump-end)",
8628 "steps(2, jump-none)",
8629 "steps(1, jump-both)",
8634 "cubic-bezier(0.25, 0.1, 0.25)",
8635 "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)",
8636 "cubic-bezier(-0.5, 0.5, 0.5, 0.5)",
8637 "cubic-bezier(1.5, 0.5, 0.5, 0.5)",
8638 "cubic-bezier(0.5, 0.5, -0.5, 0.5)",
8639 "cubic-bezier(0.5, 0.5, 1.5, 0.5)",
8640 "steps(2, step-end)",
8643 "steps(0, step-end, 1)",
8644 "steps(0, jump-start)",
8645 "steps(0, jump-end)",
8646 "steps(1, jump-none)",
8647 "steps(0, jump-both)",
8651 domProp: "unicodeBidi",
8653 type: CSS_TYPE_LONGHAND,
8654 applies_to_marker: true,
8655 initial_values: ["normal"],
8668 "-moz-isolate-override",
8672 domProp: "verticalAlign",
8674 type: CSS_TYPE_LONGHAND,
8675 applies_to_first_letter: true,
8676 applies_to_first_line: true,
8677 applies_to_placeholder: true,
8678 initial_values: ["baseline"],
8687 "-moz-middle-with-baseline",
8698 "calc(3*25px + 50%)",
8701 quirks_values: { 5: "5px" },
8703 "baseline-source": {
8704 domProp: "baselineSource",
8706 type: CSS_TYPE_LONGHAND,
8707 applies_to_first_letter: true,
8708 applies_to_first_line: true,
8709 applies_to_placeholder: true,
8710 initial_values: ["auto"],
8711 other_values: ["first", "last"],
8715 domProp: "visibility",
8717 type: CSS_TYPE_LONGHAND,
8718 applies_to_cue: true,
8719 initial_values: ["visible"],
8720 other_values: ["hidden", "collapse"],
8724 domProp: "whiteSpace",
8726 type: CSS_TYPE_TRUE_SHORTHAND,
8727 subproperties: ["white-space-collapse", "text-wrap-mode"],
8728 applies_to_placeholder: true,
8729 applies_to_cue: true,
8730 applies_to_marker: true,
8731 initial_values: ["normal"],
8742 "white-space-collapse": {
8743 domProp: "whiteSpaceCollapse",
8745 type: CSS_TYPE_LONGHAND,
8746 applies_to_placeholder: true,
8747 applies_to_cue: true,
8748 applies_to_marker: true,
8749 initial_values: ["collapse"],
8756 invalid_values: ["normal", "auto"],
8761 type: CSS_TYPE_LONGHAND,
8763 // computed value tests for width test more with display:block
8765 // add some margin to avoid the initial "auto" value getting
8766 // resolved to the same length as the parent element.
8767 "margin-left": "5px",
8769 initial_values: [" auto"],
8770 /* XXX these have prerequisites */
8775 // these three keywords compute to the initial value only when the
8776 // writing mode is vertical, and we're testing with a horizontal
8782 // these two keywords are the aliases of above first two.
8785 // whether -moz-available computes to the initial value depends on
8786 // the container size, and for the container size we're testing
8788 // "-moz-available",
8813 /* valid calc() values */
8820 "calc( 50% + 2px )",
8831 "calc(3*25px + 50%)",
8832 "calc(50% - 3em + 2px)",
8833 "calc(50% - (3em + 2px))",
8834 "calc((50% - 3em) + 2px)",
8838 "calc(50px/(2 - 1))",
8840 "calc(min(5px,2em))",
8842 "calc(max(5px,2em))",
8847 "fit-content(100px)",
8849 "fit-content(calc(3*25px + 50%))",
8854 "content" /* (valid for 'flex-basis' but not 'width') */,
8855 /* invalid calc() values */
8865 "-moz-min(5px,2em)",
8866 "-moz-max(5px,2em)",
8867 /* If we ever support division by values, which is
8868 * complicated for the reasons described in
8869 * http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html
8870 * , we should support all 4 of these as described in
8871 * http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html
8873 "calc((3em / 100%) * 3em)",
8874 "calc(3em / 100% * 3em)",
8875 "calc(3em * (3em / 100%))",
8876 "calc(3em * 3em / 100%)",
8878 quirks_values: { 5: "5px" },
8881 domProp: "willChange",
8883 type: CSS_TYPE_LONGHAND,
8884 initial_values: ["auto"],
8890 "scroll-position, transform",
8891 "transform, opacity",
8892 "contents, transform",
8893 "property-that-doesnt-exist-yet",
8899 "auto, scroll-position",
8900 "scroll-position, auto",
8901 "transform scroll-position",
8905 "transform, will-change",
8909 domProp: "wordBreak",
8911 type: CSS_TYPE_LONGHAND,
8912 initial_values: ["normal"],
8913 other_values: ["break-all", "keep-all"],
8917 domProp: "wordSpacing",
8919 type: CSS_TYPE_LONGHAND,
8920 applies_to_first_letter: true,
8921 applies_to_first_line: true,
8922 applies_to_placeholder: true,
8923 initial_values: ["normal", "0", "0px", "-0em", "calc(-0px)", "calc(0em)"],
8937 "calc(-10%/2 - 1em)",
8940 quirks_values: { 5: "5px" },
8943 domProp: "overflowWrap",
8945 type: CSS_TYPE_LONGHAND,
8946 initial_values: ["normal"],
8947 other_values: ["break-word"],
8953 type: CSS_TYPE_LONGHAND,
8954 initial_values: ["manual"],
8955 other_values: ["none", "auto"],
8961 type: CSS_TYPE_LONGHAND,
8962 /* XXX requires position */
8963 initial_values: ["auto"],
8964 other_values: ["0", "3", "-7000", "12000"],
8965 invalid_values: ["3.0", "17.5", "3e1"],
8968 domProp: "clipPath",
8970 type: CSS_TYPE_LONGHAND,
8971 initial_values: ["none"],
8973 "path(nonzero, 'M 10 10 h 100 v 100 h-100 v-100 z')",
8974 "path(evenodd, 'M 10 10 h 100 v 100 h-100 v-100 z')",
8975 "path('M10,30A20,20 0,0,1 50,30A20,20 0,0,1 90,30Q90,60 50,90Q10,60 10,30z')",
8977 "url('404.svg#mypath')",
8978 "url(#my-clip-path)",
8981 .concat(basicShapeSVGBoxValues)
8982 .concat(basicShapeOtherValues)
8983 .concat(basicShapeOtherValuesWithFillRule)
8984 .concat(basicShapeXywhRectValues)
8985 .concat(basicShapeShapeValues)
8986 .concat(basicShapeShapeValuesWithFillRule),
8989 "path(abs, 'M 10 10 L 10 10 z')",
8990 "path(evenodd, '')",
8992 ].concat(basicShapeInvalidValues),
8993 unbalanced_values: basicShapeUnbalancedValues,
8996 domProp: "clipRule",
8998 type: CSS_TYPE_LONGHAND,
8999 initial_values: ["nonzero"],
9000 other_values: ["evenodd"],
9003 "color-interpolation": {
9004 domProp: "colorInterpolation",
9006 type: CSS_TYPE_LONGHAND,
9007 initial_values: ["sRGB"],
9008 other_values: ["auto", "linearRGB"],
9011 "color-interpolation-filters": {
9012 domProp: "colorInterpolationFilters",
9014 type: CSS_TYPE_LONGHAND,
9015 initial_values: ["linearRGB"],
9016 other_values: ["sRGB", "auto"],
9019 "dominant-baseline": {
9020 domProp: "dominantBaseline",
9022 type: CSS_TYPE_LONGHAND,
9023 initial_values: ["auto"],
9039 type: CSS_TYPE_LONGHAND,
9040 applies_to_first_letter: true,
9041 applies_to_first_line: true,
9042 prerequisites: { color: "blue" },
9043 initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9048 "url(foo.svg#myserver)",
9049 'url("#myserver") green',
9055 invalid_values: ["000000", "ff00ff", "url('#myserver') rgb(0, rubbish, 0)"],
9058 domProp: "fillOpacity",
9060 type: CSS_TYPE_LONGHAND,
9061 applies_to_first_letter: true,
9062 applies_to_first_line: true,
9063 initial_values: ["1", "2.8", "1.000", "300%"],
9070 "context-fill-opacity",
9071 "context-stroke-opacity",
9076 domProp: "fillRule",
9078 type: CSS_TYPE_LONGHAND,
9079 applies_to_first_letter: true,
9080 applies_to_first_line: true,
9081 initial_values: ["nonzero"],
9082 other_values: ["evenodd"],
9088 type: CSS_TYPE_LONGHAND,
9089 initial_values: ["none"],
9091 // SVG reference filters
9093 "url(#my-filter-1) url(#my-filter-2)",
9096 "opacity(50%) saturate(1.0)",
9097 "invert(50%) sepia(0.1) brightness(90%)",
9099 // Mixed SVG reference filters and filter functions
9100 "grayscale(1) url(#my-filter-1)",
9101 "url(#my-filter-1) brightness(50%) contrast(0.9)",
9104 "url('badscheme:badurl')",
9105 "blur(3px) url('badscheme:badurl') grayscale(50%)",
9114 "blur(calc(-1px))", // Parses and becomes blur(0px).
9117 "blur(calc(2 * 5px))",
9126 "brightness(4.567)",
9137 "drop-shadow(2px 2px)",
9138 "drop-shadow(2px 2px 1px)",
9139 "drop-shadow(2px 2px green)",
9140 "drop-shadow(2px 2px 1px green)",
9141 "drop-shadow(green 2px 2px)",
9142 "drop-shadow(green 2px 2px 1px)",
9143 "drop-shadow(currentColor 3px 3px)",
9144 "drop-shadow(2px 2px calc(-5px))" /* clamped */,
9145 "drop-shadow(calc(3em - 2px) 2px green)",
9146 "drop-shadow(green calc(3em - 2px) 2px)",
9147 "drop-shadow(2px calc(2px + 0.2em))",
9148 "drop-shadow(blue 2px calc(2px + 0.2em))",
9149 "drop-shadow(2px calc(2px + 0.2em) blue)",
9150 "drop-shadow(calc(-2px) calc(-2px))",
9151 "drop-shadow(-2px -2px)",
9152 "drop-shadow(calc(2px) calc(2px))",
9153 "drop-shadow(calc(2px) calc(2px) calc(2px))",
9167 "hue-rotate(90deg)",
9168 "hue-rotate(540deg)",
9169 "hue-rotate(-90deg)",
9170 "hue-rotate(10grad)",
9171 "hue-rotate(1.6rad)",
9172 "hue-rotate(-1.6rad)",
9173 "hue-rotate(0.5turn)",
9174 "hue-rotate(-2turn)",
9215 "url(#my-filter) none",
9216 "none url(#my-filter)",
9217 "blur(2px) none url(#my-filter)",
9220 "grayscale(invert(1.0))",
9222 // Comma delimited filters
9224 "invert(50%), url(#my-filter), brightness(90%)",
9226 // Test the following situations for each filter function:
9227 // - Invalid number of arguments
9228 // - Comma delimited arguments
9229 // - Wrong argument type
9230 // - Argument value out of range
9237 "blur(calc(0))", // Unitless zero in calc is not a valid length.
9240 "blur(calc(20px - 5%))",
9243 "brightness(0.5 0.5)",
9245 "brightness(0.5, 0.5)",
9246 "brightness(#my-filter)",
9250 "contrast(0.5 0.5)",
9252 "contrast(0.5, 0.5)",
9253 "contrast(#my-filter)",
9258 "drop-shadow(3% 3%)",
9259 "drop-shadow(2px 2px -5px)",
9260 "drop-shadow(2px 2px 2px 2px)",
9261 "drop-shadow(2px 2px, none)",
9262 "drop-shadow(none, 2px 2px)",
9263 "drop-shadow(inherit, 2px 2px)",
9264 "drop-shadow(2px 2px, inherit)",
9265 "drop-shadow(2 2px)",
9266 "drop-shadow(2px 2)",
9267 "drop-shadow(2px 2px 2)",
9268 "drop-shadow(2px 2px 2px 2)",
9269 "drop-shadow(calc(2px) calc(2px) calc(2px) calc(2px))",
9270 "drop-shadow(green 2px 2px, blue 1px 3px 4px)",
9271 "drop-shadow(blue 2px 2px, currentColor 1px 2px)",
9272 "drop-shadow(unset, 2px 2px)",
9273 "drop-shadow(2px 2px, unset)",
9275 "grayscale(0.5 0.5)",
9277 "grayscale(0.5, 0.5)",
9278 "grayscale(#my-filter)",
9282 "hue-rotate(0.5 0.5)",
9284 "hue-rotate(0.5, 0.5)",
9285 "hue-rotate(#my-filter)",
9288 "hue-rotate(45deg,)",
9293 "invert(#my-filter)",
9299 "opacity(0.5, 0.5)",
9300 "opacity(#my-filter)",
9304 "saturate(0.5 0.5)",
9306 "saturate(0.5, 0.5)",
9307 "saturate(#my-filter)",
9314 "sepia(#my-filter)",
9320 domProp: "floodColor",
9322 type: CSS_TYPE_LONGHAND,
9323 prerequisites: { color: "blue" },
9324 initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9325 other_values: ["green", "#fc3", "currentColor"],
9328 "url(foo.svg#myserver)",
9329 'url("#myserver") green',
9335 domProp: "floodOpacity",
9337 type: CSS_TYPE_LONGHAND,
9338 initial_values: ["1", "2.8", "1.000", "300%"],
9339 other_values: ["0", "0.3", "-7.3", "-100%", "50%"],
9342 "image-orientation": {
9343 domProp: "imageOrientation",
9345 type: CSS_TYPE_LONGHAND,
9346 initial_values: ["from-image"],
9347 other_values: ["none"],
9348 invalid_values: ["0", "0deg"],
9350 "image-rendering": {
9351 domProp: "imageRendering",
9353 type: CSS_TYPE_LONGHAND,
9354 initial_values: ["auto"],
9366 domProp: "isolation",
9368 type: CSS_TYPE_LONGHAND,
9369 initial_values: ["auto"],
9370 other_values: ["isolate"],
9374 domProp: "lightingColor",
9376 type: CSS_TYPE_LONGHAND,
9377 prerequisites: { color: "blue" },
9383 "rgba(255,255,255,1.0)",
9384 "rgba(255,255,255,42.0)",
9386 other_values: ["green", "#fc3", "currentColor"],
9389 "url(foo.svg#myserver)",
9390 'url("#myserver") green',
9398 type: CSS_TYPE_TRUE_SHORTHAND,
9399 subproperties: ["marker-start", "marker-mid", "marker-end"],
9400 initial_values: ["none"],
9401 other_values: ["url(#mysym)"],
9404 "url(#mysym) url(#mysym)",
9410 domProp: "markerEnd",
9412 type: CSS_TYPE_LONGHAND,
9413 initial_values: ["none"],
9414 other_values: ["url(#mysym)"],
9418 domProp: "markerMid",
9420 type: CSS_TYPE_LONGHAND,
9421 initial_values: ["none"],
9422 other_values: ["url(#mysym)"],
9426 domProp: "markerStart",
9428 type: CSS_TYPE_LONGHAND,
9429 initial_values: ["none"],
9430 other_values: ["url(#mysym)"],
9434 domProp: "mixBlendMode",
9436 type: CSS_TYPE_LONGHAND,
9437 initial_values: ["normal"],
9458 "shape-image-threshold": {
9459 domProp: "shapeImageThreshold",
9461 type: CSS_TYPE_LONGHAND,
9462 applies_to_first_letter: true,
9463 initial_values: ["0", "0.0000", "-3", "0%", "-100%"],
9478 invalid_values: ["0px", "1px", "default", "auto"],
9481 domProp: "shapeMargin",
9483 type: CSS_TYPE_LONGHAND,
9484 applies_to_first_letter: true,
9485 initial_values: ["0"],
9486 other_values: ["2px", "2%", "1em", "calc(1px + 1em)", "calc(1%)"],
9487 invalid_values: ["-1px", "auto", "none", "1px 1px", "-1%"],
9490 domProp: "shapeOutside",
9492 type: CSS_TYPE_LONGHAND,
9493 applies_to_first_letter: true,
9494 initial_values: ["none"],
9495 other_values: ["url(#my-shape-outside)", "margin-box"].concat(
9496 basicShapeOtherValues,
9497 basicShapeOtherValuesWithFillRule,
9498 validNonUrlImageValues
9500 invalid_values: [].concat(
9501 basicShapeSVGBoxValues,
9502 basicShapeInvalidValues,
9503 invalidNonUrlImageValues
9505 unbalanced_values: [].concat(
9506 basicShapeUnbalancedValues,
9507 unbalancedGradientAndElementValues
9510 "shape-rendering": {
9511 domProp: "shapeRendering",
9513 type: CSS_TYPE_LONGHAND,
9514 initial_values: ["auto"],
9515 other_values: ["optimizeSpeed", "crispEdges", "geometricPrecision"],
9519 domProp: "stopColor",
9521 type: CSS_TYPE_LONGHAND,
9522 prerequisites: { color: "blue" },
9523 initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9524 other_values: ["green", "#fc3", "currentColor"],
9527 "url(foo.svg#myserver)",
9528 'url("#myserver") green',
9534 domProp: "stopOpacity",
9536 type: CSS_TYPE_LONGHAND,
9537 initial_values: ["1", "2.8", "1.000", "300%"],
9538 other_values: ["0", "0.3", "-7.3", "-100%", "50%"],
9544 type: CSS_TYPE_LONGHAND,
9545 applies_to_first_letter: true,
9546 applies_to_first_line: true,
9547 initial_values: ["none"],
9557 "url(foo.svg#myserver)",
9558 'url("#myserver") green',
9563 invalid_values: ["000000", "ff00ff"],
9565 "stroke-dasharray": {
9566 domProp: "strokeDasharray",
9568 type: CSS_TYPE_LONGHAND,
9569 applies_to_first_letter: true,
9570 applies_to_first_line: true,
9571 initial_values: ["none"],
9575 " 5px ,3px\t, 2px ",
9582 invalid_values: ["-5px,3px,2px", "5px,3px,-2px"],
9584 "stroke-dashoffset": {
9585 domProp: "strokeDashoffset",
9587 applies_to_first_letter: true,
9588 applies_to_first_line: true,
9589 type: CSS_TYPE_LONGHAND,
9590 initial_values: ["0", "-0px", "0em"],
9591 other_values: ["3px", "3%", "1em", "0.0002", "context-value"],
9595 domProp: "strokeLinecap",
9597 type: CSS_TYPE_LONGHAND,
9598 applies_to_first_letter: true,
9599 applies_to_first_line: true,
9600 initial_values: ["butt"],
9601 other_values: ["round", "square"],
9604 "stroke-linejoin": {
9605 domProp: "strokeLinejoin",
9607 type: CSS_TYPE_LONGHAND,
9608 applies_to_first_letter: true,
9609 applies_to_first_line: true,
9610 initial_values: ["miter"],
9611 other_values: ["round", "bevel"],
9614 "stroke-miterlimit": {
9615 domProp: "strokeMiterlimit",
9617 type: CSS_TYPE_LONGHAND,
9618 applies_to_first_letter: true,
9619 applies_to_first_line: true,
9620 initial_values: ["4"],
9621 other_values: ["0", "0.9", "1", "7", "5000", "1.1"],
9622 invalid_values: ["-1", "3px", "-0.3"],
9625 domProp: "strokeOpacity",
9627 type: CSS_TYPE_LONGHAND,
9628 applies_to_first_letter: true,
9629 applies_to_first_line: true,
9630 initial_values: ["1", "2.8", "1.000", "300%"],
9637 "context-fill-opacity",
9638 "context-stroke-opacity",
9643 domProp: "strokeWidth",
9645 type: CSS_TYPE_LONGHAND,
9646 applies_to_first_letter: true,
9647 applies_to_first_line: true,
9648 initial_values: ["1px"],
9658 invalid_values: ["-0.1px", "-3px"],
9663 type: CSS_TYPE_LONGHAND,
9664 initial_values: ["0px"],
9665 other_values: ["-1em", "17px", "0.2em", "23.4%"],
9666 invalid_values: ["auto", "context-value", "0.0002"],
9671 type: CSS_TYPE_LONGHAND,
9672 initial_values: ["0px"],
9673 other_values: ["-1em", "17px", "0.2em", "23.4%"],
9674 invalid_values: ["auto", "context-value", "0.0002"],
9679 type: CSS_TYPE_LONGHAND,
9680 initial_values: ["0px"],
9681 other_values: ["-1em", "17px", "0.2em", "23.4%"],
9682 invalid_values: ["auto", "context-value", "0.0002"],
9687 type: CSS_TYPE_LONGHAND,
9688 initial_values: ["0px"],
9689 other_values: ["-1em", "17px", "0.2em", "23.4%"],
9690 invalid_values: ["auto", "context-value", "0.0002"],
9695 type: CSS_TYPE_LONGHAND,
9696 initial_values: ["0px"],
9697 other_values: ["17px", "0.2em", "23.4%"],
9698 invalid_values: ["auto", "-1", "-1.5px", "0.0002"],
9703 type: CSS_TYPE_LONGHAND,
9704 initial_values: ["auto"],
9705 other_values: ["17px", "0.2em", "23.4%"],
9706 invalid_values: ["hello", "-12px", "0.0002"],
9711 type: CSS_TYPE_LONGHAND,
9712 initial_values: ["auto"],
9713 other_values: ["17px", "0.2em", "23.4%"],
9714 invalid_values: ["hello", "-1.3px", "0.0002"],
9717 domProp: "textAnchor",
9719 type: CSS_TYPE_LONGHAND,
9720 initial_values: ["start"],
9721 other_values: ["middle", "end"],
9725 domProp: "textRendering",
9727 type: CSS_TYPE_LONGHAND,
9728 applies_to_first_letter: true,
9729 applies_to_first_line: true,
9730 initial_values: ["auto"],
9731 other_values: ["optimizeSpeed", "optimizeLegibility", "geometricPrecision"],
9735 domProp: "vectorEffect",
9737 type: CSS_TYPE_LONGHAND,
9738 applies_to_first_letter: true,
9739 applies_to_first_line: true,
9740 initial_values: ["none"],
9741 other_values: ["non-scaling-stroke"],
9744 "-moz-window-dragging": {
9745 domProp: "MozWindowDragging",
9747 type: CSS_TYPE_LONGHAND,
9748 initial_values: ["default"],
9749 other_values: ["drag", "no-drag"],
9750 invalid_values: ["none"],
9753 domProp: "accentColor",
9755 type: CSS_TYPE_LONGHAND,
9756 prerequisites: { color: "black" },
9757 initial_values: ["auto"],
9763 "rgba(128,128,128,.5)",
9766 invalid_values: ["#0", "#00", "#00000", "cc00ff"],
9769 domProp: "alignContent",
9771 type: CSS_TYPE_LONGHAND,
9772 initial_values: ["normal"],
9801 "safe end unsafe start",
9803 "normal safe start",
9806 "space-between unsafe",
9816 domProp: "alignItems",
9818 type: CSS_TYPE_LONGHAND,
9819 initial_values: ["normal"],
9854 domProp: "alignSelf",
9856 type: CSS_TYPE_LONGHAND,
9857 initial_values: ["auto"],
9882 "justify-content": {
9883 domProp: "justifyContent",
9885 type: CSS_TYPE_LONGHAND,
9886 initial_values: ["normal"],
9914 "safe end unsafe start",
9916 "normal safe start",
9919 "space-around unsafe",
9927 domProp: "justifyItems",
9929 type: CSS_TYPE_LONGHAND,
9930 initial_values: ["legacy", "normal"],
9964 "legacy left legacy",
9973 domProp: "justifySelf",
9975 type: CSS_TYPE_LONGHAND,
9976 initial_values: ["auto"],
10011 domProp: "placeContent",
10013 type: CSS_TYPE_TRUE_SHORTHAND,
10014 subproperties: ["align-content", "justify-content"],
10015 initial_values: ["normal"],
10020 "space-between flex-end",
10021 "last baseline start",
10041 domProp: "placeItems",
10043 type: CSS_TYPE_TRUE_SHORTHAND,
10044 subproperties: ["align-items", "justify-items"],
10045 initial_values: ["normal"],
10052 "last baseline start",
10059 "start space-evenly",
10071 domProp: "placeSelf",
10073 type: CSS_TYPE_TRUE_SHORTHAND,
10074 subproperties: ["align-self", "justify-self"],
10075 initial_values: ["auto"],
10078 "first baseline end",
10086 "last baseline start",
10091 "start space-evenly",
10094 "auto legacy left",
10106 type: CSS_TYPE_TRUE_SHORTHAND,
10107 subproperties: ["flex-grow", "flex-shrink", "flex-basis"],
10108 initial_values: ["0 1 auto", "auto 0 1", "0 auto", "auto 0"],
10137 "0 1 calc(0px + rubbish)",
10141 domProp: "flexBasis",
10143 type: CSS_TYPE_LONGHAND,
10144 initial_values: [" auto"],
10145 // NOTE: Besides "content", this is cribbed directly from the "width"
10146 // chunk, since this property takes the exact same values as width
10147 // (plus 'content' & with different semantics on 'auto').
10148 // XXXdholbert (Maybe these should get separated out into
10149 // a reusable array defined at the top of this file?)
10158 "-moz-max-content",
10159 "-moz-min-content",
10160 "-moz-fit-content",
10162 // valid calc() values
10167 "calc( 50% + 2px)",
10168 "calc(50% + 2px )",
10169 "calc( 50% + 2px )",
10170 "calc(50% - -2px)",
10171 "calc(2px - -50%)",
10180 "calc(3*25px + 50%)",
10181 "calc(50% - 3em + 2px)",
10182 "calc(50% - (3em + 2px))",
10183 "calc((50% - 3em) + 2px)",
10187 "calc(50px/(2 - 1))",
10189 "calc(min(5px,2em))",
10191 "calc(max(5px,2em))",
10200 // invalid calc() values
10210 "-moz-min(5px,2em)",
10211 "-moz-max(5px,2em)",
10212 // If we ever support division by values, which is
10213 // complicated for the reasons described in
10214 // http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html
10215 // , we should support all 4 of these as described in
10216 // http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html
10217 "calc((3em / 100%) * 3em)",
10218 "calc(3em / 100% * 3em)",
10219 "calc(3em * (3em / 100%))",
10220 "calc(3em * 3em / 100%)",
10223 "flex-direction": {
10224 domProp: "flexDirection",
10226 type: CSS_TYPE_LONGHAND,
10227 initial_values: ["row"],
10228 other_values: ["row-reverse", "column", "column-reverse"],
10229 invalid_values: ["10px", "30%", "justify", "column wrap"],
10232 domProp: "flexFlow",
10234 type: CSS_TYPE_TRUE_SHORTHAND,
10235 subproperties: ["flex-direction", "flex-wrap"],
10236 initial_values: ["row nowrap", "nowrap row", "row", "nowrap"],
10238 // only specifying one property:
10242 // specifying both properties, 'flex-direction' first:
10244 "row wrap-reverse",
10246 "column wrap-reverse",
10247 // specifying both properties, 'flex-wrap' first:
10250 "wrap-reverse row",
10251 "wrap-reverse column",
10254 // specifying flex-direction twice (invalid):
10256 "row column nowrap",
10257 "row nowrap column",
10258 "nowrap row column",
10259 // specifying flex-wrap twice (invalid):
10260 "nowrap wrap-reverse",
10261 "nowrap wrap-reverse row",
10262 "nowrap row wrap-reverse",
10263 "row nowrap wrap-reverse",
10264 // Invalid data-type / invalid keyword type:
10272 domProp: "flexGrow",
10274 type: CSS_TYPE_LONGHAND,
10275 initial_values: ["0"],
10276 other_values: ["3", "1", "1.0", "2.5", "123"],
10277 invalid_values: ["0px", "-5", "1%", "3em", "stretch", "auto"],
10280 domProp: "flexShrink",
10282 type: CSS_TYPE_LONGHAND,
10283 initial_values: ["1"],
10284 other_values: ["3", "0", "0.0", "2.5", "123"],
10285 invalid_values: ["0px", "-5", "1%", "3em", "stretch", "auto"],
10288 domProp: "flexWrap",
10290 type: CSS_TYPE_LONGHAND,
10291 initial_values: ["nowrap"],
10292 other_values: ["wrap", "wrap-reverse"],
10293 invalid_values: ["10px", "30%", "justify", "column wrap", "auto"],
10298 type: CSS_TYPE_LONGHAND,
10299 initial_values: ["0"],
10300 other_values: ["1", "99999", "-1", "-50"],
10301 invalid_values: ["0px", "1.0", "1.", "1%", "0.2", "3em", "stretch"],
10306 domProp: "wordWrap",
10308 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10309 alias_for: "overflow-wrap",
10310 subproperties: ["overflow-wrap"],
10313 domProp: "MozTabSize",
10315 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10316 alias_for: "tab-size",
10317 subproperties: ["tab-size"],
10319 "-moz-border-image": {
10320 domProp: "MozBorderImage",
10322 type: CSS_TYPE_TRUE_SHORTHAND,
10323 alias_for: "border-image",
10325 "border-image-source",
10326 "border-image-slice",
10327 "border-image-width",
10328 "border-image-outset",
10329 "border-image-repeat",
10332 "-moz-font-feature-settings": {
10333 domProp: "MozFontFeatureSettings",
10335 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10336 applies_to_first_letter: true,
10337 applies_to_first_line: true,
10338 applies_to_marker: true,
10339 applies_to_placeholder: true,
10340 applies_to_cue: true,
10341 alias_for: "font-feature-settings",
10342 subproperties: ["font-feature-settings"],
10344 "-moz-font-language-override": {
10345 domProp: "MozFontLanguageOverride",
10347 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10348 applies_to_first_letter: true,
10349 applies_to_first_line: true,
10350 applies_to_marker: true,
10351 applies_to_placeholder: true,
10352 applies_to_cue: true,
10353 alias_for: "font-language-override",
10354 subproperties: ["font-language-override"],
10357 domProp: "MozHyphens",
10359 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10360 alias_for: "hyphens",
10361 subproperties: ["hyphens"],
10363 // vertical text properties
10365 domProp: "writingMode",
10367 type: CSS_TYPE_LONGHAND,
10368 initial_values: ["horizontal-tb", "lr", "lr-tb", "rl", "rl-tb"],
10377 invalid_values: ["10px", "30%", "justify", "auto", "1em"],
10379 "text-orientation": {
10380 domProp: "textOrientation",
10382 type: CSS_TYPE_LONGHAND,
10383 initial_values: ["mixed"],
10388 ] /* sideways-right alias for backward compatibility */,
10393 ] /* sideways-left removed from CSS Writing Modes */,
10396 domProp: "blockSize",
10398 type: CSS_TYPE_LONGHAND,
10401 /* XXX testing auto has prerequisites */
10402 initial_values: ["auto"],
10403 prerequisites: { display: "block" },
10408 // These keywords are treated as initial value.
10412 "-moz-fit-content",
10414 "-moz-max-content",
10415 "-moz-min-content",
10420 "calc(3*25px + 50%)",
10421 "fit-content(100px)",
10422 "fit-content(10%)",
10423 "fit-content(calc(3*25px + 50%))",
10425 invalid_values: ["none"],
10428 domProp: "borderBlock",
10430 type: CSS_TYPE_TRUE_SHORTHAND,
10432 "border-block-start-color",
10433 "border-block-start-style",
10434 "border-block-start-width",
10435 "border-block-end-color",
10436 "border-block-end-style",
10437 "border-block-end-width",
10444 "none medium currentcolor",
10455 invalid_values: ["5%", "5", "5 solid green"],
10457 "border-block-end": {
10458 domProp: "borderBlockEnd",
10460 type: CSS_TYPE_TRUE_SHORTHAND,
10462 "border-block-end-color",
10463 "border-block-end-style",
10464 "border-block-end-width",
10471 "none medium currentcolor",
10482 invalid_values: ["5%", "5", "5 solid green"],
10484 "border-block-color": {
10485 domProp: "borderBlockColor",
10487 type: CSS_TYPE_TRUE_SHORTHAND,
10488 subproperties: ["border-block-start-color", "border-block-end-color"],
10489 initial_values: ["currentColor"],
10490 other_values: ["green", "rgba(255,128,0,0.5) blue", "blue transparent"],
10491 invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10493 "border-block-end-color": {
10494 domProp: "borderBlockEndColor",
10496 type: CSS_TYPE_LONGHAND,
10497 applies_to_first_letter: true,
10499 initial_values: ["currentColor"],
10500 other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
10501 invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10503 "border-block-style": {
10504 domProp: "borderBlockStyle",
10506 type: CSS_TYPE_TRUE_SHORTHAND,
10507 subproperties: ["border-block-start-style", "border-block-end-style"],
10508 initial_values: ["none"],
10519 invalid_values: [],
10521 "border-block-end-style": {
10522 domProp: "borderBlockEndStyle",
10524 type: CSS_TYPE_LONGHAND,
10525 applies_to_first_letter: true,
10527 /* XXX hidden is sometimes the same as initial */
10528 initial_values: ["none"],
10539 invalid_values: [],
10541 "border-block-width": {
10542 domProp: "borderBlockWidth",
10544 type: CSS_TYPE_TRUE_SHORTHAND,
10545 subproperties: ["border-block-start-width", "border-block-end-width"],
10546 prerequisites: { "border-style": "solid" },
10547 initial_values: ["medium", "3px", "medium medium"],
10556 "calc(-2px) thick",
10558 "medium calc(0em)",
10564 invalid_values: ["5%", "5", "5 thin", "thin 5%", "blue", "solid"],
10566 "border-block-end-width": {
10567 domProp: "borderBlockEndWidth",
10569 type: CSS_TYPE_LONGHAND,
10570 applies_to_first_letter: true,
10572 prerequisites: { "border-block-end-style": "solid" },
10573 initial_values: ["medium", "3px", "calc(4px - 1px)"],
10586 "calc(3*25px + 5em)",
10588 invalid_values: ["5%", "5"],
10590 "border-block-start": {
10591 domProp: "borderBlockStart",
10593 type: CSS_TYPE_TRUE_SHORTHAND,
10595 "border-block-start-color",
10596 "border-block-start-style",
10597 "border-block-start-width",
10604 "none medium currentcolor",
10615 invalid_values: ["5%", "5", "5 solid green"],
10617 "border-block-start-color": {
10618 domProp: "borderBlockStartColor",
10620 type: CSS_TYPE_LONGHAND,
10621 applies_to_first_letter: true,
10623 initial_values: ["currentColor"],
10624 other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
10625 invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10627 "border-block-start-style": {
10628 domProp: "borderBlockStartStyle",
10630 type: CSS_TYPE_LONGHAND,
10631 applies_to_first_letter: true,
10633 /* XXX hidden is sometimes the same as initial */
10634 initial_values: ["none"],
10645 invalid_values: [],
10647 "border-block-start-width": {
10648 domProp: "borderBlockStartWidth",
10650 type: CSS_TYPE_LONGHAND,
10651 applies_to_first_letter: true,
10653 prerequisites: { "border-block-start-style": "solid" },
10654 initial_values: ["medium", "3px", "calc(4px - 1px)"],
10667 "calc(3*25px + 5em)",
10669 invalid_values: ["5%", "5"],
10671 "-moz-border-end": {
10672 domProp: "MozBorderEnd",
10674 type: CSS_TYPE_TRUE_SHORTHAND,
10675 alias_for: "border-inline-end",
10677 "-moz-border-end-color",
10678 "-moz-border-end-style",
10679 "-moz-border-end-width",
10682 "-moz-border-end-color": {
10683 domProp: "MozBorderEndColor",
10685 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10686 applies_to_first_letter: true,
10687 alias_for: "border-inline-end-color",
10688 subproperties: ["border-inline-end-color"],
10690 "-moz-border-end-style": {
10691 domProp: "MozBorderEndStyle",
10693 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10694 applies_to_first_letter: true,
10695 alias_for: "border-inline-end-style",
10696 subproperties: ["border-inline-end-style"],
10698 "-moz-border-end-width": {
10699 domProp: "MozBorderEndWidth",
10701 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10702 applies_to_first_letter: true,
10703 alias_for: "border-inline-end-width",
10704 subproperties: ["border-inline-end-width"],
10706 "-moz-border-start": {
10707 domProp: "MozBorderStart",
10709 type: CSS_TYPE_TRUE_SHORTHAND,
10710 alias_for: "border-inline-start",
10712 "-moz-border-start-color",
10713 "-moz-border-start-style",
10714 "-moz-border-start-width",
10717 "-moz-border-start-color": {
10718 domProp: "MozBorderStartColor",
10720 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10721 applies_to_first_letter: true,
10722 alias_for: "border-inline-start-color",
10723 subproperties: ["border-inline-start-color"],
10725 "-moz-border-start-style": {
10726 domProp: "MozBorderStartStyle",
10728 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10729 applies_to_first_letter: true,
10730 alias_for: "border-inline-start-style",
10731 subproperties: ["border-inline-start-style"],
10733 "-moz-border-start-width": {
10734 domProp: "MozBorderStartWidth",
10736 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10737 applies_to_first_letter: true,
10738 alias_for: "border-inline-start-width",
10739 subproperties: ["border-inline-start-width"],
10742 domProp: "inlineSize",
10744 type: CSS_TYPE_LONGHAND,
10747 /* XXX testing auto has prerequisites */
10748 initial_values: ["auto"],
10751 // add some margin to avoid the initial "auto" value getting
10752 // resolved to the same length as the parent element.
10753 "margin-left": "5px",
10759 // these three keywords compute to the initial value only when the
10760 // writing mode is vertical, and we're testing with a horizontal
10765 "-moz-fit-content",
10766 // these two keywords are the aliases of above first two.
10767 "-moz-max-content",
10768 "-moz-min-content",
10769 // whether -moz-available computes to the initial value depends on
10770 // the container size, and for the container size we're testing
10772 // "-moz-available",
10777 "calc(3*25px + 50%)",
10778 "fit-content(100px)",
10779 "fit-content(10%)",
10780 "fit-content(calc(3*25px + 50%))",
10782 invalid_values: ["none"],
10785 domProp: "marginBlock",
10787 type: CSS_TYPE_TRUE_SHORTHAND,
10788 subproperties: ["margin-block-start", "margin-block-end"],
10789 initial_values: ["0", "0px 0em"],
10797 "calc(3*25px) calc(2px)",
10798 "calc(25px*3) 1em",
10799 "calc(3*25px + 50%) calc(3*25px - 50%)",
10817 "margin-block-end": {
10818 domProp: "marginBlockEnd",
10820 type: CSS_TYPE_LONGHAND,
10821 applies_to_first_letter: true,
10823 /* XXX testing auto has prerequisites */
10824 initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
10834 "calc(3*25px + 50%)",
10851 "margin-block-start": {
10852 domProp: "marginBlockStart",
10854 type: CSS_TYPE_LONGHAND,
10855 applies_to_first_letter: true,
10857 /* XXX testing auto has prerequisites */
10858 initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
10868 "calc(3*25px + 50%)",
10885 "-moz-margin-end": {
10886 domProp: "MozMarginEnd",
10888 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10889 applies_to_first_letter: true,
10890 alias_for: "margin-inline-end",
10891 subproperties: ["margin-inline-end"],
10893 "-moz-margin-start": {
10894 domProp: "MozMarginStart",
10896 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10897 applies_to_first_letter: true,
10898 alias_for: "margin-inline-start",
10899 subproperties: ["margin-inline-start"],
10901 "max-block-size": {
10902 domProp: "maxBlockSize",
10904 type: CSS_TYPE_LONGHAND,
10907 prerequisites: { display: "block" },
10908 initial_values: ["none"],
10912 // These keywords are treated as initial value.
10916 "-moz-fit-content",
10918 "-moz-max-content",
10919 "-moz-min-content",
10924 "calc(3*25px + 50%)",
10925 "fit-content(100px)",
10926 "fit-content(10%)",
10927 "fit-content(calc(3*25px + 50%))",
10929 invalid_values: ["auto", "5"],
10931 "max-inline-size": {
10932 domProp: "maxInlineSize",
10934 type: CSS_TYPE_LONGHAND,
10937 prerequisites: { display: "block" },
10938 initial_values: ["none"],
10942 // these four keywords compute to the initial value only when the
10943 // writing mode is vertical, and we're testing with a horizontal
10948 "-moz-fit-content",
10950 // these two keywords are the aliases of above first two.
10951 "-moz-max-content",
10952 "-moz-min-content",
10957 "calc(3*25px + 50%)",
10958 "fit-content(100px)",
10959 "fit-content(10%)",
10960 "fit-content(calc(3*25px + 50%))",
10962 invalid_values: ["auto", "5"],
10964 "min-block-size": {
10965 domProp: "minBlockSize",
10967 type: CSS_TYPE_LONGHAND,
10970 prerequisites: { display: "block" },
10971 initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
10975 // These keywords are treated as initial value.
10979 "-moz-fit-content",
10981 "-moz-max-content",
10982 "-moz-min-content",
10988 "calc(3*25px + 50%)",
10989 "fit-content(100px)",
10990 "fit-content(10%)",
10991 "fit-content(calc(3*25px + 50%))",
10993 invalid_values: ["none", "5"],
10995 "min-inline-size": {
10996 domProp: "minInlineSize",
10998 type: CSS_TYPE_LONGHAND,
11001 prerequisites: { display: "block" },
11002 initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
11006 // these four keywords compute to the initial value only when the
11007 // writing mode is vertical, and we're testing with a horizontal
11012 "-moz-fit-content",
11014 // these two keywords are the aliases of above first two.
11015 "-moz-max-content",
11016 "-moz-min-content",
11022 "calc(3*25px + 50%)",
11023 "fit-content(100px)",
11024 "fit-content(10%)",
11025 "fit-content(calc(3*25px + 50%))",
11027 invalid_values: ["none", "5"],
11032 type: CSS_TYPE_TRUE_SHORTHAND,
11033 subproperties: ["top", "right", "bottom", "left"],
11034 /* FIXME: run tests with multiple prerequisites */
11035 prerequisites: { position: "relative" },
11036 initial_values: ["auto"],
11041 "1em calc(2em + 3px) 4ex 5cm",
11043 invalid_values: ["1px calc(nonsense)", "1px red", "3"],
11044 unbalanced_values: ["1px calc("],
11047 domProp: "insetBlock",
11049 type: CSS_TYPE_TRUE_SHORTHAND,
11050 subproperties: ["inset-block-start", "inset-block-end"],
11051 /* FIXME: run tests with multiple prerequisites */
11052 prerequisites: { position: "relative" },
11053 initial_values: ["auto", "auto auto"],
11068 "calc(3*25px) auto",
11070 "auto calc(25px*3)",
11071 "calc(3*25px + 50%)",
11072 "auto calc(3*25px + 50%)",
11074 invalid_values: ["none"],
11076 "inset-block-end": {
11077 domProp: "insetBlockEnd",
11079 type: CSS_TYPE_LONGHAND,
11081 /* FIXME: run tests with multiple prerequisites */
11082 prerequisites: { position: "relative" },
11083 /* XXX 0 may or may not be equal to auto */
11084 initial_values: ["auto"],
11094 "calc(3*25px + 50%)",
11096 invalid_values: [],
11098 "inset-block-start": {
11099 domProp: "insetBlockStart",
11101 type: CSS_TYPE_LONGHAND,
11103 /* FIXME: run tests with multiple prerequisites */
11104 prerequisites: { position: "relative" },
11105 /* XXX 0 may or may not be equal to auto */
11106 initial_values: ["auto"],
11116 "calc(3*25px + 50%)",
11118 invalid_values: [],
11121 domProp: "insetInline",
11123 type: CSS_TYPE_TRUE_SHORTHAND,
11124 subproperties: ["inset-inline-start", "inset-inline-end"],
11125 /* FIXME: run tests with multiple prerequisites */
11126 prerequisites: { position: "relative" },
11127 initial_values: ["auto", "auto auto"],
11142 "calc(3*25px) auto",
11144 "auto calc(25px*3)",
11145 "calc(3*25px + 50%)",
11146 "auto calc(3*25px + 50%)",
11148 invalid_values: ["none"],
11150 "inset-inline-end": {
11151 domProp: "insetInlineEnd",
11153 type: CSS_TYPE_LONGHAND,
11155 /* FIXME: run tests with multiple prerequisites */
11156 prerequisites: { position: "relative" },
11157 /* XXX 0 may or may not be equal to auto */
11158 initial_values: ["auto"],
11168 "calc(3*25px + 50%)",
11170 invalid_values: [],
11172 "inset-inline-start": {
11173 domProp: "insetInlineStart",
11175 type: CSS_TYPE_LONGHAND,
11177 /* FIXME: run tests with multiple prerequisites */
11178 prerequisites: { position: "relative" },
11179 /* XXX 0 may or may not be equal to auto */
11180 initial_values: ["auto"],
11190 "calc(3*25px + 50%)",
11192 invalid_values: [],
11194 "padding-block-end": {
11195 domProp: "paddingBlockEnd",
11197 type: CSS_TYPE_LONGHAND,
11198 applies_to_first_letter: true,
11199 // No applies_to_placeholder because we have a !important rule in forms.css.
11218 "calc(3*25px + 50%)",
11220 invalid_values: [],
11222 "padding-block-start": {
11223 domProp: "paddingBlockStart",
11225 type: CSS_TYPE_LONGHAND,
11226 applies_to_first_letter: true,
11227 // No applies_to_placeholder because we have a !important rule in forms.css.
11246 "calc(3*25px + 50%)",
11248 invalid_values: [],
11250 "-moz-padding-end": {
11251 domProp: "MozPaddingEnd",
11253 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11254 applies_to_first_letter: true,
11255 alias_for: "padding-inline-end",
11256 subproperties: ["padding-inline-end"],
11258 "-moz-padding-start": {
11259 domProp: "MozPaddingStart",
11261 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11262 applies_to_first_letter: true,
11263 alias_for: "padding-inline-start",
11264 subproperties: ["padding-inline-start"],
11266 "-webkit-animation": {
11267 domProp: "webkitAnimation",
11269 type: CSS_TYPE_TRUE_SHORTHAND,
11270 applies_to_marker: true,
11271 alias_for: "animation",
11274 "animation-duration",
11275 "animation-timing-function",
11277 "animation-direction",
11278 "animation-fill-mode",
11279 "animation-iteration-count",
11280 "animation-play-state",
11283 "-webkit-animation-delay": {
11284 domProp: "webkitAnimationDelay",
11286 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11287 applies_to_marker: true,
11288 alias_for: "animation-delay",
11289 subproperties: ["animation-delay"],
11291 "-webkit-animation-direction": {
11292 domProp: "webkitAnimationDirection",
11294 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11295 applies_to_marker: true,
11296 alias_for: "animation-direction",
11297 subproperties: ["animation-direction"],
11299 "-webkit-animation-duration": {
11300 domProp: "webkitAnimationDuration",
11302 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11303 applies_to_marker: true,
11304 alias_for: "animation-duration",
11305 subproperties: ["animation-duration"],
11307 "-webkit-animation-fill-mode": {
11308 domProp: "webkitAnimationFillMode",
11310 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11311 applies_to_marker: true,
11312 alias_for: "animation-fill-mode",
11313 subproperties: ["animation-fill-mode"],
11315 "-webkit-animation-iteration-count": {
11316 domProp: "webkitAnimationIterationCount",
11318 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11319 applies_to_marker: true,
11320 alias_for: "animation-iteration-count",
11321 subproperties: ["animation-iteration-count"],
11323 "-webkit-animation-name": {
11324 domProp: "webkitAnimationName",
11326 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11327 applies_to_marker: true,
11328 alias_for: "animation-name",
11329 subproperties: ["animation-name"],
11331 "-webkit-animation-play-state": {
11332 domProp: "webkitAnimationPlayState",
11334 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11335 applies_to_marker: true,
11336 alias_for: "animation-play-state",
11337 subproperties: ["animation-play-state"],
11339 "-webkit-animation-timing-function": {
11340 domProp: "webkitAnimationTimingFunction",
11342 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11343 applies_to_marker: true,
11344 alias_for: "animation-timing-function",
11345 subproperties: ["animation-timing-function"],
11347 "-webkit-clip-path": {
11348 domProp: "webkitClipPath",
11350 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11351 alias_for: "clip-path",
11352 subproperties: ["clip-path"],
11354 "-webkit-filter": {
11355 domProp: "webkitFilter",
11357 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11358 alias_for: "filter",
11359 subproperties: ["filter"],
11361 "-webkit-text-security": {
11362 domProp: "webkitTextSecurity",
11364 type: CSS_TYPE_LONGHAND,
11365 applies_to_first_letter: true,
11366 applies_to_first_line: true,
11367 applies_to_placeholder: true,
11368 initial_values: ["none"],
11369 other_values: ["circle", "disc", "square"],
11370 invalid_values: ["0", "auto", "true", "'*'"],
11372 "-webkit-text-fill-color": {
11373 domProp: "webkitTextFillColor",
11375 type: CSS_TYPE_LONGHAND,
11376 applies_to_first_letter: true,
11377 applies_to_first_line: true,
11378 applies_to_placeholder: true,
11379 prerequisites: { color: "black" },
11380 initial_values: ["currentColor", "black", "#000", "#000000", "rgb(0,0,0)"],
11381 other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
11390 "rgb(255,xxx,255)",
11393 "-webkit-text-stroke": {
11394 domProp: "webkitTextStroke",
11396 type: CSS_TYPE_TRUE_SHORTHAND,
11397 prerequisites: { color: "black" },
11398 subproperties: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"],
11401 "currentColor 0px",
11409 "thick rgba(0,0,255,0.5)",
11410 "calc(4px - 8px) green",
11413 "currentColor 4em",
11414 "currentColor calc(5px - 1px)",
11416 invalid_values: ["-3px black", "calc(50%+ 2px) #000", "30% #f00"],
11418 "-webkit-text-stroke-color": {
11419 domProp: "webkitTextStrokeColor",
11421 type: CSS_TYPE_LONGHAND,
11422 applies_to_first_letter: true,
11423 applies_to_first_line: true,
11424 applies_to_placeholder: true,
11425 prerequisites: { color: "black" },
11426 initial_values: ["currentColor", "black", "#000", "#000000", "rgb(0,0,0)"],
11427 other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
11436 "rgb(255,xxx,255)",
11439 "-webkit-text-stroke-width": {
11440 domProp: "webkitTextStrokeWidth",
11442 type: CSS_TYPE_LONGHAND,
11443 applies_to_first_letter: true,
11444 applies_to_first_line: true,
11445 applies_to_placeholder: true,
11446 initial_values: ["0", "0px", "0em", "0ex", "calc(0pt)", "calc(4px - 8px)"],
11453 "calc(3*25px + 5em)",
11458 "1px calc(nonsense)",
11465 "-webkit-text-size-adjust": {
11466 domProp: "webkitTextSizeAdjust",
11468 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11469 alias_for: "-moz-text-size-adjust",
11470 subproperties: ["-moz-text-size-adjust"],
11472 "-webkit-transform": {
11473 domProp: "webkitTransform",
11475 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11476 alias_for: "transform",
11477 subproperties: ["transform"],
11479 "-webkit-transform-origin": {
11480 domProp: "webkitTransformOrigin",
11482 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11483 alias_for: "transform-origin",
11484 subproperties: ["transform-origin"],
11486 "-webkit-transform-style": {
11487 domProp: "webkitTransformStyle",
11489 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11490 alias_for: "transform-style",
11491 subproperties: ["transform-style"],
11493 "-webkit-backface-visibility": {
11494 domProp: "webkitBackfaceVisibility",
11496 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11497 alias_for: "backface-visibility",
11498 subproperties: ["backface-visibility"],
11500 "-webkit-perspective": {
11501 domProp: "webkitPerspective",
11503 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11504 alias_for: "perspective",
11505 subproperties: ["perspective"],
11507 "-webkit-perspective-origin": {
11508 domProp: "webkitPerspectiveOrigin",
11510 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11511 alias_for: "perspective-origin",
11512 subproperties: ["perspective-origin"],
11514 "-webkit-transition": {
11515 domProp: "webkitTransition",
11517 type: CSS_TYPE_TRUE_SHORTHAND,
11518 applies_to_marker: true,
11519 alias_for: "transition",
11521 "transition-property",
11522 "transition-duration",
11523 "transition-timing-function",
11524 "transition-delay",
11527 "-webkit-transition-delay": {
11528 domProp: "webkitTransitionDelay",
11530 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11531 applies_to_marker: true,
11532 alias_for: "transition-delay",
11533 subproperties: ["transition-delay"],
11535 "-webkit-transition-duration": {
11536 domProp: "webkitTransitionDuration",
11538 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11539 applies_to_marker: true,
11540 alias_for: "transition-duration",
11541 subproperties: ["transition-duration"],
11543 "-webkit-transition-property": {
11544 domProp: "webkitTransitionProperty",
11546 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11547 applies_to_marker: true,
11548 alias_for: "transition-property",
11549 subproperties: ["transition-property"],
11551 "-webkit-transition-timing-function": {
11552 domProp: "webkitTransitionTimingFunction",
11554 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11555 applies_to_marker: true,
11556 alias_for: "transition-timing-function",
11557 subproperties: ["transition-timing-function"],
11559 "-webkit-border-radius": {
11560 domProp: "webkitBorderRadius",
11562 type: CSS_TYPE_TRUE_SHORTHAND,
11563 alias_for: "border-radius",
11565 "border-bottom-left-radius",
11566 "border-bottom-right-radius",
11567 "border-top-left-radius",
11568 "border-top-right-radius",
11571 "-webkit-border-top-left-radius": {
11572 domProp: "webkitBorderTopLeftRadius",
11574 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11575 applies_to_first_letter: true,
11576 alias_for: "border-top-left-radius",
11577 subproperties: ["border-top-left-radius"],
11579 "-webkit-border-top-right-radius": {
11580 domProp: "webkitBorderTopRightRadius",
11582 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11583 applies_to_first_letter: true,
11584 alias_for: "border-top-right-radius",
11585 subproperties: ["border-top-right-radius"],
11587 "-webkit-border-bottom-left-radius": {
11588 domProp: "webkitBorderBottomLeftRadius",
11590 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11591 applies_to_first_letter: true,
11592 alias_for: "border-bottom-left-radius",
11593 subproperties: ["border-bottom-left-radius"],
11595 "-webkit-border-bottom-right-radius": {
11596 domProp: "webkitBorderBottomRightRadius",
11598 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11599 applies_to_first_letter: true,
11600 alias_for: "border-bottom-right-radius",
11601 subproperties: ["border-bottom-right-radius"],
11603 "-webkit-background-clip": {
11604 domProp: "webkitBackgroundClip",
11606 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11607 applies_to_first_letter: true,
11608 applies_to_first_line: true,
11609 applies_to_placeholder: true,
11610 applies_to_cue: true,
11611 alias_for: "background-clip",
11612 subproperties: ["background-clip"],
11614 "-webkit-background-origin": {
11615 domProp: "webkitBackgroundOrigin",
11617 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11618 applies_to_first_letter: true,
11619 applies_to_first_line: true,
11620 applies_to_placeholder: true,
11621 applies_to_cue: true,
11622 alias_for: "background-origin",
11623 subproperties: ["background-origin"],
11625 "-webkit-background-size": {
11626 domProp: "webkitBackgroundSize",
11628 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11629 applies_to_first_letter: true,
11630 applies_to_first_line: true,
11631 applies_to_placeholder: true,
11632 applies_to_cue: true,
11633 alias_for: "background-size",
11634 subproperties: ["background-size"],
11636 "-webkit-border-image": {
11637 domProp: "webkitBorderImage",
11639 type: CSS_TYPE_TRUE_SHORTHAND,
11640 alias_for: "border-image",
11642 "border-image-source",
11643 "border-image-slice",
11644 "border-image-width",
11645 "border-image-outset",
11646 "border-image-repeat",
11649 "-webkit-box-shadow": {
11650 domProp: "webkitBoxShadow",
11652 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11653 applies_to_first_letter: true,
11654 alias_for: "box-shadow",
11655 subproperties: ["box-shadow"],
11657 "-webkit-box-sizing": {
11658 domProp: "webkitBoxSizing",
11660 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11661 alias_for: "box-sizing",
11662 subproperties: ["box-sizing"],
11664 "-webkit-box-flex": {
11665 domProp: "webkitBoxFlex",
11667 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11668 alias_for: "-moz-box-flex",
11669 subproperties: ["-moz-box-flex"],
11671 "-webkit-box-ordinal-group": {
11672 domProp: "webkitBoxOrdinalGroup",
11674 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11675 alias_for: "-moz-box-ordinal-group",
11676 subproperties: ["-moz-box-ordinal-group"],
11678 "-webkit-box-orient": {
11679 domProp: "webkitBoxOrient",
11681 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11682 alias_for: "-moz-box-orient",
11683 subproperties: ["-moz-box-orient"],
11685 "-webkit-box-direction": {
11686 domProp: "webkitBoxDirection",
11688 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11689 alias_for: "-moz-box-direction",
11690 subproperties: ["-moz-box-direction"],
11692 "-webkit-box-align": {
11693 domProp: "webkitBoxAlign",
11695 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11696 alias_for: "-moz-box-align",
11697 subproperties: ["-moz-box-align"],
11699 "-webkit-box-pack": {
11700 domProp: "webkitBoxPack",
11702 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11703 alias_for: "-moz-box-pack",
11704 subproperties: ["-moz-box-pack"],
11706 "-webkit-flex-direction": {
11707 domProp: "webkitFlexDirection",
11709 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11710 alias_for: "flex-direction",
11711 subproperties: ["flex-direction"],
11713 "-webkit-flex-wrap": {
11714 domProp: "webkitFlexWrap",
11716 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11717 alias_for: "flex-wrap",
11718 subproperties: ["flex-wrap"],
11720 "-webkit-flex-flow": {
11721 domProp: "webkitFlexFlow",
11723 type: CSS_TYPE_TRUE_SHORTHAND,
11724 alias_for: "flex-flow",
11725 subproperties: ["flex-direction", "flex-wrap"],
11727 "-webkit-line-clamp": {
11728 domProp: "webkitLineClamp",
11730 type: CSS_TYPE_LONGHAND,
11731 initial_values: ["none"],
11732 other_values: ["1", "2"],
11733 invalid_values: ["auto", "0", "-1"],
11736 domProp: "webkitOrder",
11738 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11739 alias_for: "order",
11740 subproperties: ["order"],
11743 domProp: "webkitFlex",
11745 type: CSS_TYPE_TRUE_SHORTHAND,
11747 subproperties: ["flex-grow", "flex-shrink", "flex-basis"],
11749 "-webkit-flex-grow": {
11750 domProp: "webkitFlexGrow",
11752 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11753 alias_for: "flex-grow",
11754 subproperties: ["flex-grow"],
11756 "-webkit-flex-shrink": {
11757 domProp: "webkitFlexShrink",
11759 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11760 alias_for: "flex-shrink",
11761 subproperties: ["flex-shrink"],
11763 "-webkit-flex-basis": {
11764 domProp: "webkitFlexBasis",
11766 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11767 alias_for: "flex-basis",
11768 subproperties: ["flex-basis"],
11770 "-webkit-justify-content": {
11771 domProp: "webkitJustifyContent",
11773 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11774 alias_for: "justify-content",
11775 subproperties: ["justify-content"],
11777 "-webkit-align-items": {
11778 domProp: "webkitAlignItems",
11780 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11781 alias_for: "align-items",
11782 subproperties: ["align-items"],
11784 "-webkit-align-self": {
11785 domProp: "webkitAlignSelf",
11787 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11788 alias_for: "align-self",
11789 subproperties: ["align-self"],
11791 "-webkit-align-content": {
11792 domProp: "webkitAlignContent",
11794 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11795 alias_for: "align-content",
11796 subproperties: ["align-content"],
11798 "-webkit-user-select": {
11799 domProp: "webkitUserSelect",
11801 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11802 alias_for: "user-select",
11803 subproperties: ["user-select"],
11806 domProp: "webkitMask",
11808 type: CSS_TYPE_TRUE_SHORTHAND,
11821 "-webkit-mask-clip": {
11822 domProp: "webkitMaskClip",
11824 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11825 alias_for: "mask-clip",
11826 subproperties: ["mask-clip"],
11829 "-webkit-mask-composite": {
11830 domProp: "webkitMaskComposite",
11832 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11833 alias_for: "mask-composite",
11834 subproperties: ["mask-composite"],
11837 "-webkit-mask-image": {
11838 domProp: "webkitMaskImage",
11840 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11841 alias_for: "mask-image",
11842 subproperties: ["mask-image"],
11844 "-webkit-mask-origin": {
11845 domProp: "webkitMaskOrigin",
11847 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11848 alias_for: "mask-origin",
11849 subproperties: ["mask-origin"],
11851 "-webkit-mask-position": {
11852 domProp: "webkitMaskPosition",
11854 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11855 alias_for: "mask-position",
11856 subproperties: ["mask-position"],
11858 "-webkit-mask-position-x": {
11859 domProp: "webkitMaskPositionX",
11861 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11862 alias_for: "mask-position-x",
11863 subproperties: ["mask-position-x"],
11865 "-webkit-mask-position-y": {
11866 domProp: "webkitMaskPositionY",
11868 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11869 alias_for: "mask-position-y",
11870 subproperties: ["mask-position-y"],
11872 "-webkit-mask-repeat": {
11873 domProp: "webkitMaskRepeat",
11875 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11876 alias_for: "mask-repeat",
11877 subproperties: ["mask-repeat"],
11879 "-webkit-mask-size": {
11880 domProp: "webkitMaskSize",
11882 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11883 alias_for: "mask-size",
11884 subproperties: ["mask-size"],
11886 }; // end of gCSSProperties
11888 // Get the computed value for a property. For shorthands, return the
11889 // computed values of all the subproperties, delimited by " ; ".
11890 function get_computed_value(cs, property) {
11891 var info = gCSSProperties[property];
11893 info.type == CSS_TYPE_TRUE_SHORTHAND ||
11894 info.type == CSS_TYPE_LEGACY_SHORTHAND ||
11895 (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND &&
11896 (property == "text-decoration" || property == "mask"))
11899 for (var idx in info.subproperties) {
11900 var subprop = info.subproperties[idx];
11901 results.push(get_computed_value(cs, subprop));
11903 return results.join(" ; ");
11905 return cs.getPropertyValue(property);
11909 const mozHiddenUnscrollableEnabled = IsCSSPropertyPrefEnabled(
11910 "layout.css.overflow-moz-hidden-unscrollable.enabled"
11912 for (let p of ["overflow", "overflow-x", "overflow-y"]) {
11913 let prop = gCSSProperties[p];
11914 let mozHiddenUnscrollableValues = mozHiddenUnscrollableEnabled
11915 ? prop.other_values
11916 : prop.invalid_values;
11917 mozHiddenUnscrollableValues.push("-moz-hidden-unscrollable");
11918 if (p == "overflow") {
11919 mozHiddenUnscrollableValues.push(
11920 "-moz-hidden-unscrollable -moz-hidden-unscrollable"
11926 if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
11927 gCSSProperties.rotate = {
11930 type: CSS_TYPE_LONGHAND,
11931 initial_values: ["none"],
11949 /* valid calc() values */
11950 "calc(1) 0 0 calc(45deg + 5rad)",
11951 "0 1 0 calc(400grad + 1rad)",
11952 "calc(0.5turn + 10deg)",
11967 /* invalid calc() values */
11968 "0.5 1 0 calc(45deg + 10)",
11969 "calc(0.5turn + 10%)",
11973 gCSSProperties.translate = {
11974 domProp: "translate",
11976 type: CSS_TYPE_LONGHAND,
11977 prerequisites: { width: "10px", height: "10px", display: "block" },
11978 initial_values: ["none"],
11988 /* valid calc() values */
11990 "calc(0.25 * 5px + 10% / 3)",
11991 "calc(5px - 10% * 3)",
11992 "calc(5px - 3 * 10%) 50px",
11993 "-50px calc(5px - 10% * 3)",
11994 "10px calc(min(5px,10%))",
11998 "-moz-min(5px,10%)",
12002 /* invalid calc() values */
12003 "calc(max(5px,10%) 10%)",
12007 gCSSProperties.scale = {
12010 type: CSS_TYPE_LONGHAND,
12011 initial_values: ["none"],
12028 /* valid calc() values */
12030 "calc(10) calc(20) 30",
12036 /* invalid calc() values */
12038 "10 calc(1 + 10px)",
12044 IsCSSPropertyPrefEnabled("layout.css.transform-box-content-stroke.enabled")
12046 gCSSProperties["transform-box"]["other_values"].push(
12052 gCSSProperties["touch-action"] = {
12053 domProp: "touchAction",
12055 type: CSS_TYPE_LONGHAND,
12056 initial_values: ["auto"],
12064 "pinch-zoom pan-x",
12065 "pinch-zoom pan-y",
12066 "pan-x pinch-zoom",
12067 "pan-y pinch-zoom",
12068 "pinch-zoom pan-x pan-y",
12069 "pinch-zoom pan-y pan-x",
12070 "pan-x pinch-zoom pan-y",
12071 "pan-y pinch-zoom pan-x",
12072 "pan-x pan-y pinch-zoom",
12073 "pan-y pan-x pinch-zoom",
12096 "pinch-zoom pinch-zoom",
12097 "pan-x pan-y none",
12098 "pan-x none pan-y",
12099 "none pan-x pan-y",
12100 "pan-y pan-x none",
12101 "pan-y none pan-x",
12102 "none pan-y pan-x",
12103 "pan-x pinch-zoom none",
12104 "pan-x none pinch-zoom",
12105 "none pan-x pinch-zoom",
12106 "pinch-zoom pan-x none",
12107 "pinch-zoom none pan-x",
12108 "none pinch-zoom pan-x",
12109 "pinch-zoom pan-y none",
12110 "pinch-zoom none pan-y",
12111 "none pinch-zoom pan-y",
12112 "pan-y pinch-zoom none",
12113 "pan-y none pinch-zoom",
12114 "none pan-y pinch-zoom",
12115 "pan-x pan-y auto",
12116 "pan-x auto pan-y",
12117 "auto pan-x pan-y",
12118 "pan-y pan-x auto",
12119 "pan-y auto pan-x",
12120 "auto pan-y pan-x",
12121 "pan-x pinch-zoom auto",
12122 "pan-x auto pinch-zoom",
12123 "auto pan-x pinch-zoom",
12124 "pinch-zoom pan-x auto",
12125 "pinch-zoom auto pan-x",
12126 "auto pinch-zoom pan-x",
12127 "pinch-zoom pan-y auto",
12128 "pinch-zoom auto pan-y",
12129 "auto pinch-zoom pan-y",
12130 "pan-y pinch-zoom auto",
12131 "pan-y auto pinch-zoom",
12132 "auto pan-y pinch-zoom",
12133 "pan-x pan-y zoom",
12134 "pan-x zoom pan-y",
12135 "zoom pan-x pan-y",
12136 "pan-y pan-x zoom",
12137 "pan-y zoom pan-x",
12138 "zoom pan-y pan-x",
12139 "pinch-zoom pan-y zoom",
12140 "pinch-zoom zoom pan-y",
12141 "zoom pinch-zoom pan-y",
12142 "pan-y pinch-zoom zoom",
12143 "pan-y zoom pinch-zoom",
12144 "zoom pan-y pinch-zoom",
12145 "pan-x pinch-zoom zoom",
12146 "pan-x zoom pinch-zoom",
12147 "zoom pan-x pinch-zoom",
12148 "pinch-zoom pan-x zoom",
12149 "pinch-zoom zoom pan-x",
12150 "zoom pinch-zoom pan-x",
12151 "pan-x pan-y pan-x",
12152 "pan-x pan-x pan-y",
12153 "pan-y pan-x pan-x",
12154 "pan-y pan-x pan-y",
12155 "pan-y pan-y pan-x",
12156 "pan-x pan-y pan-y",
12157 "pan-x pinch-zoom pan-x",
12158 "pan-x pan-x pinch-zoom",
12159 "pinch-zoom pan-x pan-x",
12160 "pinch-zoom pan-x pinch-zoom",
12161 "pinch-zoom pinch-zoom pan-x",
12162 "pan-x pinch-zoom pinch-zoom",
12163 "pinch-zoom pan-y pinch-zoom",
12164 "pinch-zoom pinch-zoom pan-y",
12165 "pan-y pinch-zoom pinch-zoom",
12166 "pan-y pinch-zoom pan-y",
12167 "pan-y pan-y pinch-zoom",
12168 "pinch-zoom pan-y pan-y",
12169 "manipulation none",
12170 "none manipulation",
12171 "manipulation auto",
12172 "auto manipulation",
12173 "manipulation zoom",
12174 "zoom manipulation",
12175 "manipulation manipulation",
12176 "manipulation pan-x",
12177 "pan-x manipulation",
12178 "manipulation pan-y",
12179 "pan-y manipulation",
12180 "manipulation pinch-zoom",
12181 "pinch-zoom manipulation",
12182 "manipulation pan-x pan-y",
12183 "pan-x manipulation pan-y",
12184 "pan-x pan-y manipulation",
12185 "manipulation pan-y pan-x",
12186 "pan-y manipulation pan-x",
12187 "pan-y pan-x manipulation",
12188 "manipulation pinch-zoom pan-y",
12189 "pinch-zoom manipulation pan-y",
12190 "pinch-zoom pan-y manipulation",
12191 "manipulation pan-y pinch-zoom",
12192 "pan-y manipulation pinch-zoom",
12193 "pan-y pinch-zoom manipulation",
12194 "manipulation pan-x pinch-zoom",
12195 "pan-x manipulation pinch-zoom",
12196 "pan-x pinch-zoom manipulation",
12197 "manipulation pinch-zoom pan-x",
12198 "pinch-zoom manipulation pan-x",
12199 "pinch-zoom pan-x manipulation",
12203 gCSSProperties["page"] = {
12206 type: CSS_TYPE_LONGHAND,
12207 initial_values: ["auto"],
12208 other_values: ["page", "small_page", "large_page", "A4"],
12209 invalid_values: ["page1 page2", "auto page", "1cm"],
12212 gCSSProperties["text-justify"] = {
12213 domProp: "textJustify",
12215 type: CSS_TYPE_LONGHAND,
12216 applies_to_placeholder: true,
12217 initial_values: ["auto"],
12218 other_values: ["none", "inter-word", "inter-character", "distribute"],
12219 invalid_values: [],
12222 if (IsCSSPropertyPrefEnabled("layout.css.text-indent-keywords.enabled")) {
12223 gCSSProperties["text-indent"].other_values.push(
12226 "-10px hanging each-line",
12227 "hanging calc(2px)",
12228 "each-line calc(-2px)",
12229 "each-line calc(50%) hanging",
12230 "hanging calc(3*25px) each-line",
12231 "each-line hanging calc(25px*3)"
12233 gCSSProperties["text-indent"].invalid_values.push(
12236 "-10px hanging hanging",
12237 "each-line calc(2px) each-line"
12241 if (IsCSSPropertyPrefEnabled("layout.css.font-variations.enabled")) {
12242 gCSSProperties["font-variation-settings"] = {
12243 domProp: "fontVariationSettings",
12245 type: CSS_TYPE_LONGHAND,
12246 applies_to_first_letter: true,
12247 applies_to_first_line: true,
12248 applies_to_placeholder: true,
12249 applies_to_marker: true,
12250 applies_to_cue: true,
12251 initial_values: ["normal"],
12256 "'wdth' 2, 'wght' 3",
12261 "wdth 1", // unquoted tags
12264 "'wdth', 'wght'", // missing values
12267 "'width' 1", // incorrect tag lengths
12268 "'wd\th' 1", // non-graphic character in tag
12269 "'wdth' 1 'wght' 2", // missing comma between pairs
12270 "'wdth' 1,", // trailing comma
12271 "'wdth' 1 , , 'wght' 2", // extra comma
12272 "'wdth', 1", // comma within pair
12274 unbalanced_values: [
12276 "\"wdth' 1", // mismatched quotes
12279 gCSSProperties["font"].subproperties.push("font-variation-settings");
12280 gCSSProperties["font-optical-sizing"] = {
12281 domProp: "fontOpticalSizing",
12283 type: CSS_TYPE_LONGHAND,
12284 applies_to_first_letter: true,
12285 applies_to_first_line: true,
12286 applies_to_placeholder: true,
12287 applies_to_marker: true,
12288 applies_to_cue: true,
12289 initial_values: ["auto"],
12290 other_values: ["none"],
12291 invalid_values: ["on"],
12293 gCSSProperties["font"].subproperties.push("font-optical-sizing");
12294 gCSSProperties["font-variation-settings"].other_values.push(
12299 if (IsCSSPropertyPrefEnabled("layout.css.font-palette.enabled")) {
12300 gCSSProperties["font-palette"] = {
12301 domProp: "fontPalette",
12303 type: CSS_TYPE_LONGHAND,
12304 applies_to_first_letter: true,
12305 applies_to_first_line: true,
12306 applies_to_marker: true,
12307 applies_to_placeholder: true,
12308 initial_values: ["normal"],
12309 other_values: ["light", "dark", "--custom"],
12310 invalid_values: ["custom"],
12314 if (IsCSSPropertyPrefEnabled("layout.css.font-variant-emoji.enabled")) {
12315 gCSSProperties["font"].subproperties.push("font-variant-emoji");
12316 gCSSProperties["font-variant"].subproperties.push("font-variant-emoji");
12317 gCSSProperties["font-variant-emoji"] = {
12318 domProp: "fontVariantEmoji",
12320 type: CSS_TYPE_LONGHAND,
12321 applies_to_first_letter: true,
12322 applies_to_first_line: true,
12323 applies_to_marker: true,
12324 applies_to_placeholder: true,
12325 applies_to_cue: true,
12326 initial_values: ["normal"],
12327 other_values: ["text", "emoji", "unicode"],
12338 var isGridTemplateMasonryValueEnabled = IsCSSPropertyPrefEnabled(
12339 "layout.css.grid-template-masonry-value.enabled"
12342 if (isGridTemplateMasonryValueEnabled) {
12343 gCSSProperties["masonry-auto-flow"] = {
12344 domProp: "masonryAutoFlow",
12346 type: CSS_TYPE_LONGHAND,
12347 initial_values: ["pack"],
12348 other_values: ["pack ordered", "ordered next", "next definite-first"],
12349 invalid_values: ["auto", "none", "10px", "row", "dense"],
12352 let alignTracks = { ...gCSSProperties["align-content"] };
12353 alignTracks.domProp = "alignTracks";
12354 gCSSProperties["align-tracks"] = alignTracks;
12356 let justifyTracks = { ...gCSSProperties["justify-content"] };
12357 justifyTracks.domProp = "justifyTracks";
12358 gCSSProperties["justify-tracks"] = justifyTracks;
12361 gCSSProperties["display"].other_values.push("grid", "inline-grid");
12362 gCSSProperties["grid-auto-flow"] = {
12363 domProp: "gridAutoFlow",
12365 type: CSS_TYPE_LONGHAND,
12366 initial_values: ["row"],
12375 invalid_values: ["", "auto", "none", "10px", "column row", "dense row dense"],
12378 gCSSProperties["grid-auto-columns"] = {
12379 domProp: "gridAutoColumns",
12381 type: CSS_TYPE_LONGHAND,
12382 initial_values: ["auto"],
12391 "minmax(20px, max-content)",
12392 "minmax(min-content, auto)",
12393 "minmax(auto, max-content)",
12394 "m\\69nmax(20px, 4Fr)",
12395 "MinMax(min-content, calc(20px + 10%))",
12396 "fit-content(1px)",
12397 "fit-content(calc(1px - 99%))",
12398 "fit-content(10%)",
12400 "2.5fr min-content fit-content(1px)",
12412 "mÄ°nmax(20px, 100px)",
12413 "minmax(20px, 100px, 200px)",
12414 "maxmin(100px, 20px)",
12415 "minmax(min-content, minmax(30px, max-content))",
12416 "fit-content(-1px)",
12417 "fit-content(auto)",
12418 "fit-content(min-content)",
12422 gCSSProperties["grid-auto-rows"] = {
12423 domProp: "gridAutoRows",
12425 type: CSS_TYPE_LONGHAND,
12426 initial_values: gCSSProperties["grid-auto-columns"].initial_values,
12427 other_values: gCSSProperties["grid-auto-columns"].other_values,
12428 invalid_values: gCSSProperties["grid-auto-columns"].invalid_values,
12431 gCSSProperties["grid-template-columns"] = {
12432 domProp: "gridTemplateColumns",
12434 type: CSS_TYPE_LONGHAND,
12435 initial_values: ["none"],
12440 "[normal] 40px [] auto [ ] 12%",
12441 "[foo] 40px min-content [ bar ] calc(2px - 99%) max-content",
12442 "40px min-content calc(20px + 10%) max-content",
12443 "minmax(min-content, auto)",
12444 "minmax(auto, max-content)",
12445 "m\\69nmax(20px, 4Fr)",
12446 "40px MinMax(min-content, calc(20px + 10%)) max-content",
12448 "[] 40px [-foo] 2em [bar baz This is one ident]",
12449 // TODO bug 978478: "[a] repeat(3, [b] 20px [c] 40px [d]) [e]",
12451 "repeat(1, [a] 20px)",
12452 "[a] Repeat(4, [a] 20px [] auto [b c]) [d]",
12453 "[a] 2.5fr Repeat(4, [a] 20px [] auto [b c]) [d]",
12454 "[a] 2.5fr [z] Repeat(4, [a] 20px [] auto [b c]) [d]",
12455 "[a] 2.5fr [z] Repeat(4, [a] 20px [] auto) [d]",
12456 "[a] 2.5fr [z] Repeat(4, 20px [b c] auto [b c]) [d]",
12457 "[a] 2.5fr [z] Repeat(4, 20px auto) [d]",
12458 "repeat(auto-fill, 0)",
12459 "[a] repeat( Auto-fill,1%)",
12460 "minmax(auto,0) [a] repeat(Auto-fit, 0) minmax(0,auto)",
12461 "minmax(calc(1% + 1px),auto) repeat(Auto-fit,[] 1%) minmax(auto,1%)",
12462 "[a] repeat( auto-fit,[a b] minmax(0,0) )",
12463 "[a] 40px repeat(auto-fit,[a b] minmax(1px, 0) [])",
12464 "[a] calc(1px - 99%) [b] repeat(auto-fit,[a b] minmax(1mm, 1%) [c]) [c]",
12465 "repeat(auto-fill, 0 0)",
12466 "repeat(auto-fill, 0 [] 0)",
12467 "repeat(auto-fill,minmax(1%,auto))",
12468 "repeat(auto-fill,minmax(1em,min-content)) minmax(min-content,0)",
12469 "repeat(auto-fill,minmax(max-content,1mm))",
12470 "repeat(2, fit-content(1px))",
12471 "fit-content(1px) 1fr",
12472 "[a] fit-content(calc(1px - 99%)) [b]",
12473 "[a] fit-content(10%) [b c] fit-content(1em)",
12474 // See https://bugzilla.mozilla.org/show_bug.cgi?id=981300
12475 "[none subgrid min-content max-content foo] 40px",
12477 "subgrid [] [foo bar]",
12478 "subgrid repeat(1, [])",
12479 "subgrid Repeat(4, [a] [b c] [] [d])",
12480 "subgrid repeat(auto-fill, [])",
12481 "subgrid repeat(Auto-fill, [a b c]) [a] []",
12482 "subgrid [x] repeat( Auto-fill, [a b c]) []",
12483 "subgrid [x] repeat( auto-fill , [a b] [c]) [y]",
12484 "subgrid repeat(auto-fill, [a] [b] [c]) [d]",
12485 "subgrid repeat(Auto-fill, [a] [b c] [] [d])",
12486 "subgrid [x y] [x] repeat(auto-fill, [a b] [c] [d] [d]) [x] [x]",
12487 "subgrid [x] repeat(auto-fill, []) [y z]",
12488 "subgrid [x] repeat(auto-fill, [y]) [z] [] repeat(2, [a] [b]) [y] []",
12489 "subgrid [x] repeat(auto-fill, []) [x y] [z] [] []",
12506 "[foo[] bar] 40px",
12509 "[foo] [bar] 40px",
12510 "40px [foo] [bar]",
12513 "mÄ°nmax(20px, 100px)",
12514 "minmax(20px, 100px, 200px)",
12515 "maxmin(100px, 20px)",
12516 "minmax(min-content, minmax(30px, max-content))",
12518 "repeat(-3, 20px)",
12519 "rêpeat(1, 20px)",
12522 "repeat(3px, 20px)",
12523 "repeat(2.0, 20px)",
12524 "repeat(2.5, 20px)",
12525 "repeat(2, (foo))",
12527 "40px calc(0px + rubbish)",
12528 "repeat(1, repeat(1, 20px))",
12529 "repeat(auto-fill, auto)",
12530 "repeat(auto-fit,auto)",
12531 "repeat(auto-fill, fit-content(1px))",
12532 "repeat(auto-fit, fit-content(1px))",
12533 "repeat(auto-fit,[])",
12534 "repeat(auto-fill, 0) repeat(auto-fit, 0) ",
12535 "repeat(auto-fit, 0) repeat(auto-fill, 0) ",
12536 "[a] repeat(auto-fit, 0) repeat(auto-fit, 0) ",
12537 "[a] repeat(auto-fill, 0) [a] repeat(auto-fill, 0) ",
12538 "repeat(auto-fill, min-content)",
12539 "repeat(auto-fit,max-content)",
12540 "repeat(auto-fit,1fr)",
12541 "repeat(auto-fit,minmax(auto,auto))",
12542 "repeat(auto-fit,minmax(min-content,1fr))",
12543 "repeat(auto-fit,minmax(1fr,auto))",
12544 "repeat(auto-fill,minmax(1fr,1em))",
12545 "repeat(auto-fill, 10px) auto",
12546 "auto repeat(auto-fit, 10px)",
12547 "minmax(min-content,max-content) repeat(auto-fit, 0)",
12548 "10px [a] 10px [b a] 1fr [b] repeat(auto-fill, 0)",
12549 "fit-content(-1px)",
12550 "fit-content(auto)",
12551 "fit-content(min-content)",
12552 "fit-content(1px) repeat(auto-fit, 1px)",
12553 "fit-content(1px) repeat(auto-fill, 1px)",
12554 "subgrid [inherit]",
12555 "subgrid [initial]",
12557 "subgrid [default]",
12559 "subgrid [foo] 40px",
12560 "subgrid [foo 40px]",
12562 "subgrid rêpeat(1, [])",
12563 "subgrid repeat(0, [])",
12564 "subgrid repeat(-3, [])",
12565 "subgrid repeat(2.0, [])",
12566 "subgrid repeat(2.5, [])",
12567 "subgrid repeat(3px, [])",
12568 "subgrid repeat(1)",
12569 "subgrid repeat(1, )",
12570 "subgrid repeat(2, [40px])",
12571 "subgrid repeat(2, foo)",
12572 "subgrid repeat(1, repeat(1, []))",
12573 "subgrid repeat(auto-fill)",
12574 "subgrid repeat(auto-fill) [a]",
12575 "subgrid repeat(auto-fill) []",
12576 "subgrid [a] repeat(auto-fill)",
12577 "subgrid repeat(auto-fill,)",
12578 "subgrid repeat(auto-fill,)",
12579 "subgrid repeat(auto-fill,) [a]",
12580 "subgrid repeat(auto-fill,) []",
12581 "subgrid [a] repeat(auto-fill,)",
12582 "subgrid repeat(auto-fit,[])",
12583 "subgrid [] repeat(auto-fit,[])",
12584 "subgrid [a] repeat(auto-fit,[])",
12585 "subgrid repeat(auto-fill, 1px)",
12586 "subgrid repeat(auto-fill, 1px [])",
12587 "subgrid repeat(auto-fill, []) repeat(auto-fill, [])",
12589 unbalanced_values: ["(foo] 40px"],
12591 if (isGridTemplateMasonryValueEnabled) {
12592 gCSSProperties["grid-template-columns"].other_values.push("masonry");
12593 gCSSProperties["grid-template-columns"].invalid_values.push(
12595 "masonry [foo] 40px",
12602 "masonry repeat(1, [])"
12605 gCSSProperties["grid-template-rows"] = {
12606 domProp: "gridTemplateRows",
12608 type: CSS_TYPE_LONGHAND,
12609 initial_values: gCSSProperties["grid-template-columns"].initial_values,
12610 other_values: gCSSProperties["grid-template-columns"].other_values,
12611 invalid_values: gCSSProperties["grid-template-columns"].invalid_values,
12613 gCSSProperties["grid-template-areas"] = {
12614 domProp: "gridTemplateAreas",
12616 type: CSS_TYPE_LONGHAND,
12617 initial_values: ["none"],
12619 "'1a-é_ .' \"b .\"",
12620 "' Z\t\\aZ' 'Z Z'",
12621 " '. . a b' '. .a b' ",
12625 "'...-blah' '. .'",
12626 "'.. ..' '.. ...'",
12637 "'a a'\n'..'\n'a a'",
12641 gCSSProperties["grid-template"] = {
12642 domProp: "gridTemplate",
12644 type: CSS_TYPE_TRUE_SHORTHAND,
12646 "grid-template-areas",
12647 "grid-template-rows",
12648 "grid-template-columns",
12650 initial_values: ["none", "none / none"],
12652 // <'grid-template-rows'> / <'grid-template-columns'>
12654 "[foo] 40px [bar] / [baz] repeat(auto-fill,100px) [fizz]",
12657 // [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?
12660 "'fizz' / [foo] 40px",
12661 "[bar] 'fizz' / [foo] 40px",
12662 "'fizz' 100px / [foo] 40px",
12663 "[bar] 'fizz' 100px / [foo] 40px",
12664 "[bar] 'fizz' 100px [buzz] / [foo] 40px",
12665 "[bar] 'fizz' 100px [buzz] \n [a] '.' 200px [b] / [foo] 40px",
12666 "subgrid / subgrid",
12667 "subgrid/40px 20px",
12668 "subgrid [foo] [] [bar baz] / 40px 20px",
12669 "40px 20px/subgrid",
12670 "40px 20px/subgrid [foo] [] repeat(3, [a] [b]) [bar baz]",
12672 "subgrid [foo] [] [bar baz]/subgrid [foo] [] [bar baz]",
12675 "'fizz' / repeat(1, 100px)",
12676 "'fizz' repeat(1, 100px) / 0px",
12677 "[foo] [bar] 40px / 100px",
12678 "[fizz] [buzz] 100px / 40px",
12679 "[fizz] [buzz] 'foo' / 40px",
12683 "subgrid [] / 'fizz'",
12684 "subgrid / 'fizz'",
12687 if (isGridTemplateMasonryValueEnabled) {
12688 gCSSProperties["grid-template"].other_values.push(
12689 "masonry / subgrid",
12690 "subgrid / masonry",
12691 "masonry / masonry" /* valid but behaves as 'masonry / none' */,
12692 "masonry/40px 20px",
12693 "subgrid [foo] [] [bar baz] / masonry",
12694 "40px 20px/masonry",
12695 "masonry/subgrid [foo] [] repeat(3, [a] [b]) [bar baz]",
12696 "subgrid [foo] [] [bar baz]/masonry"
12698 gCSSProperties["grid-template"].invalid_values.push(
12704 gCSSProperties["grid"] = {
12707 type: CSS_TYPE_TRUE_SHORTHAND,
12709 "grid-template-areas",
12710 "grid-template-rows",
12711 "grid-template-columns",
12714 "grid-auto-columns",
12716 initial_values: ["none", "none / none"],
12718 "auto-flow 40px / none",
12719 "auto-flow 40px 100px / 0",
12720 "auto-flow / 40px",
12721 "auto-flow dense auto / auto",
12722 "dense auto-flow minmax(min-content, 2fr) / auto",
12723 "dense auto-flow / 100px",
12724 "none / auto-flow 40px",
12725 "40px / auto-flow",
12726 "none / dense auto-flow auto",
12727 ].concat(gCSSProperties["grid-template"].other_values),
12732 "dense dense 40px / 0",
12733 "auto-flow / auto-flow",
12734 "auto-flow / dense",
12735 "auto-flow [a] 0 / 0",
12736 "0 / auto-flow [a] 0",
12737 "auto-flow -20px / 0",
12738 "auto-flow 200ms / 0",
12739 "auto-flow 1px [a] 1px / 0",
12741 gCSSProperties["grid-template"].invalid_values,
12742 gCSSProperties["grid-auto-flow"].other_values,
12743 gCSSProperties["grid-auto-flow"].invalid_values.filter(v => v != "none")
12747 var gridLineOtherValues = [
12764 var gridLineInvalidValues = [
12788 gCSSProperties["grid-column-start"] = {
12789 domProp: "gridColumnStart",
12791 type: CSS_TYPE_LONGHAND,
12792 initial_values: ["auto"],
12793 other_values: gridLineOtherValues,
12794 invalid_values: gridLineInvalidValues,
12796 gCSSProperties["grid-column-end"] = {
12797 domProp: "gridColumnEnd",
12799 type: CSS_TYPE_LONGHAND,
12800 initial_values: ["auto"],
12801 other_values: gridLineOtherValues,
12802 invalid_values: gridLineInvalidValues,
12804 gCSSProperties["grid-row-start"] = {
12805 domProp: "gridRowStart",
12807 type: CSS_TYPE_LONGHAND,
12808 initial_values: ["auto"],
12809 other_values: gridLineOtherValues,
12810 invalid_values: gridLineInvalidValues,
12812 gCSSProperties["grid-row-end"] = {
12813 domProp: "gridRowEnd",
12815 type: CSS_TYPE_LONGHAND,
12816 initial_values: ["auto"],
12817 other_values: gridLineOtherValues,
12818 invalid_values: gridLineInvalidValues,
12821 // The grid-column and grid-row shorthands take values of the form
12822 // <grid-line> [ / <grid-line> ]?
12823 var gridColumnRowOtherValues = [].concat(gridLineOtherValues);
12824 gridLineOtherValues.concat(["auto"]).forEach(function (val) {
12825 gridColumnRowOtherValues.push(" foo / " + val);
12826 gridColumnRowOtherValues.push(val + "/2");
12828 var gridColumnRowInvalidValues = ["foo, bar", "foo / bar / baz"].concat(
12829 gridLineInvalidValues
12831 gridLineInvalidValues.forEach(function (val) {
12832 gridColumnRowInvalidValues.push("span 3 / " + val);
12833 gridColumnRowInvalidValues.push(val + " / foo");
12835 gCSSProperties["grid-column"] = {
12836 domProp: "gridColumn",
12838 type: CSS_TYPE_TRUE_SHORTHAND,
12839 subproperties: ["grid-column-start", "grid-column-end"],
12840 initial_values: ["auto", "auto / auto"],
12841 other_values: gridColumnRowOtherValues,
12842 invalid_values: gridColumnRowInvalidValues,
12844 gCSSProperties["grid-row"] = {
12845 domProp: "gridRow",
12847 type: CSS_TYPE_TRUE_SHORTHAND,
12848 subproperties: ["grid-row-start", "grid-row-end"],
12849 initial_values: ["auto", "auto / auto"],
12850 other_values: gridColumnRowOtherValues,
12851 invalid_values: gridColumnRowInvalidValues,
12854 var gridAreaOtherValues = gridLineOtherValues.slice();
12855 gridLineOtherValues.forEach(function (val) {
12856 gridAreaOtherValues.push("foo / " + val);
12857 gridAreaOtherValues.push(val + "/2/3");
12858 gridAreaOtherValues.push("foo / bar / " + val + " / baz");
12860 var gridAreaInvalidValues = [
12862 "foo / bar / baz / fizz / buzz",
12863 "default / foo / bar / baz",
12864 "foo / initial / bar / baz",
12865 "foo / bar / inherit / baz",
12866 "foo / bar / baz / unset",
12867 ].concat(gridLineInvalidValues);
12868 gridLineInvalidValues.forEach(function (val) {
12869 gridAreaInvalidValues.push("foo / " + val);
12870 gridAreaInvalidValues.push("foo / bar / " + val);
12871 gridAreaInvalidValues.push("foo / 4 / bar / " + val);
12874 gCSSProperties["grid-area"] = {
12875 domProp: "gridArea",
12877 type: CSS_TYPE_TRUE_SHORTHAND,
12880 "grid-column-start",
12887 "auto / auto / auto",
12888 "auto / auto / auto / auto",
12890 other_values: gridAreaOtherValues,
12891 invalid_values: gridAreaInvalidValues,
12894 gCSSProperties["column-gap"] = {
12895 domProp: "columnGap",
12897 type: CSS_TYPE_LONGHAND,
12898 initial_values: ["normal"],
12914 "fit-content(1px)",
12917 gCSSProperties["grid-column-gap"] = {
12918 domProp: "gridColumnGap",
12920 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
12921 alias_for: "column-gap",
12922 subproperties: ["column-gap"],
12924 gCSSProperties["row-gap"] = {
12927 type: CSS_TYPE_LONGHAND,
12928 initial_values: ["normal"],
12938 invalid_values: ["-1px", "auto", "none", "1px 1px", "-1%", "min-content"],
12940 gCSSProperties["grid-row-gap"] = {
12941 domProp: "gridRowGap",
12943 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
12944 alias_for: "row-gap",
12945 subproperties: ["row-gap"],
12947 gCSSProperties["gap"] = {
12950 type: CSS_TYPE_TRUE_SHORTHAND,
12951 subproperties: ["column-gap", "row-gap"],
12952 initial_values: ["normal", "normal normal"],
12957 "calc(1px) calc(1%)",
12969 gCSSProperties["grid-gap"] = {
12970 domProp: "gridGap",
12972 type: CSS_TYPE_TRUE_SHORTHAND,
12974 subproperties: ["column-gap", "row-gap"],
12977 gCSSProperties["contain"] = {
12978 domProp: "contain",
12980 type: CSS_TYPE_LONGHAND,
12981 initial_values: ["none"],
12992 "layout size paint",
12993 "layout paint size",
12994 "size paint layout",
12995 "paint size layout",
13001 "strict layout size",
13005 "layout size strict",
13006 "layout size paint strict",
13012 "content strict size",
13013 "paint layout content",
13014 "layout size content",
13023 if (IsCSSPropertyPrefEnabled("layout.css.initial-letter.enabled")) {
13024 gCSSProperties["initial-letter"] = {
13025 domProp: "initialLetter",
13027 type: CSS_TYPE_LONGHAND,
13028 applies_to_first_letter: true,
13029 initial_values: ["normal"],
13030 other_values: ["2", "2.5", "3.7 2", "4 3"],
13031 invalid_values: ["-3", "3.7 -2", "25%", "16px", "1 0", "0", "0 1"],
13035 if (IsCSSPropertyPrefEnabled("layout.css.osx-font-smoothing.enabled")) {
13036 gCSSProperties["-moz-osx-font-smoothing"] = {
13037 domProp: "MozOsxFontSmoothing",
13039 type: CSS_TYPE_LONGHAND,
13040 applies_to_first_letter: true,
13041 applies_to_first_line: true,
13042 applies_to_placeholder: true,
13043 applies_to_cue: true,
13044 applies_to_marker: true,
13045 initial_values: ["auto"],
13046 other_values: ["grayscale"],
13047 invalid_values: ["none", "subpixel-antialiased", "antialiased"],
13051 if (IsCSSPropertyPrefEnabled("layout.css.scroll-anchoring.enabled")) {
13052 gCSSProperties["overflow-anchor"] = {
13053 domProp: "overflowAnchor",
13055 type: CSS_TYPE_LONGHAND,
13056 initial_values: ["auto"],
13057 other_values: ["none"],
13058 invalid_values: [],
13062 if (IsCSSPropertyPrefEnabled("layout.css.overflow-clip-box.enabled")) {
13063 gCSSProperties["overflow-clip-box-block"] = {
13064 domProp: "overflowClipBoxBlock",
13066 type: CSS_TYPE_LONGHAND,
13067 applies_to_placeholder: true,
13068 initial_values: ["padding-box"],
13069 other_values: ["content-box"],
13070 invalid_values: ["auto", "border-box", "0", "padding-box padding-box"],
13072 gCSSProperties["overflow-clip-box-inline"] = {
13073 domProp: "overflowClipBoxInline",
13075 type: CSS_TYPE_LONGHAND,
13076 applies_to_placeholder: true,
13077 initial_values: ["padding-box"],
13078 other_values: ["content-box"],
13079 invalid_values: ["none", "border-box", "0", "content-box content-box"],
13081 gCSSProperties["overflow-clip-box"] = {
13082 domProp: "overflowClipBox",
13084 type: CSS_TYPE_TRUE_SHORTHAND,
13085 subproperties: ["overflow-clip-box-block", "overflow-clip-box-inline"],
13086 initial_values: ["padding-box"],
13089 "padding-box content-box",
13090 "content-box padding-box",
13091 "content-box content-box",
13096 "content-box none",
13099 "content-box, content-box",
13104 if (IsCSSPropertyPrefEnabled("layout.css.overscroll-behavior.enabled")) {
13105 gCSSProperties["overscroll-behavior-x"] = {
13106 domProp: "overscrollBehaviorX",
13108 type: CSS_TYPE_LONGHAND,
13109 initial_values: ["auto"],
13110 other_values: ["contain", "none"],
13111 invalid_values: ["left", "1px"],
13113 gCSSProperties["overscroll-behavior-y"] = {
13114 domProp: "overscrollBehaviorY",
13116 type: CSS_TYPE_LONGHAND,
13117 initial_values: ["auto"],
13118 other_values: ["contain", "none"],
13119 invalid_values: ["left", "1px"],
13121 gCSSProperties["overscroll-behavior-inline"] = {
13122 domProp: "overscrollBehaviorInline",
13125 type: CSS_TYPE_LONGHAND,
13126 initial_values: ["auto"],
13127 other_values: ["contain", "none"],
13128 invalid_values: ["left", "1px"],
13130 gCSSProperties["overscroll-behavior-block"] = {
13131 domProp: "overscrollBehaviorBlock",
13134 type: CSS_TYPE_LONGHAND,
13135 initial_values: ["auto"],
13136 other_values: ["contain", "none"],
13137 invalid_values: ["left", "1px"],
13139 gCSSProperties["overscroll-behavior"] = {
13140 domProp: "overscrollBehavior",
13142 type: CSS_TYPE_TRUE_SHORTHAND,
13143 subproperties: ["overscroll-behavior-x", "overscroll-behavior-y"],
13144 initial_values: ["auto"],
13152 invalid_values: ["left", "1px", "contain auto none", "contain nonsense"],
13159 "{} scroll no-repeat",
13161 "url(404.png), {}, -moz-element(#a) black",
13164 "{} add no-repeat",
13166 "url(404.png), {}, -moz-element(#a) alpha",
13170 for (const prop of ["background", "mask"]) {
13172 const p = patterns[prop];
13173 for (const v of invalidNonUrlImageValues) {
13174 gCSSProperties[prop].invalid_values.push(
13175 p[i++ % p.length].replace("{}", v)
13178 for (const v of validNonUrlImageValues) {
13179 gCSSProperties[prop].other_values.push(
13180 p[i++ % p.length].replace("{}", v)
13186 gCSSProperties["display"].other_values.push("flow-root");
13188 gCSSProperties["hyphenate-character"] = {
13189 domProp: "hyphenateCharacter",
13191 type: CSS_TYPE_LONGHAND,
13192 applies_to_first_letter: true,
13193 applies_to_first_line: true,
13194 applies_to_placeholder: true,
13195 initial_values: ["auto"],
13196 other_values: ['"="', '"/-/"', '"\1400"', '""'],
13197 invalid_values: ["none", "auto auto", "1400", "U+1400"],
13200 if (IsCSSPropertyPrefEnabled("layout.css.content-visibility.enabled")) {
13201 gCSSProperties["content-visibility"] = {
13202 domProp: "contentVisibility",
13204 type: CSS_TYPE_LONGHAND,
13205 initial_values: ["visible"],
13206 other_values: ["auto", "hidden"],
13209 "partially-visible",
13216 if (IsCSSPropertyPrefEnabled("layout.css.contain-intrinsic-size.enabled")) {
13217 gCSSProperties["contain-intrinsic-width"] = {
13218 domProp: "containIntrinsicWidth",
13220 type: CSS_TYPE_LONGHAND,
13221 initial_values: ["none"],
13222 other_values: ["1em", "1px", "auto 1px", "auto none"],
13223 invalid_values: ["auto auto", "auto", "-1px"],
13225 gCSSProperties["contain-intrinsic-height"] = {
13226 domProp: "containIntrinsicHeight",
13228 type: CSS_TYPE_LONGHAND,
13229 initial_values: ["none"],
13230 other_values: ["1em", "1px", "auto 1px", "auto none"],
13231 invalid_values: ["auto auto", "auto", "-1px"],
13233 gCSSProperties["contain-intrinsic-block-size"] = {
13234 domProp: "containIntrinsicBlockSize",
13237 type: CSS_TYPE_LONGHAND,
13238 initial_values: ["none"],
13239 other_values: ["1em", "1px", "auto 1px", "auto none"],
13240 invalid_values: ["auto auto", "auto", "-1px"],
13242 gCSSProperties["contain-intrinsic-inline-size"] = {
13243 domProp: "containIntrinsicInlineSize",
13246 type: CSS_TYPE_LONGHAND,
13247 initial_values: ["none"],
13248 other_values: ["1em", "1px", "auto 1px", "auto none"],
13249 invalid_values: ["auto auto", "auto", "-1px"],
13252 gCSSProperties["contain-intrinsic-size"] = {
13253 domProp: "containIntrinsicSize",
13255 type: CSS_TYPE_TRUE_SHORTHAND,
13256 subproperties: ["contain-intrinsic-width", "contain-intrinsic-height"],
13257 initial_values: ["none"],
13258 other_values: ["1em 1em", "1px 1px", "auto 1px auto 1px", "1px auto 1px"],
13259 invalid_values: ["auto auto", "-1px -1px", "1px, auto none"],
13263 if (IsCSSPropertyPrefEnabled("layout.css.container-queries.enabled")) {
13264 gCSSProperties["container-type"] = {
13265 domProp: "containerType",
13267 type: CSS_TYPE_LONGHAND,
13268 initial_values: ["normal"],
13269 other_values: ["inline-size", "size"],
13272 "none inline-size",
13273 "inline-size none",
13276 "inline-size style inline-size",
13277 "inline-size block-size",
13279 "block-size style",
13280 "size inline-size",
13284 gCSSProperties["container-name"] = {
13285 domProp: "containerName",
13287 type: CSS_TYPE_LONGHAND,
13288 initial_values: ["none"],
13289 other_values: ["foo bar", "foo", "baz bazz", "foo foo"],
13290 invalid_values: ["foo unset", "none bar", "foo initial", "initial foo"],
13292 gCSSProperties["container"] = {
13293 domProp: "container",
13295 type: CSS_TYPE_TRUE_SHORTHAND,
13296 subproperties: ["container-type", "container-name"],
13297 initial_values: ["none"],
13298 other_values: ["foo / size", "foo bar / size", "foo / inline-size", "foo"],
13299 invalid_values: ["size / foo", "size / foo bar"],
13304 // TODO These properties are chrome-only, and are not exposed via CSSOM.
13305 // We may still want to find a way to test them. See bug 1206999.
13306 gCSSProperties["-moz-window-shadow"] = {
13307 //domProp: "MozWindowShadow",
13309 type: CSS_TYPE_LONGHAND,
13310 initial_values: ["default"],
13311 other_values: ["none", "menu", "tooltip", "sheet", "cliprounded"],
13312 invalid_values: [],
13315 gCSSProperties["-moz-window-opacity"] = {
13316 // domProp: "MozWindowOpacity",
13318 type: CSS_TYPE_LONGHAND,
13330 other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"],
13331 invalid_values: ["0px", "1px", "20%", "default", "auto"],
13334 gCSSProperties["-moz-window-transform"] = {
13335 // domProp: "MozWindowTransform",
13337 type: CSS_TYPE_LONGHAND,
13338 prerequisites: { width: "300px", height: "50px" },
13339 initial_values: ["none"],
13343 "translatex(-4px)",
13345 "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
13348 "translate(10px, -3px)",
13352 "rotate(0.25turn)",
13369 "scale(10%, -20%)",
13382 "rotate(45deg) scale(2, 1)",
13383 "skewx(45deg) skewx(-50grad)",
13384 "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
13388 "translate(3%, 5px)",
13389 "translate(5px, 3%)",
13390 "matrix(1, 2, 3, 4, 5, 6)",
13391 /* valid calc() values */
13392 "translatex(calc(5px + 10%))",
13393 "translatey(calc(0.25 * 5px + 10% / 3))",
13394 "translate(calc(5px - 10% * 3))",
13395 "translate(calc(5px - 3 * 10%), 50px)",
13396 "translate(-50px, calc(5px - 10% * 3))",
13399 "translatez(-4px)",
13401 "translatez(2px) translatez(5px)",
13402 "translate3d(3px, 4px, 5px)",
13403 "translate3d(2em, 3px, 1em)",
13404 "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
13405 "scale3d(4, 4, 4)",
13406 "scale3d(4%, 4%, 4%)",
13407 "scale3d(-2, 3, -7)",
13408 "scale3d(-2%, 3%, -7%)",
13413 "rotate3d(2, 3, 4, 45deg)",
13414 "rotate3d(-3, 7, 0, 12rad)",
13416 "rotatey(-12grad)",
13418 "rotatex(0.125turn)",
13419 "perspective(0px)",
13420 "perspective(1000px)",
13421 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
13422 "translate(10px, calc(min(5px,10%)))",
13423 "translate(calc(max(5px,10%)), 10%)",
13424 "translate(max(5px,10%), 10%)",
13434 "translate(-3, -4)",
13435 "translatex(1px 1px)",
13436 "translatex(translatex(1px))",
13437 "translatex(#0000ff)",
13440 "matrix(1px, 2px, 3px, 4px, 5px, 6px)",
13442 "matrix(1%, 0, 0, 0, 0px, 0px)",
13443 "matrix(0, 1%, 2, 3, 4px,5px)",
13444 "matrix(0, 1, 2%, 3, 4px, 5px)",
13445 "matrix(0, 1, 2, 3%, 4%, 5%)",
13446 "matrix(1, 2, 3, 4, 5px, 6%)",
13447 "matrix(1, 2, 3, 4, 5%, 6px)",
13448 "matrix(1, 2, 3, 4, 5%, 6%)",
13449 "matrix(1, 2, 3, 4, 5px, 6em)",
13450 /* invalid calc() values */
13451 "translatey(-moz-min(5px,10%))",
13452 "translatex(-moz-max(5px,10%))",
13453 "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
13454 "perspective(-10px)",
13455 "matrix3d(dinosaur)",
13456 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
13457 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
13458 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
13459 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
13462 "translate3d(3px, 4px, 1px, 7px)",
13463 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
13464 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)",
13468 gCSSProperties["-moz-window-transform-origin"] = {
13469 // domProp: "MozWindowTransformOrigin",
13471 type: CSS_TYPE_LONGHAND,
13472 /* no subproperties */
13473 prerequisites: { width: "10px", height: "10px", display: "block" },
13474 initial_values: ["50% 50%", "center", "center center"],
13502 "calc(20px) calc(20px)",
13503 "calc(20px + 1em) calc(20px / 2)",
13504 "calc(20px + 50%) calc(50% - 10px)",
13505 "calc(-20px) calc(-50%)",
13506 "calc(-20%) calc(-50%)",
13518 "0px calc(0px + rubbish)",
13519 "0px 0px calc(0px + rubbish)",
13525 gCSSProperties["-moz-context-properties"] = {
13526 //domProp: "MozContextProperties",
13528 type: CSS_TYPE_LONGHAND,
13529 initial_values: ["none"],
13534 "fill, stroke, fill",
13550 gCSSProperties["scrollbar-color"] = {
13551 domProp: "scrollbarColor",
13553 type: CSS_TYPE_LONGHAND,
13554 initial_values: ["auto"],
13555 other_values: ["red green", "blue yellow", "#ffff00 white"],
13556 invalid_values: ["ffff00 red", "auto red", "red auto", "green"],
13559 gCSSProperties["scrollbar-width"] = {
13560 domProp: "scrollbarWidth",
13562 type: CSS_TYPE_LONGHAND,
13563 initial_values: ["auto"],
13564 other_values: ["none", "thin"],
13565 invalid_values: ["1px"],
13568 if (IsCSSPropertyPrefEnabled("layout.css.motion-path-url.enabled")) {
13569 gCSSProperties["offset-path"]["other_values"].push("url(#svgPath)");
13573 let linear_function_other_values = [
13575 "linear(0 0% 50%, 1 50% 100%)",
13578 let linear_function_invalid_values = [
13581 "linear(0% 0 100%)",
13584 gCSSProperties["animation-timing-function"].other_values.push(
13585 ...linear_function_other_values
13587 gCSSProperties["animation-timing-function"].invalid_values.push(
13588 ...linear_function_invalid_values
13591 gCSSProperties["transition-timing-function"].other_values.push(
13592 ...linear_function_other_values
13594 gCSSProperties["transition-timing-function"].invalid_values.push(
13595 ...linear_function_invalid_values
13598 gCSSProperties["animation"].other_values.push(
13599 "1s 2s linear(0, 1) bounce",
13600 "4s linear(0, 0.5 25% 75%, 1 100% 100%)"
13604 if (IsCSSPropertyPrefEnabled("layout.css.backdrop-filter.enabled")) {
13605 gCSSProperties["backdrop-filter"] = {
13606 domProp: "backdropFilter",
13608 type: CSS_TYPE_LONGHAND,
13609 initial_values: ["none"],
13610 other_values: gCSSProperties["filter"].other_values,
13611 invalid_values: gCSSProperties["filter"].invalid_values,
13615 gCSSProperties["math-depth"] = {
13616 domProp: "mathDepth",
13618 type: CSS_TYPE_LONGHAND,
13619 initial_values: ["0"],
13621 // auto-add cannot be tested here because it has no effect when the
13622 // inherited math-style is equal to the default (normal).
13628 "add(calc(4 - 2/3))",
13630 invalid_values: ["auto", "1,23", "1.23", "add(1,23)", "add(1.23)"],
13633 gCSSProperties["math-style"] = {
13634 domProp: "mathStyle",
13636 type: CSS_TYPE_LONGHAND,
13637 initial_values: ["normal"],
13638 other_values: ["compact"],
13639 invalid_values: [],
13642 if (IsCSSPropertyPrefEnabled("layout.css.forced-color-adjust.enabled")) {
13643 gCSSProperties["forced-color-adjust"] = {
13644 domProp: "forcedColorAdjust",
13646 type: CSS_TYPE_LONGHAND,
13647 initial_values: ["auto"],
13648 other_values: ["none"],
13649 invalid_values: [],
13653 if (IsCSSPropertyPrefEnabled("layout.css.animation-composition.enabled")) {
13654 gCSSProperties["animation-composition"] = {
13655 domProp: "animationComposition",
13657 type: CSS_TYPE_LONGHAND,
13658 applies_to_marker: true,
13659 initial_values: ["replace"],
13665 "replace, add, accumulate",
13667 invalid_values: ["all", "none"],
13671 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.animations")) {
13672 Object.assign(gCSSProperties, {
13673 "-moz-animation": {
13674 domProp: "MozAnimation",
13676 type: CSS_TYPE_TRUE_SHORTHAND,
13677 applies_to_marker: true,
13678 alias_for: "animation",
13681 "animation-duration",
13682 "animation-timing-function",
13684 "animation-direction",
13685 "animation-fill-mode",
13686 "animation-iteration-count",
13687 "animation-play-state",
13690 "-moz-animation-delay": {
13691 domProp: "MozAnimationDelay",
13693 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13694 applies_to_marker: true,
13695 alias_for: "animation-delay",
13696 subproperties: ["animation-delay"],
13698 "-moz-animation-direction": {
13699 domProp: "MozAnimationDirection",
13701 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13702 applies_to_marker: true,
13703 alias_for: "animation-direction",
13704 subproperties: ["animation-direction"],
13706 "-moz-animation-duration": {
13707 domProp: "MozAnimationDuration",
13709 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13710 applies_to_marker: true,
13711 alias_for: "animation-duration",
13712 subproperties: ["animation-duration"],
13714 "-moz-animation-fill-mode": {
13715 domProp: "MozAnimationFillMode",
13717 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13718 applies_to_marker: true,
13719 alias_for: "animation-fill-mode",
13720 subproperties: ["animation-fill-mode"],
13722 "-moz-animation-iteration-count": {
13723 domProp: "MozAnimationIterationCount",
13725 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13726 applies_to_marker: true,
13727 alias_for: "animation-iteration-count",
13728 subproperties: ["animation-iteration-count"],
13730 "-moz-animation-name": {
13731 domProp: "MozAnimationName",
13733 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13734 applies_to_marker: true,
13735 alias_for: "animation-name",
13736 subproperties: ["animation-name"],
13738 "-moz-animation-play-state": {
13739 domProp: "MozAnimationPlayState",
13741 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13742 applies_to_marker: true,
13743 alias_for: "animation-play-state",
13744 subproperties: ["animation-play-state"],
13746 "-moz-animation-timing-function": {
13747 domProp: "MozAnimationTimingFunction",
13749 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13750 applies_to_marker: true,
13751 alias_for: "animation-timing-function",
13752 subproperties: ["animation-timing-function"],
13757 if (IsCSSPropertyPrefEnabled("layout.css.scroll-driven-animations.enabled")) {
13758 // Basically, web-platform-tests should cover most cases, so here we only
13759 // put some basic test cases.
13760 gCSSProperties["animation"].subproperties.push("animation-timeline");
13761 gCSSProperties["animation"].initial_values.push(
13762 "none none 0s 0s ease normal running 1.0 auto",
13765 gCSSProperties["animation"].other_values.push(
13766 "none none 0s 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) normal running 1.0 auto",
13767 "bounce 1s linear 2s timeline",
13768 "bounce 1s 2s linear none",
13770 "2s, 1s bounce timeline",
13771 "1s bounce timeline, 2s",
13772 "1s bounce none, 2s none auto"
13775 gCSSProperties["-moz-animation"].subproperties.push("animation-timeline");
13776 gCSSProperties["-webkit-animation"].subproperties.push("animation-timeline");
13778 gCSSProperties["animation-timeline"] = {
13779 domProp: "animationTimeline",
13781 type: CSS_TYPE_LONGHAND,
13782 applies_to_marker: true,
13783 initial_values: ["auto"],
13790 "bounce, bubble, opacity",
13802 "scroll(horizontal)",
13803 "scroll(vertical)",
13806 "scroll(inline nearest)",
13807 "scroll(vertical root)",
13808 "scroll(root horizontal)",
13813 "view(inline auto)",
13814 "view(vertical auto auto)",
13815 "view(horizontal 1px 1%)",
13816 "view(1px 1% block)",
13828 gCSSProperties["scroll-timeline-name"] = {
13829 domProp: "scrollTimelineName",
13831 type: CSS_TYPE_LONGHAND,
13832 initial_values: ["none"],
13848 invalid_values: ["abc bounce", "10px", "rgb(1, 2, 3)"],
13851 gCSSProperties["scroll-timeline-axis"] = {
13852 domProp: "scrollTimelineAxis",
13854 type: CSS_TYPE_LONGHAND,
13855 initial_values: ["block"],
13856 other_values: ["inline", "vertical", "horizontal"],
13857 invalid_values: ["auto", "none", "abc"],
13860 gCSSProperties["scroll-timeline"] = {
13861 domProp: "scrollTimeline",
13863 type: CSS_TYPE_TRUE_SHORTHAND,
13864 subproperties: ["scroll-timeline-name", "scroll-timeline-axis"],
13865 initial_values: ["none block", "none"],
13870 "\\32bounce inline",
13872 "\\32 0bounce vertical",
13873 "-\\32 0bounce horizontal",
13875 "a block, b inline, c vertical",
13877 invalid_values: ["", "bounce bounce", "horizontal a", "block abc"],
13880 gCSSProperties["view-timeline-name"] = {
13881 domProp: "viewTimelineName",
13883 type: CSS_TYPE_LONGHAND,
13884 initial_values: ["none"],
13902 invalid_values: ["abc bounce", "10px", "rgb(1, 2, 3)"],
13905 gCSSProperties["view-timeline-axis"] = {
13906 domProp: "viewTimelineAxis",
13908 type: CSS_TYPE_LONGHAND,
13909 initial_values: ["block"],
13910 other_values: ["inline", "vertical", "horizontal", "inline, block"],
13911 invalid_values: ["auto", "none", "abc", "inline block"],
13914 gCSSProperties["view-timeline-inset"] = {
13915 domProp: "viewTimelineInset",
13917 type: CSS_TYPE_LONGHAND,
13918 initial_values: ["auto"],
13919 other_values: ["0px", "1%", "1px 1%", "0px 0%", "calc(0px) auto"],
13920 invalid_values: ["none", "rgb(1, 2, 3)", "foo bar", "1px 2px 3px"],
13923 gCSSProperties["view-timeline"] = {
13924 domProp: "viewTimeline",
13926 type: CSS_TYPE_TRUE_SHORTHAND,
13927 subproperties: ["view-timeline-name", "view-timeline-axis"],
13928 initial_values: ["none block", "none"],
13933 "\\32bounce inline",
13935 "\\32 0bounce vertical",
13936 "-\\32 0bounce horizontal",
13938 "a block, b inline, c vertical",
13940 invalid_values: ["", ",", "abc abc", "horizontal a", "block abc"],
13944 gCSSProperties["scrollbar-gutter"] = {
13945 domProp: "scrollbarGutter",
13947 type: CSS_TYPE_LONGHAND,
13948 initial_values: ["auto"],
13949 other_values: ["stable", "stable both-edges", "both-edges stable"],
13955 // The following values are from scrollbar-gutter extension in CSS
13956 // Overflow 4 https://drafts.csswg.org/css-overflow-4/#sbg-ext.
13958 "always both-edges",
13960 "always both-edges force",
13961 "stable both-edges force",
13966 if (IsCSSPropertyPrefEnabled("layout.css.text-wrap-balance.enabled")) {
13967 gCSSProperties["text-wrap-style"] = {
13968 domProp: "textWrapStyle",
13970 type: CSS_TYPE_LONGHAND,
13971 applies_to_placeholder: true,
13972 applies_to_cue: true,
13973 applies_to_marker: true,
13974 initial_values: ["auto"],
13975 other_values: ["stable", "balance"],
13976 invalid_values: ["wrap", "nowrap", "normal"],
13978 gCSSProperties["text-wrap"].subproperties.push("text-wrap-style");
13979 gCSSProperties["text-wrap"].other_values.push("stable");
13980 gCSSProperties["text-wrap"].other_values.push("balance");
13981 gCSSProperties["text-wrap"].other_values.push("wrap stable");
13982 gCSSProperties["text-wrap"].other_values.push("nowrap balance");
13985 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transforms")) {
13986 Object.assign(gCSSProperties, {
13987 "-moz-transform": {
13988 domProp: "MozTransform",
13990 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13991 alias_for: "transform",
13992 subproperties: ["transform"],
13994 "-moz-transform-origin": {
13995 domProp: "MozTransformOrigin",
13997 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13998 alias_for: "transform-origin",
13999 subproperties: ["transform-origin"],
14001 "-moz-perspective-origin": {
14002 domProp: "MozPerspectiveOrigin",
14004 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14005 alias_for: "perspective-origin",
14006 subproperties: ["perspective-origin"],
14008 "-moz-perspective": {
14009 domProp: "MozPerspective",
14011 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14012 alias_for: "perspective",
14013 subproperties: ["perspective"],
14015 "-moz-backface-visibility": {
14016 domProp: "MozBackfaceVisibility",
14018 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14019 alias_for: "backface-visibility",
14020 subproperties: ["backface-visibility"],
14022 "-moz-transform-style": {
14023 domProp: "MozTransformStyle",
14025 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14026 alias_for: "transform-style",
14027 subproperties: ["transform-style"],
14032 if (IsCSSPropertyPrefEnabled("layout.css.zoom.enabled")) {
14033 Object.assign(gCSSProperties, {
14037 type: CSS_TYPE_LONGHAND,
14038 initial_values: ["normal", "1", "100%", "0", "0%"],
14039 other_values: ["1.5", "2", "150%", "200%"],
14040 invalid_values: ["-1", "-40%"],
14045 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transitions")) {
14046 Object.assign(gCSSProperties, {
14047 "-moz-transition": {
14048 domProp: "MozTransition",
14050 type: CSS_TYPE_TRUE_SHORTHAND,
14051 applies_to_marker: true,
14052 alias_for: "transition",
14054 "transition-property",
14055 "transition-duration",
14056 "transition-timing-function",
14057 "transition-delay",
14060 "-moz-transition-delay": {
14061 domProp: "MozTransitionDelay",
14063 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14064 applies_to_marker: true,
14065 alias_for: "transition-delay",
14066 subproperties: ["transition-delay"],
14068 "-moz-transition-duration": {
14069 domProp: "MozTransitionDuration",
14071 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14072 applies_to_marker: true,
14073 alias_for: "transition-duration",
14074 subproperties: ["transition-duration"],
14076 "-moz-transition-property": {
14077 domProp: "MozTransitionProperty",
14079 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14080 applies_to_marker: true,
14081 alias_for: "transition-property",
14082 subproperties: ["transition-property"],
14084 "-moz-transition-timing-function": {
14085 domProp: "MozTransitionTimingFunction",
14087 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14088 applies_to_marker: true,
14089 alias_for: "transition-timing-function",
14090 subproperties: ["transition-timing-function"],
14095 if (IsCSSPropertyPrefEnabled("layout.css.transition-behavior.enabled")) {
14096 Object.assign(gCSSProperties, {
14097 "transition-behavior": {
14098 domProp: "transitionBehavior",
14100 type: CSS_TYPE_LONGHAND,
14101 applies_to_marker: true,
14102 initial_values: ["normal"],
14103 other_values: ["allow-discrete"],
14104 invalid_values: ["none", "auto", "discrete"],
14108 gCSSProperties["transition"].subproperties.push("transition-behavior");
14109 gCSSProperties["transition"].initial_values.push("normal");
14110 gCSSProperties["transition"].other_values.push(
14112 "width allow-discrete",
14113 "1s allow-discrete",
14114 "linear allow-discrete"
14116 gCSSProperties["-webkit-transition"].subproperties.push(
14117 "transition-behavior"
14120 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transitions")) {
14121 gCSSProperties["-moz-transition"].subproperties.push("transition-behavior");
14125 // Copy aliased properties' fields from their alias targets. Keep this logic
14126 // at the bottom of this file to ensure all the aliased properties are
14128 for (var prop in gCSSProperties) {
14129 var entry = gCSSProperties[prop];
14130 if (entry.alias_for) {
14131 var aliasTargetEntry = gCSSProperties[entry.alias_for];
14132 if (!aliasTargetEntry) {
14137 "' alias_for field, '" +
14140 "must be set to a recognized CSS property in gCSSProperties"
14143 // Copy 'values' fields & 'prerequisites' field from aliasTargetEntry:
14144 var fieldsToCopy = [
14149 "unbalanced_values",
14153 fieldsToCopy.forEach(function (fieldName) {
14154 // (Don't copy the field if the alias already has something there,
14155 // or if the aliased property doesn't have anything to copy.)
14156 if (!(fieldName in entry) && fieldName in aliasTargetEntry) {
14157 entry[fieldName] = aliasTargetEntry[fieldName];