diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index ba9ce8dd9f..9ab5471ed2 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -166,6 +166,44 @@ struct ReducePercentageCalcOps : ReduceNumberCalcOps } }; +static constexpr float kOKLabPercentScaleAB = 0.4f; +static constexpr double kRadiansPerDegree = 0.01745329251994329576923690768489; + +static inline float +LinearSRGBToEncoded(float aValue) +{ + if (aValue <= 0.0031308f) { + return 12.92f * aValue; + } + return 1.055f * std::pow(aValue, 1.0f / 2.4f) - 0.055f; +} + +static nscolor +OKLabToSRGBColor(float aL, float aA, float aB, float aAlpha) +{ + float lRoot = aL + 0.3963377774f * aA + 0.2158037573f * aB; + float mRoot = aL - 0.1055613458f * aA - 0.0638541728f * aB; + float sRoot = aL - 0.0894841775f * aA - 1.2914855480f * aB; + + float l = lRoot * lRoot * lRoot; + float m = mRoot * mRoot * mRoot; + float s = sRoot * sRoot * sRoot; + + float linearR = 4.0767416621f * l - 3.3077115913f * m + 0.2309699292f * s; + float linearG = -1.2684380046f * l + 2.6097574011f * m - 0.3413193965f * s; + float linearB = -0.0041960863f * l - 0.7034186147f * m + 1.7076147010f * s; + + float r = mozilla::clamped(LinearSRGBToEncoded(linearR), 0.0f, 1.0f); + float g = mozilla::clamped(LinearSRGBToEncoded(linearG), 0.0f, 1.0f); + float b = mozilla::clamped(LinearSRGBToEncoded(linearB), 0.0f, 1.0f); + + return NS_RGBA( + NSToIntRound(r * 255.0f), + NSToIntRound(g * 255.0f), + NSToIntRound(b * 255.0f), + nsStyleUtil::FloatToColorComponent(mozilla::clamped(aAlpha, 0.0f, 1.0f))); +} + static_assert(css::eAuthorSheetFeatures == 0 && css::eUserSheetFeatures == 1 && css::eAgentSheetFeatures == 2, @@ -1235,6 +1273,10 @@ protected: ComponentType& aA); bool ParseHSLColor(float& aHue, float& aSaturation, float& aLightness, float& aOpacity); + bool ParseOKLabColor(nscolor& aColor); + bool ParseOKLCHColor(nscolor& aColor); + bool ParseOKLabComponent(float& aComponent, float aPercentScale, + Maybe aSeparator); // The ParseColorOpacityAndCloseParen methods below attempt to parse an // optional [ separator ] expression, followed by a @@ -7609,6 +7651,22 @@ CSSParserImpl::ParseColor(nsCSSValue& aValue) SkipUntil(')'); return CSSParseResult::Error; } + else if (mToken.mIdent.LowerCaseEqualsLiteral("oklab")) { + if (ParseOKLabColor(rgba)) { + aValue.SetColorValue(rgba); + return CSSParseResult::Ok; + } + SkipUntil(')'); + return CSSParseResult::Error; + } + else if (mToken.mIdent.LowerCaseEqualsLiteral("oklch")) { + if (ParseOKLCHColor(rgba)) { + aValue.SetColorValue(rgba); + return CSSParseResult::Ok; + } + SkipUntil(')'); + return CSSParseResult::Error; + } break; } default: @@ -7809,6 +7867,84 @@ CSSParserImpl::ParseHSLColor(float& aHue, float& aSaturation, float& aLightness, return false; } +bool +CSSParserImpl::ParseOKLabComponent(float& aComponent, float aPercentScale, + Maybe aSeparator) +{ + if (!GetToken(true)) { + REPORT_UNEXPECTED_EOF(PEColorComponentEOF); + return false; + } + + float value; + if (mToken.mType == eCSSToken_Number) { + value = mToken.mNumber; + } else if (mToken.mType == eCSSToken_Percentage) { + value = mToken.mNumber * aPercentScale; + } else { + REPORT_UNEXPECTED_TOKEN(PEExpectedNumberOrPercent); + UngetToken(); + return false; + } + + if (aSeparator && !ExpectSymbol(*aSeparator, true)) { + REPORT_UNEXPECTED_TOKEN_CHAR(PEColorComponentBadTerm, *aSeparator); + return false; + } + + aComponent = value; + return true; +} + +bool +CSSParserImpl::ParseOKLabColor(nscolor& aColor) +{ + const char commaSeparator = ','; + float l, a, b, alpha; + + if (!ParseOKLabComponent(l, 1.0f, Nothing())) { + return false; + } + + bool hasComma = ExpectSymbol(commaSeparator, true); + const char separatorBeforeAlpha = hasComma ? commaSeparator : '/'; + if (!ParseOKLabComponent(a, kOKLabPercentScaleAB, + hasComma ? Some(commaSeparator) : Nothing()) || + !ParseOKLabComponent(b, kOKLabPercentScaleAB, Nothing()) || + !ParseColorOpacityAndCloseParen(alpha, separatorBeforeAlpha)) { + return false; + } + + aColor = OKLabToSRGBColor(l, a, b, alpha); + return true; +} + +bool +CSSParserImpl::ParseOKLCHColor(nscolor& aColor) +{ + const char commaSeparator = ','; + float l, chroma, hue, alpha; + + if (!ParseOKLabComponent(l, 1.0f, Nothing())) { + return false; + } + + bool hasComma = ExpectSymbol(commaSeparator, true); + const char separatorBeforeAlpha = hasComma ? commaSeparator : '/'; + if (!ParseOKLabComponent(chroma, kOKLabPercentScaleAB, + hasComma ? Some(commaSeparator) : Nothing()) || + !ParseHue(hue) || + !ParseColorOpacityAndCloseParen(alpha, separatorBeforeAlpha)) { + return false; + } + + double hueRadians = hue * kRadiansPerDegree; + float a = chroma * std::cos(hueRadians); + float b = chroma * std::sin(hueRadians); + aColor = OKLabToSRGBColor(l, a, b, alpha); + return true; +} + bool CSSParserImpl::ParseColorOpacityAndCloseParen(uint8_t& aOpacity, @@ -8757,6 +8893,8 @@ CSSParserImpl::ParseVariant(nsCSSValue& aValue, tk->mIdent.LowerCaseEqualsLiteral("hsl") || tk->mIdent.LowerCaseEqualsLiteral("rgba") || tk->mIdent.LowerCaseEqualsLiteral("hsla") || + tk->mIdent.LowerCaseEqualsLiteral("oklab") || + tk->mIdent.LowerCaseEqualsLiteral("oklch") || tk->mIdent.LowerCaseEqualsLiteral("color-mix")))) { // Put token back so that parse color can get it diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 9eb33da480..fc606abb4e 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -11,15 +11,20 @@ // ensures that we remove pref-checks from mochitests (instead of accidentally // disabling the tests that are controlled by that check) when we remove a // mature feature's pref from the rest of the codebase. -function IsCSSPropertyPrefEnabled(prefName) -{ +function IsCSSPropertyPrefEnabled(prefName) { try { if (SpecialPowers.getBoolPref(prefName)) { return true; } } catch (ex) { - ok(false, "Failed to look up property-controlling pref '" + - prefName + "' (" + ex + ")"); + ok( + false, + "Failed to look up property-controlling pref '" + + prefName + + "' (" + + ex + + ")", + ); } return false; @@ -73,8 +78,7 @@ const CSS_TYPE_SHORTHAND_AND_LONGHAND = 2; // Helper functions used to construct gCSSProperties. -function initial_font_family_is_sans_serif() -{ +function initial_font_family_is_sans_serif() { // The initial value of 'font-family' might be 'serif' or // 'sans-serif'. var div = document.createElement("div"); @@ -374,7 +378,7 @@ var validGradientAndElementValues = [ "-moz-radial-gradient(calc(100px + -25%) top, red, blue)", "-moz-radial-gradient(left calc(100px + -25%), red, blue)", "-moz-radial-gradient(calc(100px + -25px) top, red, blue)", - "-moz-radial-gradient(left calc(100px + -25px), red, blue)" + "-moz-radial-gradient(left calc(100px + -25px), red, blue)", ]; var invalidGradientAndElementValues = [ "-moz-element(#a:1)", @@ -569,7 +573,6 @@ var invalidGradientAndElementValues = [ "linear-gradient(to top, red,, blue)", "linear-gradient(to top, red, green 35%, 15%, 54%, blue)", - "radial-gradient(top left 45deg, red, blue)", "radial-gradient(20% bottom -300deg, red, blue)", "radial-gradient(center 20% 1.95929rad, red, blue)", @@ -624,11 +627,9 @@ var invalidGradientAndElementValues = [ "-moz-radial-gradient(30% 40% at top left, red, blue)", "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)", - "-moz-radial-gradient(7em 8em at 45px, red, blue)" -]; -var unbalancedGradientAndElementValues = [ - "-moz-element(#a()", + "-moz-radial-gradient(7em 8em at 45px, red, blue)", ]; +var unbalancedGradientAndElementValues = ["-moz-element(#a()"]; if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { // Extend gradient lists with valid/invalid webkit-prefixed expressions: @@ -753,7 +754,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { "-webkit-repeating-linear-gradient(left, red 10%, blue 30%)", "-webkit-repeating-radial-gradient(circle, red, blue 10%, red 20%)", "-webkit-repeating-radial-gradient(circle farthest-corner, gray 10px, yellow 20px)", - "-webkit-repeating-radial-gradient(top left, circle, red, blue 4%, red 8%)" + "-webkit-repeating-radial-gradient(top left, circle, red, blue 4%, red 8%)", ); invalidGradientAndElementValues.push( @@ -896,118 +897,314 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { // * initial angle/position combo "-webkit-radial-gradient(top 30deg, red, blue)", "-webkit-radial-gradient(left top 30deg, red, blue)", - "-webkit-radial-gradient(10px 20px 30deg, red, blue)" + "-webkit-radial-gradient(10px 20px 30deg, red, blue)", ); } var gCSSProperties = { - "animation": { + animation: { domProp: "animation", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count", "animation-play-state" ], - initial_values: [ "none none 0s 0s ease normal running 1.0", "none", "0s", "ease", "normal", "running", "1.0" ], - other_values: [ "none none 0s 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) normal running 1.0", "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ], - invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial", "2s all,, 1s bounce", "2s all, , 1s bounce", "bounce 1s cubic-bezier(0, rubbish) 2s", "bounce 1s steps(rubbish) 2s" ] + subproperties: [ + "animation-name", + "animation-duration", + "animation-timing-function", + "animation-delay", + "animation-direction", + "animation-fill-mode", + "animation-iteration-count", + "animation-play-state", + ], + initial_values: [ + "none none 0s 0s ease normal running 1.0", + "none", + "0s", + "ease", + "normal", + "running", + "1.0", + ], + other_values: [ + "none none 0s 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) normal running 1.0", + "bounce 1s linear 2s", + "bounce 1s 2s linear", + "bounce linear 1s 2s", + "linear bounce 1s 2s", + "linear 1s bounce 2s", + "linear 1s 2s bounce", + "1s bounce linear 2s", + "1s bounce 2s linear", + "1s 2s bounce linear", + "1s linear bounce 2s", + "1s linear 2s bounce", + "1s 2s linear bounce", + "bounce linear 1s", + "bounce 1s linear", + "linear bounce 1s", + "linear 1s bounce", + "1s bounce linear", + "1s linear bounce", + "1s 2s bounce", + "1s bounce 2s", + "bounce 1s 2s", + "1s 2s linear", + "1s linear 2s", + "linear 1s 2s", + "bounce 1s", + "1s bounce", + "linear 1s", + "1s linear", + "1s 2s", + "2s 1s", + "bounce", + "linear", + "1s", + "height", + "2s", + "ease-in-out", + "2s ease-in", + "opacity linear", + "ease-out 2s", + "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", + "1s \\32bounce linear 2s", + "1s -bounce linear 2s", + "1s -\\32bounce linear 2s", + "1s \\32 0bounce linear 2s", + "1s -\\32 0bounce linear 2s", + "1s \\2bounce linear 2s", + "1s -\\2bounce linear 2s", + "2s, 1s bounce", + "1s bounce, 2s", + "2s all, 1s bounce", + "1s bounce, 2s all", + "1s bounce, 2s none", + "2s none, 1s bounce", + "2s bounce, 1s all", + "2s all, 1s bounce", + ], + invalid_values: [ + "2s inherit", + "inherit 2s", + "2s bounce, 1s inherit", + "2s inherit, 1s bounce", + "2s initial", + "2s all,, 1s bounce", + "2s all, , 1s bounce", + "bounce 1s cubic-bezier(0, rubbish) 2s", + "bounce 1s steps(rubbish) 2s", + ], }, "animation-delay": { domProp: "animationDelay", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] + initial_values: ["0s", "0ms"], + other_values: ["1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: ["0", "0px"], }, "animation-direction": { domProp: "animationDirection", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ], - invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ] + initial_values: ["normal"], + other_values: [ + "alternate", + "normal, alternate", + "alternate, normal", + "normal, normal", + "normal, normal, normal", + "reverse", + "alternate-reverse", + "normal, reverse, alternate-reverse, alternate", + ], + invalid_values: ["normal normal", "inherit, normal", "reverse-alternate"], }, "animation-duration": { domProp: "animationDuration", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] + initial_values: ["0s", "0ms"], + other_values: ["1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: ["0", "0px", "-1ms", "-2s"], }, "animation-fill-mode": { domProp: "animationFillMode", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ], - invalid_values: [ "all"] + initial_values: ["none"], + other_values: [ + "forwards", + "backwards", + "both", + "none, none", + "forwards, backwards", + "forwards, none", + "none, both", + ], + invalid_values: ["all"], }, "animation-iteration-count": { domProp: "animationIterationCount", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ], + initial_values: ["1"], + other_values: [ + "infinite", + "0", + "0.5", + "7.75", + "-0.0", + "1, 2, 3", + "infinite, 2", + "1, infinite", + ], // negatives forbidden per // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html - invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ] + invalid_values: ["none", "-1", "-0.5", "-1, infinite", "infinite, -3"], }, "animation-name": { domProp: "animationName", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ], - invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ] + initial_values: ["none"], + other_values: [ + "all", + "ball", + "mall", + "color", + "bounce, bubble, opacity", + "foobar", + "auto", + "\\32bounce", + "-bounce", + "-\\32bounce", + "\\32 0bounce", + "-\\32 0bounce", + "\\2bounce", + "-\\2bounce", + ], + invalid_values: [ + "bounce, initial", + "initial, bounce", + "bounce, inherit", + "inherit, bounce", + ], }, "animation-play-state": { domProp: "animationPlayState", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "running" ], - other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ], - invalid_values: [ "0" ] + initial_values: ["running"], + other_values: [ + "paused", + "running, running", + "paused, running", + "paused, paused", + "running, paused", + "paused, running, running, running, paused, running", + ], + invalid_values: ["0"], }, "animation-timing-function": { domProp: "animationTimingFunction", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "ease" ], - other_values: [ "cubic-bezier(0.25, 0.1, 0.25, 1.0)", "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + initial_values: ["ease"], + other_values: [ + "cubic-bezier(0.25, 0.1, 0.25, 1.0)", + "linear", + "ease-in", + "ease-out", + "ease-in-out", + "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", + "cubic-bezier(0.5, 0.5, 0.5, 0.5)", + "cubic-bezier(0.25, 1.5, 0.75, -0.5)", + "step-start", + "step-end", + "steps(1)", + "steps(2, start)", + "steps(386)", + "steps(3, end)", + ], + invalid_values: [ + "none", + "auto", + "cubic-bezier(0.25, 0.1, 0.25)", + "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", + "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", + "cubic-bezier(1.5, 0.5, 0.5, 0.5)", + "cubic-bezier(0.5, 0.5, -0.5, 0.5)", + "cubic-bezier(0.5, 0.5, 1.5, 0.5)", + "steps(2, step-end)", + "steps(0)", + "steps(-2)", + "steps(0, step-end, 1)", + ], }, "-moz-appearance": { domProp: "MozAppearance", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "radio", "menulist" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["radio", "menulist"], + invalid_values: [], }, "-moz-binding": { domProp: "MozBinding", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(foo.xml)" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["url(foo.xml)"], + invalid_values: [], }, "-moz-border-bottom-colors": { domProp: "MozBorderBottomColors", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + initial_values: ["none"], + other_values: [ + "red green", + "red #fc3", + "#ff00cc", + "currentColor", + "blue currentColor orange currentColor", + ], + invalid_values: [ + "red none", + "red inherit", + "red, green", + "none red", + "inherit red", + "ff00cc", + ], }, "border-inline-end": { domProp: "borderInlineEnd", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-inline-end-color", "border-inline-end-style", "border-inline-end-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 green none" ] + subproperties: [ + "border-inline-end-color", + "border-inline-end-style", + "border-inline-end-width", + ], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + ], + other_values: [ + "solid", + "green", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "5px green none", + ], + invalid_values: ["5%", "5", "5 green none"], }, "border-inline-end-color": { domProp: "borderInlineEndColor", @@ -1015,9 +1212,9 @@ var gCSSProperties = { type: CSS_TYPE_LONGHAND, logical: true, get_computed: logical_box_prop_get_computed, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000" ] + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"], }, "border-inline-end-style": { domProp: "borderInlineEndStyle", @@ -1026,9 +1223,18 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + ], + invalid_values: [], }, "border-inline-end-width": { domProp: "borderInlineEndWidth", @@ -1037,8 +1243,12 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, prerequisites: { "border-inline-end-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0em)", @@ -1048,111 +1258,220 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%", "5" ] + invalid_values: ["5%", "5"], }, "border-image": { domProp: "borderImage", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], - initial_values: [ "none" ], - other_values: [ "url('border.png') 27 27 27 27", - "url('border.png') 27", - "stretch url('border.png')", - "url('border.png') 27 fill", - "url('border.png') 27 27 27 27 repeat", - "repeat url('border.png') 27 27 27 27", - "url('border.png') repeat 27 27 27 27", - "url('border.png') fill 27 27 27 27 repeat", - "url('border.png') fill 27 27 27 27 repeat space", - "url('border.png') 27 27 27 27 / 1em", - "27 27 27 27 / 1em url('border.png') ", - "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", - "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", - "url('border.png') 27 27 27 27 / / 10 10 1em", - "fill 27 27 27 27 / / 10 10 1em url('border.png')", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ], - invalid_values: [ "url('border.png') 27 27 27 27 27", - "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", - "url('border.png') 27 27 27 27 /", - "url('border.png') fill", - "url('border.png') fill repeat", - "fill repeat", - "url('border.png') fill / 1em", - "url('border.png') / repeat", - "url('border.png') 1 /", - "url('border.png') 1 / /", - "1 / url('border.png')", - "url('border.png') / 1", - "url('border.png') / / 1"] + subproperties: [ + "border-image-source", + "border-image-slice", + "border-image-width", + "border-image-outset", + "border-image-repeat", + ], + initial_values: ["none"], + other_values: [ + "url('border.png') 27 27 27 27", + "url('border.png') 27", + "stretch url('border.png')", + "url('border.png') 27 fill", + "url('border.png') 27 27 27 27 repeat", + "repeat url('border.png') 27 27 27 27", + "url('border.png') repeat 27 27 27 27", + "url('border.png') fill 27 27 27 27 repeat", + "url('border.png') fill 27 27 27 27 repeat space", + "url('border.png') 27 27 27 27 / 1em", + "27 27 27 27 / 1em url('border.png') ", + "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat", + "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')", + "url('border.png') 27 27 27 27 / / 10 10 1em", + "fill 27 27 27 27 / / 10 10 1em url('border.png')", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round", + ], + invalid_values: [ + "url('border.png') 27 27 27 27 27", + "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em", + "url('border.png') 27 27 27 27 /", + "url('border.png') fill", + "url('border.png') fill repeat", + "fill repeat", + "url('border.png') fill / 1em", + "url('border.png') / repeat", + "url('border.png') 1 /", + "url('border.png') 1 / /", + "1 / url('border.png')", + "url('border.png') / 1", + "url('border.png') / / 1", + ], }, "border-image-source": { domProp: "borderImageSource", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "url('border.png')" - ].concat(validGradientAndElementValues), - invalid_values: [ - "url('border.png') url('border.png')", - ].concat(invalidGradientAndElementValues), - unbalanced_values: [ - ].concat(unbalancedGradientAndElementValues) + initial_values: ["none"], + other_values: ["url('border.png')"].concat(validGradientAndElementValues), + invalid_values: ["url('border.png') url('border.png')"].concat( + invalidGradientAndElementValues, + ), + unbalanced_values: [].concat(unbalancedGradientAndElementValues), }, "border-image-slice": { domProp: "borderImageSlice", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "100%", "100% 100% 100% 100%" ], - other_values: [ "0%", "10", "10 100% 0 2", "0 0 0 0", "fill 10 10", "10 10 fill" ], - invalid_values: [ "-10%", "-10", "10 10 10 10 10", "10 10 10 10 -10", "10px", "-10px", "fill", "fill fill 10px", "10px fill fill" ] + initial_values: ["100%", "100% 100% 100% 100%"], + other_values: [ + "0%", + "10", + "10 100% 0 2", + "0 0 0 0", + "fill 10 10", + "10 10 fill", + ], + invalid_values: [ + "-10%", + "-10", + "10 10 10 10 10", + "10 10 10 10 -10", + "10px", + "-10px", + "fill", + "fill fill 10px", + "10px fill fill", + ], }, "border-image-width": { domProp: "borderImageWidth", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "1 1 1 1" ], - other_values: [ "0", "0%", "0px", "auto auto auto auto", "10 10% auto 15px", "10px 10px 10px 10px", "10", "10 10", "10 10 10" ], - invalid_values: [ "-10", "-10px", "-10%", "10 10 10 10 10", "10 10 10 10 auto", "auto auto auto auto auto", "10px calc(nonsense)", "1px red" ], - unbalanced_values: [ "10px calc(" ] + initial_values: ["1", "1 1 1 1"], + other_values: [ + "0", + "0%", + "0px", + "auto auto auto auto", + "10 10% auto 15px", + "10px 10px 10px 10px", + "10", + "10 10", + "10 10 10", + ], + invalid_values: [ + "-10", + "-10px", + "-10%", + "10 10 10 10 10", + "10 10 10 10 auto", + "auto auto auto auto auto", + "10px calc(nonsense)", + "1px red", + ], + unbalanced_values: ["10px calc("], }, "border-image-outset": { domProp: "borderImageOutset", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0 0 0 0" ], - other_values: [ "10px", "10", "10 10", "10 10 10", "10 10 10 10", "10px 10 10 10px" ], - invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10", "10px calc(nonsense)", "1px red" ], - unbalanced_values: [ "10px calc(" ] + initial_values: ["0", "0 0 0 0"], + other_values: [ + "10px", + "10", + "10 10", + "10 10 10", + "10 10 10 10", + "10px 10 10 10px", + ], + invalid_values: [ + "-10", + "-10px", + "-10%", + "10%", + "10 10 10 10 10", + "10px calc(nonsense)", + "1px red", + ], + unbalanced_values: ["10px calc("], }, "border-image-repeat": { domProp: "borderImageRepeat", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch", "stretch stretch" ], - other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat", - "space", "stretch space", "repeat space", "round space", "space space" ], - invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ] + initial_values: ["stretch", "stretch stretch"], + other_values: [ + "round", + "repeat", + "stretch round", + "repeat round", + "stretch repeat", + "round round", + "repeat repeat", + "space", + "stretch space", + "repeat space", + "round space", + "space space", + ], + invalid_values: ["none", "stretch stretch stretch", "0", "10", "0%", "0px"], }, "-moz-border-left-colors": { domProp: "MozBorderLeftColors", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + initial_values: ["none"], + other_values: [ + "red green", + "red #fc3", + "#ff00cc", + "currentColor", + "blue currentColor orange currentColor", + ], + invalid_values: [ + "red none", + "red inherit", + "red, green", + "none red", + "inherit red", + "ff00cc", + ], }, "border-radius": { domProp: "borderRadius", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ], - initial_values: [ "0", "0px", "0px 0 0 0px", "calc(-2px)", "calc(0px) calc(0pt)", "calc(0px) calc(0pt) calc(0px) calc(0em)" ], - other_values: [ "0%", "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular - "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + subproperties: [ + "border-bottom-left-radius", + "border-bottom-right-radius", + "border-top-left-radius", + "border-top-right-radius", + ], + initial_values: [ + "0", + "0px", + "0px 0 0 0px", + "calc(-2px)", + "calc(0px) calc(0pt)", + "calc(0px) calc(0pt) calc(0px) calc(0em)", + ], + other_values: [ + "0%", + "3%", + "1px", + "2em", + "3em 2px", + "2pt 3% 4em", + "2px 2px 2px 2px", // circular + "3% / 2%", + "1px / 4px", + "2em / 1em", + "3em 2px / 2px 3em", + "2pt 3% 4em / 4pt 1% 5em", + "2px 2px 2px 2px / 4px 4px 4px 4px", + "1pt / 2pt 3pt", + "4pt 5pt / 3pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1164,17 +1483,35 @@ var gCSSProperties = { "calc(3*25px + 50%)", "2px 2px calc(2px + 1%) 2px", "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", - ], - invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px", "2px calc(0px + rubbish)" ] + ], + invalid_values: [ + "2px -2px", + "inherit 2px", + "inherit / 2px", + "2px inherit", + "2px / inherit", + "2px 2px 2px 2px 2px", + "1px / 2px 2px 2px 2px 2px", + "2", + "2 2", + "2px 2px 2px 2px / 2px 2px 2 2px", + "2px calc(0px + rubbish)", + ], }, "border-bottom-left-radius": { domProp: "borderBottomLeftRadius", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "calc(-2px)" ], - other_values: [ "0%", "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + initial_values: ["0", "0px", "calc(-2px)"], + other_values: [ + "0%", + "3%", + "1px", + "2em", // circular + "3% 2%", + "1px 4px", + "2em 2pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1184,17 +1521,32 @@ var gCSSProperties = { "calc(20%) calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px", "2px calc(0px + rubbish)" ] + ], + invalid_values: [ + "-1px", + "4px -2px", + "inherit 2px", + "2px inherit", + "2", + "2px 2", + "2 2px", + "2px calc(0px + rubbish)", + ], }, "border-bottom-right-radius": { domProp: "borderBottomRightRadius", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "calc(-2px)" ], - other_values: [ "0%", "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + initial_values: ["0", "0px", "calc(-2px)"], + other_values: [ + "0%", + "3%", + "1px", + "2em", // circular + "3% 2%", + "1px 4px", + "2em 2pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1204,17 +1556,32 @@ var gCSSProperties = { "calc(20%) calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px", "2px calc(0px + rubbish)" ] + ], + invalid_values: [ + "-1px", + "4px -2px", + "inherit 2px", + "2px inherit", + "2", + "2px 2", + "2 2px", + "2px calc(0px + rubbish)", + ], }, "border-top-left-radius": { domProp: "borderTopLeftRadius", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "calc(-2px)" ], - other_values: [ "0%", "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + initial_values: ["0", "0px", "calc(-2px)"], + other_values: [ + "0%", + "3%", + "1px", + "2em", // circular + "3% 2%", + "1px 4px", + "2em 2pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1224,17 +1591,32 @@ var gCSSProperties = { "calc(20%) calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px", "2px calc(0px + rubbish)" ] + ], + invalid_values: [ + "-1px", + "4px -2px", + "inherit 2px", + "2px inherit", + "2", + "2px 2", + "2 2px", + "2px calc(0px + rubbish)", + ], }, "border-top-right-radius": { domProp: "borderTopRightRadius", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "calc(-2px)" ], - other_values: [ "0%", "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + initial_values: ["0", "0px", "calc(-2px)"], + other_values: [ + "0%", + "3%", + "1px", + "2em", // circular + "3% 2%", + "1px 4px", + "2em 2pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1244,25 +1626,65 @@ var gCSSProperties = { "calc(20%) calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px", "2px calc(0px + rubbish)" ] + ], + invalid_values: [ + "-1px", + "4px -2px", + "inherit 2px", + "2px inherit", + "2", + "2px 2", + "2 2px", + "2px calc(0px + rubbish)", + ], }, "-moz-border-right-colors": { domProp: "MozBorderRightColors", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + initial_values: ["none"], + other_values: [ + "red green", + "red #fc3", + "#ff00cc", + "currentColor", + "blue currentColor orange currentColor", + ], + invalid_values: [ + "red none", + "red inherit", + "red, green", + "none red", + "inherit red", + "ff00cc", + ], }, "border-inline-start": { domProp: "borderInlineStart", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-inline-start-color", "border-inline-start-style", "border-inline-start-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 green solid" ] + subproperties: [ + "border-inline-start-color", + "border-inline-start-style", + "border-inline-start-width", + ], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + ], + other_values: [ + "solid", + "green", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "5px green none", + ], + invalid_values: ["5%", "5", "5 green solid"], }, "border-inline-start-color": { domProp: "borderInlineStartColor", @@ -1270,9 +1692,9 @@ var gCSSProperties = { type: CSS_TYPE_LONGHAND, logical: true, get_computed: logical_box_prop_get_computed, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000" ] + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"], }, "border-inline-start-style": { domProp: "borderInlineStartStyle", @@ -1281,9 +1703,18 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + ], + invalid_values: [], }, "border-inline-start-width": { domProp: "borderInlineStartWidth", @@ -1292,8 +1723,12 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, prerequisites: { "border-inline-start-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0em)", @@ -1303,158 +1738,222 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%", "5" ] + invalid_values: ["5%", "5"], }, "-moz-border-top-colors": { domProp: "MozBorderTopColors", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ], - invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ] + initial_values: ["none"], + other_values: [ + "red green", + "red #fc3", + "#ff00cc", + "currentColor", + "blue currentColor orange currentColor", + ], + invalid_values: [ + "red none", + "red inherit", + "red, green", + "none red", + "inherit red", + "ff00cc", + ], }, "-moz-box-align": { domProp: "MozBoxAlign", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch" ], - other_values: [ "start", "center", "baseline", "end" ], - invalid_values: [] + initial_values: ["stretch"], + other_values: ["start", "center", "baseline", "end"], + invalid_values: [], }, "-moz-box-direction": { domProp: "MozBoxDirection", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "reverse" ], - invalid_values: [] + initial_values: ["normal"], + other_values: ["reverse"], + invalid_values: [], }, "-moz-box-flex": { domProp: "MozBoxFlex", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0.0", "-0.0" ], - other_values: [ "1", "100", "0.1" ], - invalid_values: [ "10px", "-1" ] + initial_values: ["0", "0.0", "-0.0"], + other_values: ["1", "100", "0.1"], + invalid_values: ["10px", "-1"], }, "-moz-box-ordinal-group": { domProp: "MozBoxOrdinalGroup", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "2", "100", "0" ], - invalid_values: [ "1.0", "-1", "-1000" ] + initial_values: ["1"], + other_values: ["2", "100", "0"], + invalid_values: ["1.0", "-1", "-1000"], }, "-moz-box-orient": { domProp: "MozBoxOrient", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "horizontal", "inline-axis" ], - other_values: [ "vertical", "block-axis" ], - invalid_values: [] + initial_values: ["horizontal", "inline-axis"], + other_values: ["vertical", "block-axis"], + invalid_values: [], }, "-moz-box-pack": { domProp: "MozBoxPack", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "start" ], - other_values: [ "center", "end", "justify" ], - invalid_values: [] + initial_values: ["start"], + other_values: ["center", "end", "justify"], + invalid_values: [], }, "box-sizing": { domProp: "boxSizing", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "content-box" ], - other_values: [ "border-box" ], - invalid_values: [ "padding-box", "margin-box", "content", "padding", "border", "margin" ] + initial_values: ["content-box"], + other_values: ["border-box"], + invalid_values: [ + "padding-box", + "margin-box", + "content", + "padding", + "border", + "margin", + ], }, "-moz-box-sizing": { domProp: "MozBoxSizing", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "box-sizing", - subproperties: [ "box-sizing" ], + subproperties: ["box-sizing"], }, "color-adjust": { domProp: "colorAdjust", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "economy" ], - other_values: [ "exact" ], - invalid_values: [] + initial_values: ["economy"], + other_values: ["exact"], + invalid_values: [], }, - "columns": { + columns: { domProp: "columns", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "column-count", "column-width" ], - initial_values: [ "auto", "auto auto" ], - other_values: [ "3", "20px", "2 10px", "10px 2", "2 auto", "auto 2", "auto 50px", "50px auto" ], - invalid_values: [ "5%", "-1px", "-1", "3 5", "10px 4px", "10 2px 5in", "30px -1", - "auto 3 5px", "5 auto 20px", "auto auto auto", "calc(50px + rubbish) 2" ] + subproperties: ["column-count", "column-width"], + initial_values: ["auto", "auto auto"], + other_values: [ + "3", + "20px", + "2 10px", + "10px 2", + "2 auto", + "auto 2", + "auto 50px", + "50px auto", + ], + invalid_values: [ + "5%", + "-1px", + "-1", + "3 5", + "10px 4px", + "10 2px 5in", + "30px -1", + "auto 3 5px", + "5 auto 20px", + "auto auto auto", + "calc(50px + rubbish) 2", + ], }, "-moz-columns": { domProp: "MozColumns", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "columns", - subproperties: [ "column-count", "column-width" ] + subproperties: ["column-count", "column-width"], }, "column-count": { domProp: "columnCount", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "1", "17" ], + initial_values: ["auto"], + other_values: ["1", "17"], // negative and zero invalid per editor's draft - invalid_values: [ "-1", "0", "3px" ] + invalid_values: ["-1", "0", "3px"], }, "-moz-column-count": { domProp: "MozColumnCount", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "column-count", - subproperties: [ "column-count" ] + subproperties: ["column-count"], }, "column-fill": { domProp: "columnFill", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "balance" ], - other_values: [ "auto" ], - invalid_values: [ "2px", "dotted", "5em" ] + initial_values: ["balance"], + other_values: ["auto"], + invalid_values: ["2px", "dotted", "5em"], }, "-moz-column-fill": { domProp: "MozColumnFill", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "column-fill", - subproperties: [ "column-fill" ] + subproperties: ["column-fill"], }, "-moz-column-gap": { domProp: "MozColumnGap", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "column-gap", - subproperties: [ "column-gap" ] + subproperties: ["column-gap"], }, "column-rule": { domProp: "columnRule", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "color": "green" }, - subproperties: [ "column-rule-width", "column-rule-style", "column-rule-color" ], - initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ], - other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ], - invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ] + prerequisites: { color: "green" }, + subproperties: [ + "column-rule-width", + "column-rule-style", + "column-rule-color", + ], + initial_values: [ + "medium none currentColor", + "none", + "medium", + "currentColor", + ], + other_values: [ + "2px blue solid", + "red dotted 1px", + "ridge 4px orange", + "5px solid", + ], + invalid_values: [ + "2px 3px 4px red", + "dotted dashed", + "5px dashed green 3px", + "5 solid", + "5 green solid", + ], }, "-moz-column-rule": { domProp: "MozColumnRule", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "column-rule", - subproperties: [ "column-rule-width", "column-rule-style", "column-rule-color" ] + subproperties: [ + "column-rule-width", + "column-rule-style", + "column-rule-color", + ], }, "column-rule-width": { domProp: "columnRuleWidth", @@ -1469,7 +1968,9 @@ var gCSSProperties = { "calc(3px)", "calc(5em + 3px - 5em)", ], - other_values: [ "thin", "15px", + other_values: [ + "thin", + "15px", /* valid -moz-calc() values */ "-moz-calc(-2px)", "-moz-calc(2px)", @@ -1671,9 +2172,12 @@ var gCSSProperties = { "calc(0 * 0em)", "calc(0px * 0)", "calc(0px * 2)", - ], - invalid_values: [ "20", "-1px", "red", "50%", + invalid_values: [ + "20", + "-1px", + "red", + "50%", /* invalid -moz-calc() values */ "-moz-calc(2em+ 2px)", "-moz-calc(2em +2px)", @@ -1724,99 +2228,112 @@ var gCSSProperties = { "calc(1 * (0 + 2em))", "calc((0 + 2em))", "calc((0 + 2em) * 1)", - ] + ], }, "-moz-column-rule-width": { domProp: "MozColumnRuleWidth", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "column-rule-width", - subproperties: [ "column-rule-width" ] + subproperties: ["column-rule-width"], }, "column-rule-style": { domProp: "columnRuleStyle", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "solid", "hidden", "ridge", "groove", "inset", "outset", "double", "dotted", "dashed" ], - invalid_values: [ "20", "foo" ] + initial_values: ["none"], + other_values: [ + "solid", + "hidden", + "ridge", + "groove", + "inset", + "outset", + "double", + "dotted", + "dashed", + ], + invalid_values: ["20", "foo"], }, "-moz-column-rule-style": { domProp: "MozColumnRuleStyle", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "column-rule-style", - subproperties: [ "column-rule-style" ] + subproperties: ["column-rule-style"], }, "column-rule-color": { domProp: "columnRuleColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "green" }, - initial_values: [ "currentColor" ], - other_values: [ "red", "blue", "#ffff00" ], - invalid_values: [ "ffff00" ] + prerequisites: { color: "green" }, + initial_values: ["currentColor"], + other_values: ["red", "blue", "#ffff00"], + invalid_values: ["ffff00"], }, "-moz-column-rule-color": { domProp: "MozColumnRuleColor", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "column-rule-color", - subproperties: [ "column-rule-color" ] + subproperties: ["column-rule-color"], }, "column-width": { domProp: "columnWidth", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], + initial_values: ["auto"], other_values: [ "15px", "calc(15px)", "calc(30px - 3em)", "calc(-15px)", "0px", - "calc(0px)" + "calc(0px)", ], - invalid_values: [ "20", "-1px", "50%" ] + invalid_values: ["20", "-1px", "50%"], }, "-moz-column-width": { domProp: "MozColumnWidth", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "column-width", - subproperties: [ "column-width" ] + subproperties: ["column-width"], }, "-moz-float-edge": { domProp: "MozFloatEdge", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "content-box" ], - other_values: [ "margin-box" ], - invalid_values: [ "content", "padding", "border", "margin" ] + initial_values: ["content-box"], + other_values: ["margin-box"], + invalid_values: ["content", "padding", "border", "margin"], }, "-moz-force-broken-image-icon": { domProp: "MozForceBrokenImageIcon", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "1" ], - invalid_values: [] + initial_values: ["0"], + other_values: ["1"], + invalid_values: [], }, "-moz-image-region": { domProp: "MozImageRegion", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ], - invalid_values: [ "rect(17px, 21px, 33, 2px)" ] + initial_values: ["auto"], + other_values: ["rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)"], + invalid_values: ["rect(17px, 21px, 33, 2px)"], }, "margin-inline": { domProp: "marginInline", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "margin-inline-start", "margin-inline-end" ], - initial_values: [ "0", "0px 0em" ], - other_values: [ "1px", "3em 1%", "5%", + subproperties: ["margin-inline-start", "margin-inline-end"], + initial_values: ["0", "0px 0em"], + other_values: [ + "1px", + "3em 1%", + "5%", "calc(2px) 1%", "calc(-2px) 1%", "calc(50%) 1%", @@ -1824,7 +2341,21 @@ var gCSSProperties = { "calc(25px*3) 1em", "calc(3*25px + 50%) calc(3*25px - 50%)", ], - invalid_values: [ "5", "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + invalid_values: [ + "5", + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], }, "margin-inline-end": { domProp: "marginInlineEnd", @@ -1834,8 +2365,19 @@ var gCSSProperties = { get_computed: logical_box_prop_get_computed, /* no subproperties */ /* auto may or may not be initial */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "3em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "0em", + "0ex", + "calc(0pt)", + "calc(0% + 0px)", + ], + other_values: [ + "1px", + "3em", + "5%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -1843,7 +2385,21 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "5", "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + invalid_values: [ + "5", + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], }, "margin-inline-start": { domProp: "marginInlineStart", @@ -1853,8 +2409,19 @@ var gCSSProperties = { get_computed: logical_box_prop_get_computed, /* no subproperties */ /* auto may or may not be initial */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "3em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "0em", + "0ex", + "calc(0pt)", + "calc(0% + 0px)", + ], + other_values: [ + "1px", + "3em", + "5%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -1862,25 +2429,64 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "5", "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + invalid_values: [ + "5", + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], }, "mask-type": { domProp: "maskType", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "luminance" ], - other_values: [ "alpha" ], + initial_values: ["luminance"], + other_values: ["alpha"], invalid_values: [], }, "-moz-outline-radius": { domProp: "MozOutlineRadius", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - subproperties: [ "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright" ], - initial_values: [ "0", "0px", "calc(-2px)", "calc(0px) calc(0pt)", "calc(0px) calc(0em)" ], - other_values: [ "0%", "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular - "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + subproperties: [ + "-moz-outline-radius-bottomleft", + "-moz-outline-radius-bottomright", + "-moz-outline-radius-topleft", + "-moz-outline-radius-topright", + ], + initial_values: [ + "0", + "0px", + "calc(-2px)", + "calc(0px) calc(0pt)", + "calc(0px) calc(0em)", + ], + other_values: [ + "0%", + "3%", + "1px", + "2em", + "3em 2px", + "2pt 3% 4em", + "2px 2px 2px 2px", // circular + "3% / 2%", + "1px / 4px", + "2em / 1em", + "3em 2px / 2px 3em", + "2pt 3% 4em / 4pt 1% 5em", + "2px 2px 2px 2px / 4px 4px 4px 4px", + "1pt / 2pt 3pt", + "4pt 5pt / 3pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1892,17 +2498,34 @@ var gCSSProperties = { "calc(3*25px + 50%)", "2px 2px calc(2px + 1%) 2px", "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px", - ], - invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ] + ], + invalid_values: [ + "2px -2px", + "inherit 2px", + "inherit / 2px", + "2px inherit", + "2px / inherit", + "2px 2px 2px 2px 2px", + "1px / 2px 2px 2px 2px 2px", + "2", + "2 2", + "2px 2px 2px 2px / 2px 2px 2 2px", + ], }, "-moz-outline-radius-bottomleft": { domProp: "MozOutlineRadiusBottomleft", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "calc(-2px)", "calc(0px)" ], - other_values: [ "0%", "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + initial_values: ["0", "0px", "calc(-2px)", "calc(0px)"], + other_values: [ + "0%", + "3%", + "1px", + "2em", // circular + "3% 2%", + "1px 4px", + "2em 2pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1912,17 +2535,31 @@ var gCSSProperties = { "calc(20%) calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + ], + invalid_values: [ + "-1px", + "4px -2px", + "inherit 2px", + "2px inherit", + "2", + "2px 2", + "2 2px", + ], }, "-moz-outline-radius-bottomright": { domProp: "MozOutlineRadiusBottomright", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "calc(-2px)", "calc(0px)" ], - other_values: [ "0%", "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + initial_values: ["0", "0px", "calc(-2px)", "calc(0px)"], + other_values: [ + "0%", + "3%", + "1px", + "2em", // circular + "3% 2%", + "1px 4px", + "2em 2pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1932,17 +2569,31 @@ var gCSSProperties = { "calc(20%) calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + ], + invalid_values: [ + "-1px", + "4px -2px", + "inherit 2px", + "2px inherit", + "2", + "2px 2", + "2 2px", + ], }, "-moz-outline-radius-topleft": { domProp: "MozOutlineRadiusTopleft", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "calc(-2px)", "calc(0px)" ], - other_values: [ "0%", "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + initial_values: ["0", "0px", "calc(-2px)", "calc(0px)"], + other_values: [ + "0%", + "3%", + "1px", + "2em", // circular + "3% 2%", + "1px 4px", + "2em 2pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1952,17 +2603,31 @@ var gCSSProperties = { "calc(20%) calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + ], + invalid_values: [ + "-1px", + "4px -2px", + "inherit 2px", + "2px inherit", + "2", + "2px 2", + "2 2px", + ], }, "-moz-outline-radius-topright": { domProp: "MozOutlineRadiusTopright", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"}, - initial_values: [ "0", "0px", "calc(-2px)", "calc(0px)" ], - other_values: [ "0%", "3%", "1px", "2em", // circular - "3% 2%", "1px 4px", "2em 2pt", // elliptical + prerequisites: { width: "200px", height: "100px", display: "inline-block" }, + initial_values: ["0", "0px", "calc(-2px)", "calc(0px)"], + other_values: [ + "0%", + "3%", + "1px", + "2em", // circular + "3% 2%", + "1px 4px", + "2em 2pt", // elliptical "calc(-1%)", "calc(2px)", "calc(50%)", @@ -1972,16 +2637,27 @@ var gCSSProperties = { "calc(20%) calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", - ], - invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ] + ], + invalid_values: [ + "-1px", + "4px -2px", + "inherit 2px", + "2px inherit", + "2", + "2px 2", + "2 2px", + ], }, "padding-inline": { domProp: "paddingInline", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "padding-inline-start", "padding-inline-end" ], - initial_values: [ "0", "0px 0em" ], - other_values: [ "1px", "3em 1%", "5%", + subproperties: ["padding-inline-start", "padding-inline-end"], + initial_values: ["0", "0px 0em"], + other_values: [ + "1px", + "3em 1%", + "5%", "calc(2px) 1%", "calc(-2px) 1%", "calc(50%) 1%", @@ -1989,7 +2665,21 @@ var gCSSProperties = { "calc(25px*3) 1em", "calc(3*25px + 50%) calc(3*25px - 50%)", ], - invalid_values: [ "5", "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + invalid_values: [ + "5", + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], }, "padding-inline-end": { domProp: "paddingInlineEnd", @@ -1998,15 +2688,28 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* no subproperties */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "3em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "0em", + "0ex", + "calc(0pt)", + "calc(0% + 0px)", + "calc(-3px)", + "calc(-1%)", + ], + other_values: [ + "1px", + "3em", + "5%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "5" ] + invalid_values: ["5"], }, "padding-inline-start": { domProp: "paddingInlineStart", @@ -2015,77 +2718,130 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* no subproperties */ - initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "3em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "0em", + "0ex", + "calc(0pt)", + "calc(0% + 0px)", + "calc(-3px)", + "calc(-1%)", + ], + other_values: [ + "1px", + "3em", + "5%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "5" ] + invalid_values: ["5"], }, - "resize": { + resize: { domProp: "resize", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow": "auto" }, - initial_values: [ "none" ], - other_values: [ "both", "horizontal", "vertical" ], - invalid_values: [] + prerequisites: { display: "block", overflow: "auto" }, + initial_values: ["none"], + other_values: ["both", "horizontal", "vertical"], + invalid_values: [], }, "-moz-stack-sizing": { domProp: "MozStackSizing", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "stretch-to-fit" ], - other_values: [ "ignore" ], - invalid_values: [] + initial_values: ["stretch-to-fit"], + other_values: ["ignore"], + invalid_values: [], }, "tab-size": { domProp: "TabSize", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "8" ], - other_values: [ "0", "2.5", "3", "99", "12000", "0px", "1em", - "calc(1px + 1em)", "calc(1px - 2px)", "calc(1 + 1)", "calc(-2.5)" ], - invalid_values: [ "9%", "calc(9% + 1px)", "calc(1 + 1em)", "-1", "-808", - "auto" ] + initial_values: ["8"], + other_values: [ + "0", + "2.5", + "3", + "99", + "12000", + "0px", + "1em", + "calc(1px + 1em)", + "calc(1px - 2px)", + "calc(1 + 1)", + "calc(-2.5)", + ], + invalid_values: [ + "9%", + "calc(9% + 1px)", + "calc(1 + 1em)", + "-1", + "-808", + "auto", + ], }, "-moz-tab-size": { domProp: "MozTabSize", inherited: true, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "tab-size", - subproperties: [ "tab-size" ] + subproperties: ["tab-size"], }, "-moz-text-size-adjust": { domProp: "MozTextSizeAdjust", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none" ], - invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ] + initial_values: ["auto"], + other_values: ["none"], + invalid_values: ["-5%", "0", "100", "0%", "50%", "100%", "220.3%"], }, - "transform": { + transform: { domProp: "transform", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "width": "300px", "height": "50px" }, - initial_values: [ "none" ], - other_values: [ "translatex(1px)", "translatex(4em)", - "translatex(-4px)", "translatex(3px)", + prerequisites: { width: "300px", height: "50px" }, + initial_values: ["none"], + other_values: [ + "translatex(1px)", + "translatex(4em)", + "translatex(-4px)", + "translatex(3px)", "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", - "translatey(4em)", "translate(3px)", "translate(10px, -3px)", - "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", - "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", - "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", - "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", - "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", - "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", + "translatey(4em)", + "translate(3px)", + "translate(10px, -3px)", + "rotate(45deg)", + "rotate(45grad)", + "rotate(45rad)", + "rotate(0.25turn)", + "rotate(0)", + "scalex(10)", + "scaley(10)", + "scale(10)", + "scale(10, 20)", + "skewx(30deg)", + "skewx(0)", + "skewy(0)", + "skewx(30grad)", + "skewx(30rad)", + "skewx(0.08turn)", + "skewy(30deg)", + "skewy(30grad)", + "skewy(30rad)", + "skewy(0.08turn)", + "rotate(45deg) scale(2, 1)", + "skewx(45deg) skewx(-50grad)", "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", - "translatex(50%)", "translatey(50%)", "translate(50%)", - "translate(3%, 5px)", "translate(5px, 3%)", + "translatex(50%)", + "translatey(50%)", + "translate(50%)", + "translate(3%, 5px)", + "translate(5px, 3%)", "matrix(1, 2, 3, 4, 5, 6)", /* valid calc() values */ "translatex(calc(5px + 10%))", @@ -2093,27 +2849,52 @@ var gCSSProperties = { "translate(calc(5px - 10% * 3))", "translate(calc(5px - 3 * 10%), 50px)", "translate(-50px, calc(5px - 10% * 3))", - "translatez(1px)", "translatez(4em)", "translatez(-4px)", - "translatez(0px)", "translatez(2px) translatez(5px)", - "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", + "translatez(1px)", + "translatez(4em)", + "translatez(-4px)", + "translatez(0px)", + "translatez(2px) translatez(5px)", + "translate3d(3px, 4px, 5px)", + "translate3d(2em, 3px, 1em)", "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", - "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", - "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", - "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", - "rotatez(72rad)", "rotatex(0.125turn)", - "perspective(0px)", "perspective(1000px)", + "scale3d(4, 4, 4)", + "scale3d(-2, 3, -7)", + "scalez(4)", + "scalez(-6)", + "rotate3d(2, 3, 4, 45deg)", + "rotate3d(-3, 7, 0, 12rad)", + "rotatex(15deg)", + "rotatey(-12grad)", + "rotatez(72rad)", + "rotatex(0.125turn)", + "perspective(0px)", + "perspective(1000px)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", ], - invalid_values: ["1px", "#0000ff", "red", "auto", - "translatex(1)", "translatey(1)", "translate(2)", + invalid_values: [ + "1px", + "#0000ff", + "red", + "auto", + "translatex(1)", + "translatey(1)", + "translate(2)", "translate(-3, -4)", - "translatex(1px 1px)", "translatex(translatex(1px))", - "translatex(#0000ff)", "translatex(red)", "translatey()", - "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", - "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", - "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", - "matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)", - "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)", + "translatex(1px 1px)", + "translatex(translatex(1px))", + "translatex(#0000ff)", + "translatex(red)", + "translatey()", + "matrix(1px, 2px, 3px, 4px, 5px, 6px)", + "scale(150%)", + "skewx(red)", + "matrix(1%, 0, 0, 0, 0px, 0px)", + "matrix(0, 1%, 2, 3, 4px,5px)", + "matrix(0, 1, 2%, 3, 4px, 5px)", + "matrix(0, 1, 2, 3%, 4%, 5%)", + "matrix(1, 2, 3, 4, 5px, 6%)", + "matrix(1, 2, 3, 4, 5%, 6px)", + "matrix(1, 2, 3, 4, 5%, 6%)", "matrix(1, 2, 3, 4, 5px, 6em)", /* invalid calc() values */ "translatey(-moz-min(5px,10%))", @@ -2121,14 +2902,17 @@ var gCSSProperties = { "translate(10px, calc(min(5px,10%)))", "translate(calc(max(5px,10%)), 10%)", "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", - "perspective(-10px)", "matrix3d(dinosaur)", + "perspective(-10px)", + "matrix3d(dinosaur)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", - "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", + "rotatey(words)", + "rotatex(7)", + "translate3d(3px, 4px, 1px, 7px)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", - "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)" + "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)", ], }, "transform-origin": { @@ -2136,14 +2920,30 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_LONGHAND, /* no subproperties */ - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", + prerequisites: { width: "10px", height: "10px", display: "block" }, + initial_values: ["50% 50%", "center", "center center"], + other_values: [ + "25% 25%", + "6px 5px", + "20% 3em", + "0 0", + "0in 1in", + "top", + "bottom", + "top left", + "top right", + "top center", + "center left", + "center right", + "bottom left", + "bottom right", + "bottom center", + "20% center", + "6px center", + "13in bottom", + "left 50px", + "right 13%", + "center 40px", "calc(20px)", "calc(20px) 10px", "10px calc(20px)", @@ -2155,107 +2955,193 @@ var gCSSProperties = { "calc(-20px) calc(-50%)", "calc(-20%) calc(-50%)", "6px 5px 5px", - "top center 10px" + "top center 10px", + ], + invalid_values: [ + "red", + "auto", + "none", + "0.5 0.5", + "40px #0000ff", + "border", + "center red", + "right diagonal", + "#00ffff bottom", + "0px calc(0px + rubbish)", + "0px 0px calc(0px + rubbish)", ], - invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom", "0px calc(0px + rubbish)", - "0px 0px calc(0px + rubbish)"] }, "perspective-origin": { domProp: "perspectiveOrigin", inherited: false, type: CSS_TYPE_LONGHAND, /* no subproperties */ - prerequisites: { "width": "10px", "height": "10px", "display": "block"}, - initial_values: [ "50% 50%", "center", "center center" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in", - "top", "bottom","top left", "top right", - "top center", "center left", "center right", - "bottom left", "bottom right", "bottom center", - "20% center", "6px center", "13in bottom", - "left 50px", "right 13%", "center 40px", - "calc(20px)", - "calc(20px) 10px", - "10px calc(20px)", - "calc(20px) 25%", - "25% calc(20px)", - "calc(20px) calc(20px)", - "calc(20px + 1em) calc(20px / 2)", - "calc(20px + 50%) calc(50% - 10px)", - "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" ], - invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff", - "border", "center red", "right diagonal", - "#00ffff bottom"] + prerequisites: { width: "10px", height: "10px", display: "block" }, + initial_values: ["50% 50%", "center", "center center"], + other_values: [ + "25% 25%", + "6px 5px", + "20% 3em", + "0 0", + "0in 1in", + "top", + "bottom", + "top left", + "top right", + "top center", + "center left", + "center right", + "bottom left", + "bottom right", + "bottom center", + "20% center", + "6px center", + "13in bottom", + "left 50px", + "right 13%", + "center 40px", + "calc(20px)", + "calc(20px) 10px", + "10px calc(20px)", + "calc(20px) 25%", + "25% calc(20px)", + "calc(20px) calc(20px)", + "calc(20px + 1em) calc(20px / 2)", + "calc(20px + 50%) calc(50% - 10px)", + "calc(-20px) calc(-50%)", + "calc(-20%) calc(-50%)", + ], + invalid_values: [ + "red", + "auto", + "none", + "0.5 0.5", + "40px #0000ff", + "border", + "center red", + "right diagonal", + "#00ffff bottom", + ], }, - "perspective": { + perspective: { domProp: "perspective", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "1000px", "500.2px", "0", "0px" ], - invalid_values: [ "pants", "200", "-100px", "-27.2em" ] + initial_values: ["none"], + other_values: ["1000px", "500.2px", "0", "0px"], + invalid_values: ["pants", "200", "-100px", "-27.2em"], }, "backface-visibility": { domProp: "backfaceVisibility", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "visible" ], - other_values: [ "hidden" ], - invalid_values: [ "collapse" ] + initial_values: ["visible"], + other_values: ["hidden"], + invalid_values: ["collapse"], }, "transform-style": { domProp: "transformStyle", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "flat" ], - other_values: [ "preserve-3d" ], - invalid_values: [] + initial_values: ["flat"], + other_values: ["preserve-3d"], + invalid_values: [], }, "-moz-user-focus": { domProp: "MozUserFocus", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "normal", "ignore", "select-all", "select-before", "select-after", "select-same", "select-menu" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "normal", + "ignore", + "select-all", + "select-before", + "select-after", + "select-same", + "select-menu", + ], + invalid_values: [], }, "-moz-user-input": { domProp: "MozUserInput", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none", "enabled", "disabled" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["none", "enabled", "disabled"], + invalid_values: [], }, "-moz-user-modify": { domProp: "MozUserModify", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "read-only" ], - other_values: [ "read-write", "write-only" ], - invalid_values: [] + initial_values: ["read-only"], + other_values: ["read-write", "write-only"], + invalid_values: [], }, "user-select": { domProp: "UserSelect", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none", "text", "element", "contain", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ], - invalid_values: [] + initial_values: ["auto"], + other_values: [ + "none", + "text", + "element", + "contain", + "elements", + "all", + "toggle", + "tri-state", + "-moz-all", + "-moz-none", + ], + invalid_values: [], }, - "background": { + background: { domProp: "background", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "background-attachment", "background-color", "background-image", "background-position-x", "background-position-y", "background-repeat", "background-clip", "background-origin", "background-size" ], - initial_values: [ "transparent", "none", "repeat", "scroll", "0% 0%", "top left", "left top", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto", - "transparent none", "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "left top / auto none", "left top / auto auto none", - "transparent none repeat scroll top left", "left top repeat none scroll transparent", "transparent none repeat scroll top left / auto", "left top / auto repeat none scroll transparent", "none repeat scroll 0% 0% / auto auto transparent", - "padding-box border-box" ], + subproperties: [ + "background-attachment", + "background-color", + "background-image", + "background-position-x", + "background-position-y", + "background-repeat", + "background-clip", + "background-origin", + "background-size", + ], + initial_values: [ + "transparent", + "none", + "repeat", + "scroll", + "0% 0%", + "top left", + "left top", + "0% 0% / auto", + "top left / auto", + "left top / auto", + "0% 0% / auto auto", + "transparent none", + "top left none", + "left top none", + "none left top", + "none top left", + "none 0% 0%", + "left top / auto none", + "left top / auto auto none", + "transparent none repeat scroll top left", + "left top repeat none scroll transparent", + "transparent none repeat scroll top left / auto", + "left top / auto repeat none scroll transparent", + "none repeat scroll 0% 0% / auto auto transparent", + "padding-box border-box", + ], other_values: [ - /* without multiple backgrounds */ + /* without multiple backgrounds */ "green", "none green repeat scroll left top", "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", @@ -2289,26 +3175,27 @@ var gCSSProperties = { "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat", "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat", "-moz-element(#test) lime", - /* multiple backgrounds */ - "url(404.png), url(404.png)", - "url(404.png), url(404.png) transparent", - "url(404.png), url(404.png) red", - "repeat-x, fixed, none", - "0% top url(404.png), url(404.png) 0% top", - "fixed repeat-y top left url(404.png), repeat-x green", - "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black", - "top left / contain, bottom right / cover", - /* test cases with clip+origin in the shorthand */ - "url(404.png) green padding-box", - "url(404.png) border-box transparent", - "content-box url(404.png) blue", - "url(404.png) green padding-box padding-box", - "url(404.png) green padding-box border-box", - "content-box border-box url(404.png) blue", + /* multiple backgrounds */ + "url(404.png), url(404.png)", + "url(404.png), url(404.png) transparent", + "url(404.png), url(404.png) red", + "repeat-x, fixed, none", + "0% top url(404.png), url(404.png) 0% top", + "fixed repeat-y top left url(404.png), repeat-x green", + "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black", + "top left / contain, bottom right / cover", + /* test cases with clip+origin in the shorthand */ + "url(404.png) green padding-box", + "url(404.png) border-box transparent", + "content-box url(404.png) blue", + "url(404.png) green padding-box padding-box", + "url(404.png) green padding-box border-box", + "content-box border-box url(404.png) blue", ], invalid_values: [ /* mixes with keywords have to be in correct order */ - "50% left", "top 50%", + "50% left", + "top 50%", /* no quirks mode colors */ "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat", /* no quirks mode lengths */ @@ -2316,7 +3203,8 @@ var gCSSProperties = { "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", "linear-gradient(red -99, yellow, green, blue 120%)", /* bug 258080: don't accept background-position separated */ - "left url(404.png) top", "top url(404.png) left", + "left url(404.png) top", + "top url(404.png) left", /* not allowed to have color in non-bottom layer */ "url(404.png) transparent, url(404.png)", "url(404.png) red, url(404.png)", @@ -2343,15 +3231,22 @@ var gCSSProperties = { "text border-box", "content-box text text", "padding-box text url(404.png) text", - ] + ], }, "background-attachment": { domProp: "backgroundAttachment", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "scroll" ], - other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ], - invalid_values: [] + initial_values: ["scroll"], + other_values: [ + "fixed", + "local", + "scroll,scroll", + "fixed, scroll", + "scroll, fixed, local, scroll", + "fixed, fixed", + ], + invalid_values: [], }, "background-clip": { /* @@ -2361,51 +3256,123 @@ var gCSSProperties = { domProp: "backgroundClip", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "border-box" ], - other_values: [ "content-box", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], - invalid_values: [ "margin-box", "border-box border-box" ] + initial_values: ["border-box"], + other_values: [ + "content-box", + "padding-box", + "border-box, padding-box", + "padding-box, padding-box, padding-box", + "border-box, border-box", + ], + invalid_values: ["margin-box", "border-box border-box"], }, "background-color": { domProp: "backgroundColor", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "transparent", "rgba(255, 127, 15, 0)", "hsla(240, 97%, 50%, 0.0)", "rgba(0, 0, 0, 0)", "rgba(255,255,255,-3.7)" ], - other_values: [ "green", "rgb(255, 0, 128)", "#fc2", "#96ed2a", "black", "rgba(255,255,0,3)", "hsl(240, 50%, 50%)", "rgb(50%, 50%, 50%)", "-moz-default-background-color", "rgb(100, 100.0, 100)" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "rgb(100, 100%, 100)" ], + initial_values: [ + "transparent", + "rgba(255, 127, 15, 0)", + "hsla(240, 97%, 50%, 0.0)", + "rgba(0, 0, 0, 0)", + "rgba(255,255,255,-3.7)", + ], + other_values: [ + "green", + "rgb(255, 0, 128)", + "#fc2", + "#96ed2a", + "black", + "rgba(255,255,0,3)", + "hsl(240, 50%, 50%)", + "rgb(50%, 50%, 50%)", + "-moz-default-background-color", + "rgb(100, 100.0, 100)", + ], + invalid_values: [ + "#0", + "#00", + "#00000", + "#0000000", + "#000000000", + "rgb(100, 100%, 100)", + ], quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, }, "background-image": { domProp: "backgroundImage", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: [ - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - "none, none", - "none, none, none, none, none", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", - "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + "none, none", + "none, none, none, none, none", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", + "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", ].concat(validGradientAndElementValues), - invalid_values: [ - ].concat(invalidGradientAndElementValues), - unbalanced_values: [ - ].concat(unbalancedGradientAndElementValues) + invalid_values: [].concat(invalidGradientAndElementValues), + unbalanced_values: [].concat(unbalancedGradientAndElementValues), }, "background-origin": { domProp: "backgroundOrigin", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "padding-box" ], - other_values: [ "border-box", "content-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], - invalid_values: [ "margin-box", "padding-box padding-box" ] + initial_values: ["padding-box"], + other_values: [ + "border-box", + "content-box", + "border-box, padding-box", + "padding-box, padding-box, padding-box", + "border-box, border-box", + ], + invalid_values: ["margin-box", "padding-box padding-box"], }, "background-position": { domProp: "backgroundPosition", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ], - other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top", + initial_values: [ + "top 0% left 0%", + "top 0% left", + "top left", + "left top", + "0% 0%", + "0% top", + "left 0%", + ], + other_values: [ + "top", + "left", + "right", + "bottom", + "center", + "center bottom", + "bottom center", + "center right", + "right center", + "center top", + "top center", + "center left", + "left center", + "right bottom", + "bottom right", + "50%", + "top left, top left", + "top left, top right", + "top right, top left", + "left top, 0% 0%", + "10% 20%, 30%, 40%", + "top left, bottom right", + "right bottom, left top", + "0%", + "0px", + "30px", + "0%, 10%, 20%, 30%", + "top, top, top, top, top", "calc(20px)", "calc(20px) 10px", "10px calc(20px)", @@ -2433,15 +3400,25 @@ var gCSSProperties = { "left top 15px", "left 10px top", "left 20%", - "right 20%" + "right 20%", + ], + subproperties: ["background-position-x", "background-position-y"], + invalid_values: [ + "center 10px center 4px", + "center 10px center", + "top 20%", + "bottom 20%", + "50% left", + "top 50%", + "50% bottom 10%", + "right 10% 50%", + "left right", + "top bottom", + "left 10% right", + "top 20px bottom 20px", + "left left", + "0px calc(0px + rubbish)", ], - subproperties: [ "background-position-x", "background-position-y" ], - invalid_values: [ "center 10px center 4px", "center 10px center", - "top 20%", "bottom 20%", "50% left", "top 50%", - "50% bottom 10%", "right 10% 50%", "left right", - "top bottom", "left 10% right", - "top 20px bottom 20px", "left left", - "0px calc(0px + rubbish)"], quirks_values: { "20 20": "20px 20px", "10 5px": "10px 5px", @@ -2452,8 +3429,20 @@ var gCSSProperties = { domProp: "backgroundPositionX", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "left 0%", "left", "0%" ], - other_values: [ "right", "center", "50%", "left, left", "left, right", "right, left", "left, 0%", "10%, 20%, 40%", "0px", "30px", "0%, 10%, 20%, 30%", "left, left, left, left, left", + initial_values: ["left 0%", "left", "0%"], + other_values: [ + "right", + "center", + "50%", + "left, left", + "left, right", + "right, left", + "left, 0%", + "10%, 20%, 40%", + "0px", + "30px", + "0%, 10%, 20%, 30%", + "left, left, left, left, left", "calc(20px)", "calc(20px + 1em)", "calc(20px / 2)", @@ -2469,17 +3458,42 @@ var gCSSProperties = { "right 20px", "right 3em", ], - invalid_values: [ "center 10px", "right 10% 50%", "left right", "left left", - "bottom 20px", "top 10%", "bottom 3em", - "top", "bottom", "top, top", "top, bottom", "bottom, top", "top, 0%", "top, top, top, top, top", - "calc(0px + rubbish)"], + invalid_values: [ + "center 10px", + "right 10% 50%", + "left right", + "left left", + "bottom 20px", + "top 10%", + "bottom 3em", + "top", + "bottom", + "top, top", + "top, bottom", + "bottom, top", + "top, 0%", + "top, top, top, top, top", + "calc(0px + rubbish)", + ], }, "background-position-y": { domProp: "backgroundPositionY", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "top 0%", "top", "0%" ], - other_values: [ "bottom", "center", "50%", "top, top", "top, bottom", "bottom, top", "top, 0%", "10%, 20%, 40%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top", + initial_values: ["top 0%", "top", "0%"], + other_values: [ + "bottom", + "center", + "50%", + "top, top", + "top, bottom", + "bottom, top", + "top, 0%", + "10%, 20%, 40%", + "0px", + "30px", + "0%, 10%, 20%, 30%", + "top, top, top, top, top", "calc(20px)", "calc(20px + 1em)", "calc(20px / 2)", @@ -2495,17 +3509,33 @@ var gCSSProperties = { "bottom 20px", "bottom 3em", ], - invalid_values: [ "center 10px", "bottom 10% 50%", "top bottom", "top top", - "right 20px", "left 10%", "right 3em", - "left", "right", "left, left", "left, right", "right, left", "left, 0%", "left, left, left, left, left", - "calc(0px + rubbish)"], + invalid_values: [ + "center 10px", + "bottom 10% 50%", + "top bottom", + "top top", + "right 20px", + "left 10%", + "right 3em", + "left", + "right", + "left, left", + "left, right", + "right, left", + "left, 0%", + "left, left, left, left, left", + "calc(0px + rubbish)", + ], }, "background-repeat": { domProp: "backgroundRepeat", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "repeat", "repeat repeat" ], - other_values: [ "repeat-x", "repeat-y", "no-repeat", + initial_values: ["repeat", "repeat repeat"], + other_values: [ + "repeat-x", + "repeat-y", + "no-repeat", "repeat-x, repeat-x", "repeat, no-repeat", "repeat-y, no-repeat, repeat-y", @@ -2522,31 +3552,41 @@ var gCSSProperties = { "space repeat, repeat-x", "space no-repeat, repeat-y", "space space", - "space round" + "space round", + ], + invalid_values: [ + "repeat repeat repeat", + "repeat-x repeat-y", + "repeat repeat-x", + "repeat repeat-y", + "repeat-x repeat", + "repeat-y repeat", + "round round round", + "repeat-x round", + "round repeat-x", + "repeat-y round", + "round repeat-y", + "space space space", + "repeat-x space", + "space repeat-x", + "repeat-y space", + "space repeat-y", ], - invalid_values: [ "repeat repeat repeat", - "repeat-x repeat-y", - "repeat repeat-x", - "repeat repeat-y", - "repeat-x repeat", - "repeat-y repeat", - "round round round", - "repeat-x round", - "round repeat-x", - "repeat-y round", - "round repeat-y", - "space space space", - "repeat-x space", - "space repeat-x", - "repeat-y space", - "space repeat-y" ] }, "background-size": { domProp: "backgroundSize", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto", "auto auto" ], - other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%", + initial_values: ["auto", "auto auto"], + other_values: [ + "contain", + "cover", + "100px auto", + "auto 100px", + "100% auto", + "auto 100%", + "25% 50px", + "3em 40%", "calc(20px)", "calc(20px) 10px", "10px calc(20px)", @@ -2556,36 +3596,103 @@ var gCSSProperties = { "calc(20px + 1em) calc(20px / 2)", "calc(20px + 50%) calc(50% - 10px)", "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" + "calc(-20%) calc(-50%)", + ], + invalid_values: [ + "contain contain", + "cover cover", + "cover auto", + "auto cover", + "contain cover", + "cover contain", + "-5px 3px", + "3px -5px", + "auto -5px", + "-5px auto", + "5 3", + "10px calc(10px + rubbish)", ], - invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3", "10px calc(10px + rubbish)" ] }, - "border": { + border: { domProp: "border", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ], - other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ], - invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ] + subproperties: [ + "border-bottom-color", + "border-bottom-style", + "border-bottom-width", + "border-left-color", + "border-left-style", + "border-left-width", + "border-right-color", + "border-right-style", + "border-right-width", + "border-top-color", + "border-top-style", + "border-top-width", + "-moz-border-top-colors", + "-moz-border-right-colors", + "-moz-border-bottom-colors", + "-moz-border-left-colors", + "border-image-source", + "border-image-slice", + "border-image-width", + "border-image-outset", + "border-image-repeat", + ], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + "calc(4px - 1px) none", + ], + other_values: [ + "solid", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "calc(2px) solid blue", + ], + invalid_values: ["5%", "medium solid ff00ff", "5 solid green"], }, "border-bottom": { domProp: "borderBottom", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] + subproperties: [ + "border-bottom-color", + "border-bottom-style", + "border-bottom-width", + ], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + ], + other_values: [ + "solid", + "green", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "5px green none", + ], + invalid_values: ["5%", "5", "5 solid green"], }, "border-bottom-color": { domProp: "borderBottomColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000" ], + prerequisites: { color: "black" }, + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"], quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, }, "border-bottom-style": { @@ -2593,17 +3700,30 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_LONGHAND, /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + ], + invalid_values: [], }, "border-bottom-width": { domProp: "borderBottomWidth", inherited: false, type: CSS_TYPE_LONGHAND, prerequisites: { "border-bottom-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0em)", @@ -2613,45 +3733,94 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, + invalid_values: ["5%"], + quirks_values: { 5: "5px" }, }, "border-collapse": { domProp: "borderCollapse", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "separate" ], - other_values: [ "collapse" ], - invalid_values: [] + initial_values: ["separate"], + other_values: ["collapse"], + invalid_values: [], }, "border-color": { domProp: "borderColor", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ], - initial_values: [ "currentColor", "currentColor currentColor", "currentColor currentColor currentColor", "currentColor currentColor currentcolor CURRENTcolor" ], - other_values: [ "green", "currentColor green", "currentColor currentColor green", "currentColor currentColor currentColor green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "red rgb(nonsense)", "red 1px" ], - unbalanced_values: [ "red rgb(" ], + subproperties: [ + "border-top-color", + "border-right-color", + "border-bottom-color", + "border-left-color", + ], + initial_values: [ + "currentColor", + "currentColor currentColor", + "currentColor currentColor currentColor", + "currentColor currentColor currentcolor CURRENTcolor", + ], + other_values: [ + "green", + "currentColor green", + "currentColor currentColor green", + "currentColor currentColor currentColor green", + "rgba(255,128,0,0.5)", + "transparent", + ], + invalid_values: [ + "#0", + "#00", + "#00000", + "#0000000", + "#000000000", + "red rgb(nonsense)", + "red 1px", + ], + unbalanced_values: ["red rgb("], quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, }, "border-left": { domProp: "borderLeft", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-left-color", "border-left-style", "border-left-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green", "calc(5px + rubbish) green solid", "5px rgb(0, rubbish, 0) solid" ] + subproperties: [ + "border-left-color", + "border-left-style", + "border-left-width", + ], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + ], + other_values: [ + "solid", + "green", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "5px green none", + ], + invalid_values: [ + "5%", + "5", + "5 solid green", + "calc(5px + rubbish) green solid", + "5px rgb(0, rubbish, 0) solid", + ], }, "border-left-color": { domProp: "borderLeftColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000" ], + prerequisites: { color: "black" }, + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"], quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, }, "border-left-style": { @@ -2659,17 +3828,30 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_LONGHAND, /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + ], + invalid_values: [], }, "border-left-width": { domProp: "borderLeftWidth", inherited: false, type: CSS_TYPE_LONGHAND, prerequisites: { "border-left-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0em)", @@ -2679,26 +3861,44 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, + invalid_values: ["5%"], + quirks_values: { 5: "5px" }, }, "border-right": { domProp: "borderRight", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-right-color", "border-right-style", "border-right-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] + subproperties: [ + "border-right-color", + "border-right-style", + "border-right-width", + ], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + ], + other_values: [ + "solid", + "green", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "5px green none", + ], + invalid_values: ["5%", "5", "5 solid green"], }, "border-right-color": { domProp: "borderRightColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000" ], + prerequisites: { color: "black" }, + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"], quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, }, "border-right-style": { @@ -2706,17 +3906,30 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_LONGHAND, /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + ], + invalid_values: [], }, "border-right-width": { domProp: "borderRightWidth", inherited: false, type: CSS_TYPE_LONGHAND, prerequisites: { "border-right-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0em)", @@ -2726,19 +3939,51 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, + invalid_values: ["5%"], + quirks_values: { 5: "5px" }, }, "border-spacing": { domProp: "borderSpacing", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0 0", "0px", "0 0px", "calc(0px)", "calc(0px) calc(0em)", "calc(2em - 2em) calc(3px + 7px - 10px)", "calc(-5px)", "calc(-5px) calc(-5px)" ], - other_values: [ "3px", "4em 2px", "4em 0", "0px 2px", "calc(7px)", "0 calc(7px)", "calc(7px) 0", "calc(0px) calc(7px)", "calc(7px) calc(0px)", "7px calc(0px)", "calc(0px) 7px", "7px calc(0px)", "3px calc(2em)" ], - invalid_values: [ "0%", "0 0%", "-5px", "-5px -5px", "0 -5px", "-5px 0", "0 calc(0px + rubbish)" ], + initial_values: [ + "0", + "0 0", + "0px", + "0 0px", + "calc(0px)", + "calc(0px) calc(0em)", + "calc(2em - 2em) calc(3px + 7px - 10px)", + "calc(-5px)", + "calc(-5px) calc(-5px)", + ], + other_values: [ + "3px", + "4em 2px", + "4em 0", + "0px 2px", + "calc(7px)", + "0 calc(7px)", + "calc(7px) 0", + "calc(0px) calc(7px)", + "calc(7px) calc(0px)", + "7px calc(0px)", + "calc(0px) 7px", + "7px calc(0px)", + "3px calc(2em)", + ], + invalid_values: [ + "0%", + "0 0%", + "-5px", + "-5px -5px", + "0 -5px", + "-5px 0", + "0 calc(0px + rubbish)", + ], quirks_values: { "2px 5": "2px 5px", - "7": "7px", + 7: "7px", "3 4px": "3px 4px", }, }, @@ -2746,29 +3991,69 @@ var gCSSProperties = { domProp: "borderStyle", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ], + subproperties: [ + "border-top-style", + "border-right-style", + "border-bottom-style", + "border-left-style", + ], /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none", "none none", "none none none", "none none none none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge", "none solid", "none none solid", "none none none solid", "groove none none none", "none ridge none none", "none none double none", "none none none dotted" ], - invalid_values: [] + initial_values: [ + "none", + "none none", + "none none none", + "none none none none", + ], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + "none solid", + "none none solid", + "none none none solid", + "groove none none none", + "none ridge none none", + "none none double none", + "none none none dotted", + ], + invalid_values: [], }, "border-top": { domProp: "borderTop", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-color", "border-top-style", "border-top-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] + subproperties: ["border-top-color", "border-top-style", "border-top-width"], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + ], + other_values: [ + "solid", + "green", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "5px green none", + ], + invalid_values: ["5%", "5", "5 solid green"], }, "border-top-color": { domProp: "borderTopColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000" ], + prerequisites: { color: "black" }, + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"], quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" }, }, "border-top-style": { @@ -2776,17 +4061,30 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_LONGHAND, /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + ], + invalid_values: [], }, "border-top-width": { domProp: "borderTopWidth", inherited: false, type: CSS_TYPE_LONGHAND, prerequisites: { "border-top-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0em)", @@ -2796,30 +4094,45 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%" ], - quirks_values: { "5": "5px" }, + invalid_values: ["5%"], + quirks_values: { 5: "5px" }, }, "border-width": { domProp: "borderWidth", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ], + subproperties: [ + "border-top-width", + "border-right-width", + "border-bottom-width", + "border-left-width", + ], prerequisites: { "border-style": "solid" }, - initial_values: [ "medium", "3px", "medium medium", "3px medium medium", "medium 3px medium medium", "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)" ], - other_values: [ "thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)" ], - invalid_values: [ "5%", "1px calc(nonsense)", "1px red" ], - unbalanced_values: [ "1px calc(" ], - quirks_values: { "5": "5px" }, + initial_values: [ + "medium", + "3px", + "medium medium", + "3px medium medium", + "medium 3px medium medium", + "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)", + ], + other_values: ["thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)"], + invalid_values: ["5%", "1px calc(nonsense)", "1px red"], + unbalanced_values: ["1px calc("], + quirks_values: { 5: "5px" }, }, - "bottom": { + bottom: { domProp: "bottom", inherited: false, type: CSS_TYPE_LONGHAND, /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, + prerequisites: { position: "relative" }, /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", + initial_values: ["auto"], + other_values: [ + "32px", + "-3em", + "12%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -2828,17 +4141,30 @@ var gCSSProperties = { "calc(3*25px + 50%)", ], invalid_values: [], - quirks_values: { "5": "5px" }, + quirks_values: { 5: "5px" }, }, "box-shadow": { domProp: "boxShadow", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - prerequisites: { "color": "blue" }, - other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px", + initial_values: ["none"], + prerequisites: { color: "blue" }, + other_values: [ + "2px 2px", + "2px 2px 1px", + "2px 2px 2px 2px", + "blue 3px 2px", + "2px 2px 1px 5px green", + "2px 2px red", + "green 2px 2px 1px", + "green 2px 2px, blue 1px 3px 4px", + "currentColor 3px 3px", + "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", + "3px 0 0 0", + "inset 2px 2px 3px 4px black", + "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px", /* calc() values */ - "2px 2px calc(-5px)", /* clamped */ + "2px 2px calc(-5px)" /* clamped */, "calc(3em - 2px) 2px green", "green calc(3em - 2px) 2px", "2px calc(2px + 0.2em)", @@ -2848,138 +4174,365 @@ var gCSSProperties = { "-2px -2px", "calc(2px) calc(2px)", "calc(2px) calc(2px) calc(2px)", - "calc(2px) calc(2px) calc(2px) calc(2px)" + "calc(2px) calc(2px) calc(2px) calc(2px)", + ], + invalid_values: [ + "3% 3%", + "1px 1px 1px 1px 1px", + "2px 2px, none", + "red 2px 2px blue", + "inherit, 2px 2px", + "2px 2px, inherit", + "2px 2px -5px", + "inset 4px 4px black inset", + "inset inherit", + "inset none", + "3 3", + "3px 3", + "3 3px", + "3px 3px 3", + "3px 3px 3px 3", + "3px calc(3px + rubbish)", + "3px 3px calc(3px + rubbish)", + "3px 3px 3px calc(3px + rubbish)", + "3px 3px 3px 3px rgb(0, rubbish, 0)", ], - invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none", "3 3", "3px 3", "3 3px", "3px 3px 3", "3px 3px 3px 3", "3px calc(3px + rubbish)", "3px 3px calc(3px + rubbish)", "3px 3px 3px calc(3px + rubbish)", "3px 3px 3px 3px rgb(0, rubbish, 0)" ] }, "caption-side": { domProp: "captionSide", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "top" ], - other_values: [ "bottom", "left", "right", "top-outside", "bottom-outside" ], - invalid_values: [] + initial_values: ["top"], + other_values: ["bottom", "left", "right", "top-outside", "bottom-outside"], + invalid_values: [], }, "caret-color": { domProp: "caretColor", inherited: true, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, + prerequisites: { color: "black" }, // Though "auto" is an independent computed-value time keyword value, // it is not distinguishable from currentcolor because getComputedStyle // always returns used value for . - initial_values: [ "auto", "currentcolor", "black", "rgb(0,0,0)" ], - other_values: [ "green", "transparent", "rgba(128,128,128,.5)", "#123" ], - invalid_values: [ "#0", "#00", "#00000", "cc00ff" ] + initial_values: ["auto", "currentcolor", "black", "rgb(0,0,0)"], + other_values: ["green", "transparent", "rgba(128,128,128,.5)", "#123"], + invalid_values: ["#0", "#00", "#00000", "cc00ff"], }, - "clear": { + clear: { domProp: "clear", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "left", "right", "both" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["left", "right", "both"], + invalid_values: [], }, - "clip": { + clip: { domProp: "clip", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "rect(0 0 0 0)", "rect(auto,auto,auto,auto)", "rect(3px, 4px, 4em, 0)", "rect(auto, 3em, 4pt, 2px)", "rect(2px 3px 4px 5px)" ], - invalid_values: [ "rect(auto, 3em, 2%, 5px)" ], + initial_values: ["auto"], + other_values: [ + "rect(0 0 0 0)", + "rect(auto,auto,auto,auto)", + "rect(3px, 4px, 4em, 0)", + "rect(auto, 3em, 4pt, 2px)", + "rect(2px 3px 4px 5px)", + ], + invalid_values: ["rect(auto, 3em, 2%, 5px)"], quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" }, }, - "color": { + color: { domProp: "color", inherited: true, type: CSS_TYPE_LONGHAND, /* XXX should test currentColor, but may or may not be initial */ - initial_values: [ "black", "#000", "#000f", "#000000ff", "-moz-default-color", "rgb(0, 0, 0)", "rgb(0%, 0%, 0%)", + initial_values: [ + "black", + "#000", + "#000f", + "#000000ff", + "-moz-default-color", + "rgb(0, 0, 0)", + "rgb(0%, 0%, 0%)", /* css-color-4: */ /* rgb() and rgba() are aliases of each other. */ - "rgb(0, 0, 0)", "rgba(0, 0, 0)", "rgb(0, 0, 0, 1)", "rgba(0, 0, 0, 1)", + "rgb(0, 0, 0)", + "rgba(0, 0, 0)", + "rgb(0, 0, 0, 1)", + "rgba(0, 0, 0, 1)", /* hsl() and hsla() are aliases of each other. */ - "hsl(0, 0%, 0%)", "hsla(0, 0%, 0%)", "hsl(0, 0%, 0%, 1)", "hsla(0, 0%, 0%, 1)", + "hsl(0, 0%, 0%)", + "hsla(0, 0%, 0%)", + "hsl(0, 0%, 0%, 1)", + "hsla(0, 0%, 0%, 1)", /* rgb() and rgba() functions now accept rather than . */ - "rgb(0.0, 0.0, 0.0)", "rgba(0.0, 0.0, 0.0)", "rgb(0.0, 0.0, 0.0, 1)", "rgba(0.0, 0.0, 0.0, 1)", + "rgb(0.0, 0.0, 0.0)", + "rgba(0.0, 0.0, 0.0)", + "rgb(0.0, 0.0, 0.0, 1)", + "rgba(0.0, 0.0, 0.0, 1)", /* now accepts as well as in rgba() and hsla(). */ - "rgb(0.0, 0.0, 0.0, 100%)", "hsl(0, 0%, 0%, 100%)", + "rgb(0.0, 0.0, 0.0, 100%)", + "hsl(0, 0%, 0%, 100%)", /* rgb() and hsl() now support comma-less expression. */ - "rgb(0 0 0)", "rgb(0 0 0 / 1)", "rgb(0/* comment */0/* comment */0)", "rgb(0/* comment */0/* comment*/0/1.0)", - "hsl(0 0% 0%)", "hsl(0 0% 0% / 1)", "hsl(0/* comment */0%/* comment */0%)", "hsl(0/* comment */0%/* comment */0%/1)", + "rgb(0 0 0)", + "rgb(0 0 0 / 1)", + "rgb(0/* comment */0/* comment */0)", + "rgb(0/* comment */0/* comment*/0/1.0)", + "hsl(0 0% 0%)", + "hsl(0 0% 0% / 1)", + "hsl(0/* comment */0%/* comment */0%)", + "hsl(0/* comment */0%/* comment */0%/1)", /* Support for hsl() hue component. */ - "hsl(0deg, 0%, 0%)", "hsl(360deg, 0%, 0%)", "hsl(0grad, 0%, 0%)", "hsl(400grad, 0%, 0%)", "hsl(0rad, 0%, 0%)", "hsl(0turn, 0%, 0%)", "hsl(1turn, 0%, 0%)", + "hsl(0deg, 0%, 0%)", + "hsl(360deg, 0%, 0%)", + "hsl(0grad, 0%, 0%)", + "hsl(400grad, 0%, 0%)", + "hsl(0rad, 0%, 0%)", + "hsl(0turn, 0%, 0%)", + "hsl(1turn, 0%, 0%)", + /* oklab() and oklch(). */ + "oklab(0 0 0)", + "oklch(0 0 0)", ], - other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)", "#e0fc", "#10fcee72", + other_values: [ + "green", + "#f3c", + "#fed292", + "rgba(45,300,12,2)", + "transparent", + "-moz-nativehyperlinktext", + "rgba(255,128,0,0.5)", + "#e0fc", + "#10fcee72", /* css-color-4: */ - "rgb(100, 100.0, 100)", "rgb(300 300 300 / 200%)", "rgb(300.0 300.0 300.0 / 2.0)", "hsl(720, 200%, 200%, 2.0)", "hsla(720 200% 200% / 200%)", - "hsl(480deg, 20%, 30%, 0.3)", "hsl(55grad, 400%, 30%)", "hsl(0.5grad 400% 500% / 9.0)", "hsl(33rad 100% 90% / 4)", "hsl(0.33turn, 40%, 40%, 10%)", + "rgb(100, 100.0, 100)", + "rgb(300 300 300 / 200%)", + "rgb(300.0 300.0 300.0 / 2.0)", + "hsl(720, 200%, 200%, 2.0)", + "hsla(720 200% 200% / 200%)", + "hsl(480deg, 20%, 30%, 0.3)", + "hsl(55grad, 400%, 30%)", + "hsl(0.5grad 400% 500% / 9.0)", + "hsl(33rad 100% 90% / 4)", + "hsl(0.33turn, 40%, 40%, 10%)", + "oklab(100% 0 0)", + "oklab(60% 0.1 -0.1 / 75%)", + "oklch(70% 0.2 180deg / 40%)", ], - invalid_values: [ "#f", "#ff", "#fffff", "#fffffff", "#fffffffff", - "rgb(100%, 0, 100%)", "rgba(100, 0, 100%, 30%)", - "hsl(0, 0, 0%)", "hsla(0%, 0%, 0%, 0.1)", + invalid_values: [ + "#f", + "#ff", + "#fffff", + "#fffffff", + "#fffffffff", + "rgb(100%, 0, 100%)", + "rgba(100, 0, 100%, 30%)", + "hsl(0, 0, 0%)", + "hsla(0%, 0%, 0%, 0.1)", /* trailing commas */ - "rgb(0, 0, 0,)", "rgba(0, 0, 0, 0,)", - "hsl(0, 0%, 0%,)", "hsla(0, 0%, 0%, 1,)", + "rgb(0, 0, 0,)", + "rgba(0, 0, 0, 0,)", + "hsl(0, 0%, 0%,)", + "hsla(0, 0%, 0%, 1,)", /* css-color-4: */ /* comma and comma-less expressions should not mix together. */ - "rgb(0, 0, 0 / 1)", "rgb(0 0 0, 1)", "rgb(0, 0 0, 1)", "rgb(0 0, 0 / 1)", - "hsl(0, 0%, 0% / 1)", "hsl(0 0% 0%, 1)", "hsl(0 0% 0%, 1)", "hsl(0 0%, 0% / 1)", + "rgb(0, 0, 0 / 1)", + "rgb(0 0 0, 1)", + "rgb(0, 0 0, 1)", + "rgb(0 0, 0 / 1)", + "hsl(0, 0%, 0% / 1)", + "hsl(0 0% 0%, 1)", + "hsl(0 0% 0%, 1)", + "hsl(0 0%, 0% / 1)", /* trailing slash */ - "rgb(0 0 0 /)", "rgb(0, 0, 0 /)", - "hsl(0 0% 0% /)", "hsl(0, 0%, 0% /)", + "rgb(0 0 0 /)", + "rgb(0, 0, 0 /)", + "hsl(0 0% 0% /)", + "hsl(0, 0%, 0% /)", + "oklab(0, 0 0)", + "oklab(0 0 / 1)", + "oklch(0, 0 0)", + "oklch(0 0 / 1)", ], - quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a", "fff": "#ffffff", "ffffff": "#ffffff", }, + quirks_values: { + "000000": "#000000", + "96ed2a": "#96ed2a", + fff: "#ffffff", + ffffff: "#ffffff", + }, }, - "content": { + content: { domProp: "content", inherited: false, type: CSS_TYPE_LONGHAND, /* XXX needs to be on pseudo-elements */ - initial_values: [ "normal", "none" ], - other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content", "counter(foo, symbols('*'))", "counter(foo, symbols(numeric '0' '1'))", "counters(foo, '.', symbols('*'))", "counters(foo, '.', symbols(numeric '0' '1'))" ], - invalid_values: [ 'counters(foo)', 'counter(foo, ".")', 'attr("title")', "attr('title')", "attr(2)", "attr(-2)", "counter(2)", "counters(-2, '.')", "-moz-alt-content 'foo'", "'foo' -moz-alt-content", "counter(one, two, three) 'foo'" ] + initial_values: ["normal", "none"], + other_values: [ + '""', + "''", + '"hello"', + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + "counter(foo)", + "counter(bar, upper-roman)", + 'counters(foo, ".")', + "counters(bar, '-', lower-greek)", + "'-' counter(foo) '.'", + "attr(title)", + "open-quote", + "close-quote", + "no-open-quote", + "no-close-quote", + "close-quote attr(title) counters(foo, '.', upper-alpha)", + "counter(foo, none)", + "counters(bar, '.', none)", + "attr(\\32)", + "attr(\\2)", + "attr(-\\2)", + "attr(-\\32)", + "counter(\\2)", + "counters(\\32, '.')", + "counter(-\\32, upper-roman)", + "counters(-\\2, '-', lower-greek)", + "counter(\\()", + "counters(a\\+b, '.')", + "counter(\\}, upper-alpha)", + "-moz-alt-content", + "counter(foo, symbols('*'))", + "counter(foo, symbols(numeric '0' '1'))", + "counters(foo, '.', symbols('*'))", + "counters(foo, '.', symbols(numeric '0' '1'))", + ], + invalid_values: [ + "counters(foo)", + 'counter(foo, ".")', + 'attr("title")', + "attr('title')", + "attr(2)", + "attr(-2)", + "counter(2)", + "counters(-2, '.')", + "-moz-alt-content 'foo'", + "'foo' -moz-alt-content", + "counter(one, two, three) 'foo'", + ], }, "counter-increment": { domProp: "counterIncrement", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], - invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ], - unbalanced_values: [ "foo 1 (" ] + initial_values: ["none"], + other_values: [ + "foo 1", + "bar", + "foo 3 bar baz 2", + "\\32 1", + "-\\32 1", + "-c 1", + "\\32 1", + "-\\32 1", + "\\2 1", + "-\\2 1", + "-c 1", + "\\2 1", + "-\\2 1", + "-\\7f \\9e 1", + ], + invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"], + unbalanced_values: ["foo 1 ("], }, "counter-reset": { domProp: "counterReset", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ], - invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ] + initial_values: ["none"], + other_values: [ + "foo 1", + "bar", + "foo 3 bar baz 2", + "\\32 1", + "-\\32 1", + "-c 1", + "\\32 1", + "-\\32 1", + "\\2 1", + "-\\2 1", + "-c 1", + "\\2 1", + "-\\2 1", + "-\\7f \\9e 1", + ], + invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"], }, - "cursor": { + cursor: { domProp: "cursor", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress", "copy", "alias", "context-menu", "cell", "not-allowed", "col-resize", "row-resize", "no-drop", "vertical-text", "all-scroll", "nesw-resize", "nwse-resize", "ns-resize", "ew-resize", "none", "grab", "grabbing", "zoom-in", "zoom-out", "-moz-grab", "-moz-grabbing", "-moz-zoom-in", "-moz-zoom-out", "url(foo.png), move", "url(foo.png) 5 7, move", "url(foo.png) 12 3, url(bar.png), no-drop", "url(foo.png), url(bar.png) 7 2, wait", "url(foo.png) 3 2, url(bar.png) 7 9, pointer" ], - invalid_values: [ "url(foo.png)", "url(foo.png) 5 5" ] + initial_values: ["auto"], + other_values: [ + "crosshair", + "default", + "pointer", + "move", + "e-resize", + "ne-resize", + "nw-resize", + "n-resize", + "se-resize", + "sw-resize", + "s-resize", + "w-resize", + "text", + "wait", + "help", + "progress", + "copy", + "alias", + "context-menu", + "cell", + "not-allowed", + "col-resize", + "row-resize", + "no-drop", + "vertical-text", + "all-scroll", + "nesw-resize", + "nwse-resize", + "ns-resize", + "ew-resize", + "none", + "grab", + "grabbing", + "zoom-in", + "zoom-out", + "-moz-grab", + "-moz-grabbing", + "-moz-zoom-in", + "-moz-zoom-out", + "url(foo.png), move", + "url(foo.png) 5 7, move", + "url(foo.png) 12 3, url(bar.png), no-drop", + "url(foo.png), url(bar.png) 7 2, wait", + "url(foo.png) 3 2, url(bar.png) 7 9, pointer", + ], + invalid_values: ["url(foo.png)", "url(foo.png) 5 5"], }, - "direction": { + direction: { domProp: "direction", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "ltr" ], - other_values: [ "rtl" ], - invalid_values: [] + initial_values: ["ltr"], + other_values: ["rtl"], + invalid_values: [], }, - "display": { + display: { domProp: "display", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "inline" ], + initial_values: ["inline"], /* XXX none will really mess with other properties */ - prerequisites: { "float": "none", "position": "static", "contain": "none" }, + prerequisites: { float: "none", position: "static", contain: "none" }, other_values: [ "block", "flex", @@ -3001,41 +4554,78 @@ var gCSSProperties = { "ruby-base-container", "ruby-text", "ruby-text-container", - "none" + "none", ], - invalid_values: [] + invalid_values: [], }, "empty-cells": { domProp: "emptyCells", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "show" ], - other_values: [ "hide" ], - invalid_values: [] + initial_values: ["show"], + other_values: ["hide"], + invalid_values: [], }, - "float": { + float: { domProp: "cssFloat", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "left", "right" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["left", "right"], + invalid_values: [], }, - "font": { + font: { domProp: "font", inherited: true, type: CSS_TYPE_TRUE_SHORTHAND, prerequisites: { "writing-mode": "initial" }, - subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", - "font-size-adjust", "font-feature-settings", "font-language-override", - "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", - "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ], - initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ], - other_values: [ "large serif", "9px fantasy", "condensed bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit", + subproperties: [ + "font-style", + "font-variant", + "font-weight", + "font-size", + "line-height", + "font-family", + "font-stretch", + "font-size-adjust", + "font-feature-settings", + "font-language-override", + "font-kerning", + "font-synthesis", + "font-variant-alternates", + "font-variant-caps", + "font-variant-east-asian", + "font-variant-ligatures", + "font-variant-numeric", + "font-variant-position", + ], + initial_values: [ + gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif", + ], + other_values: [ + "large serif", + "9px fantasy", + "condensed bold italic small-caps 24px/1.4 Times New Roman, serif", + "small inherit roman", + "small roman inherit", // system fonts - "caption", "icon", "menu", "message-box", "small-caption", "status-bar", + "caption", + "icon", + "menu", + "message-box", + "small-caption", + "status-bar", // Gecko-specific system fonts - "-moz-window", "-moz-document", "-moz-desktop", "-moz-info", "-moz-dialog", "-moz-button", "-moz-pull-down-menu", "-moz-list", "-moz-field", "-moz-workspace", + "-moz-window", + "-moz-document", + "-moz-desktop", + "-moz-info", + "-moz-dialog", + "-moz-button", + "-moz-pull-down-menu", + "-moz-list", + "-moz-field", + "-moz-workspace", // line-height with calc() "condensed bold italic small-caps 24px/calc(2px) Times New Roman, serif", "condensed bold italic small-caps 24px/calc(50%) Times New Roman, serif", @@ -3044,236 +4634,430 @@ var gCSSProperties = { "condensed bold italic small-caps 24px/calc(3*25px + 50%) Times New Roman, serif", "condensed bold italic small-caps 24px/calc(1 + 2*3/4) Times New Roman, serif", ], - invalid_values: [ "9 fantasy", "-2px fantasy", + invalid_values: [ + "9 fantasy", + "-2px fantasy", // line-height with calc() "condensed bold italic small-caps 24px/calc(1 + 2px) Times New Roman, serif", "condensed bold italic small-caps 24px/calc(100% + 0.1) Times New Roman, serif", - ] + ], }, "font-family": { domProp: "fontFamily", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ (gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif") ], - other_values: [ (gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif"), "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy", "\\\"Times New Roman", "\"Times New Roman\"", "Times, \\\"Times New Roman", "Times, \"Times New Roman\"", "-no-such-font-installed", "inherit roman", "roman inherit", "Times, inherit roman", "inherit roman, Times", "roman inherit, Times", "Times, roman inherit" ], - invalid_values: [ "\"Times New\" Roman", "\"Times New Roman\n", "Times, \"Times New Roman\n" ] + initial_values: [gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif"], + other_values: [ + gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif", + "Times New Roman, serif", + "'Times New Roman', serif", + "cursive", + "fantasy", + '\\"Times New Roman', + '"Times New Roman"', + 'Times, \\"Times New Roman', + 'Times, "Times New Roman"', + "-no-such-font-installed", + "inherit roman", + "roman inherit", + "Times, inherit roman", + "inherit roman, Times", + "roman inherit, Times", + "Times, roman inherit", + ], + invalid_values: [ + '"Times New" Roman', + '"Times New Roman\n', + 'Times, "Times New Roman\n', + ], }, "font-feature-settings": { domProp: "fontFeatureSettings", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], + initial_values: ["normal"], other_values: [ - "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", - "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', - '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', + "'liga' on", + "'liga'", + '"liga" 1', + "'liga', 'clig' 1", + '"liga" off', + '"liga" 0', + '"cv01" 3, "cv02" 4', + '"cswh", "smcp" off, "salt" 4', + '"cswh" 1, "smcp" off, "salt" 4', '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', - '"liga" ,"smcp" 0 , "blah"' + '"liga" ,"smcp" 0 , "blah"', ], invalid_values: [ - 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', - 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", - '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', - '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' - ] + "liga", + "liga 1", + "liga normal", + '"liga" normal', + "normal liga", + 'normal "liga"', + 'normal, "liga"', + '"liga=1"', + "'foobar' on", + '"blahblah" 0', + '"liga" 3.14', + '"liga" 1 3.14', + '"liga" 1 normal', + '"liga" 1 off', + '"liga" on off', + '"liga" , 0 "smcp"', + '"liga" "smcp"', + ], }, "font-kerning": { domProp: "fontKerning", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "none" ], - invalid_values: [ "on" ] + initial_values: ["auto"], + other_values: ["normal", "none"], + invalid_values: ["on"], }, "font-language-override": { domProp: "fontLanguageOverride", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], - invalid_values: [ "TRK", "ja" ] + initial_values: ["normal"], + other_values: ["'ENG'", "'TRK'", '"TRK"', "'N\\'Ko'"], + invalid_values: ["TRK", "ja"], }, "font-size": { domProp: "fontSize", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "medium", + initial_values: [ + "medium", "1rem", "calc(1rem)", - "calc(0.75rem + 200% - 125% + 0.25rem - 75%)" + "calc(0.75rem + 200% - 125% + 0.25rem - 75%)", ], - other_values: [ "large", "2em", "50%", "xx-small", "36pt", "8px", "larger", "smaller", + other_values: [ + "large", + "2em", + "50%", + "xx-small", + "36pt", + "8px", + "larger", + "smaller", "0px", "0%", "calc(2em)", "calc(36pt + 75% + (30% + 2em + 2px))", "calc(-2em)", "calc(-50%)", - "calc(-1px)" + "calc(-1px)", ], - invalid_values: [ "-2em", "-50%", "-1px" ], - quirks_values: { "5": "5px" }, + invalid_values: ["-2em", "-50%", "-1px"], + quirks_values: { 5: "5px" }, }, "font-size-adjust": { domProp: "fontSizeAdjust", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "0.3", "0.5", "0.7", "0.0", "0", "3" ], - invalid_values: [ "-0.3", "-1" ] + initial_values: ["none"], + other_values: ["0.3", "0.5", "0.7", "0.0", "0", "3"], + invalid_values: ["-0.3", "-1"], }, "font-stretch": { domProp: "fontStretch", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ], - invalid_values: [ "narrower", "wider" ] + initial_values: ["normal"], + other_values: [ + "ultra-condensed", + "extra-condensed", + "condensed", + "semi-condensed", + "semi-expanded", + "expanded", + "extra-expanded", + "ultra-expanded", + ], + invalid_values: ["narrower", "wider"], }, "font-style": { domProp: "fontStyle", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "italic", "oblique" ], - invalid_values: [] + initial_values: ["normal"], + other_values: ["italic", "oblique"], + invalid_values: [], }, "font-synthesis": { domProp: "fontSynthesis", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "weight style" ], - other_values: [ "none", "weight", "style" ], - invalid_values: [ "weight none", "style none", "none style", "weight 10px", "weight weight", "style style" ] + initial_values: ["weight style"], + other_values: ["none", "weight", "style"], + invalid_values: [ + "weight none", + "style none", + "none style", + "weight 10px", + "weight weight", + "style style", + ], }, "font-variant": { domProp: "fontVariant", inherited: true, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ], - initial_values: [ "normal" ], - other_values: [ "small-caps", "none", "traditional oldstyle-nums", "all-small-caps", "common-ligatures no-discretionary-ligatures", - "proportional-nums oldstyle-nums", "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal", - "traditional historical-forms styleset(ok-alt-a, ok-alt-b)", "styleset(potato)" ], - invalid_values: [ "small-caps normal", "small-caps small-caps", "none common-ligatures", "common-ligatures none", "small-caps potato", - "small-caps jis83 all-small-caps", "super historical-ligatures sub", "stacked-fractions diagonal-fractions historical-ligatures", - "common-ligatures traditional common-ligatures", "lining-nums traditional slashed-zero ordinal normal", - "traditional historical-forms styleset(ok-alt-a, ok-alt-b) historical-forms", - "historical-forms styleset(ok-alt-a, ok-alt-b) traditional styleset(potato)", "annotation(a,b,c)" ] + subproperties: [ + "font-variant-alternates", + "font-variant-caps", + "font-variant-east-asian", + "font-variant-ligatures", + "font-variant-numeric", + "font-variant-position", + ], + initial_values: ["normal"], + other_values: [ + "small-caps", + "none", + "traditional oldstyle-nums", + "all-small-caps", + "common-ligatures no-discretionary-ligatures", + "proportional-nums oldstyle-nums", + "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal", + "traditional historical-forms styleset(ok-alt-a, ok-alt-b)", + "styleset(potato)", + ], + invalid_values: [ + "small-caps normal", + "small-caps small-caps", + "none common-ligatures", + "common-ligatures none", + "small-caps potato", + "small-caps jis83 all-small-caps", + "super historical-ligatures sub", + "stacked-fractions diagonal-fractions historical-ligatures", + "common-ligatures traditional common-ligatures", + "lining-nums traditional slashed-zero ordinal normal", + "traditional historical-forms styleset(ok-alt-a, ok-alt-b) historical-forms", + "historical-forms styleset(ok-alt-a, ok-alt-b) traditional styleset(potato)", + "annotation(a,b,c)", + ], }, "font-variant-alternates": { domProp: "fontVariantAlternates", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "historical-forms", - "styleset(alt-a, alt-b)", "character-variant(a, b, c)", "annotation(circled)", - "swash(squishy)", "styleset(complex\\ blob, a)", "annotation(\\62 lah)" ], - invalid_values: [ "historical-forms normal", "historical-forms historical-forms", - "swash", "swash(3)", "annotation(a, b)", "ornaments(a,b)", - "styleset(1234blah)", "annotation(a), annotation(b)", "annotation(a) normal" ] + initial_values: ["normal"], + other_values: [ + "historical-forms", + "styleset(alt-a, alt-b)", + "character-variant(a, b, c)", + "annotation(circled)", + "swash(squishy)", + "styleset(complex\\ blob, a)", + "annotation(\\62 lah)", + ], + invalid_values: [ + "historical-forms normal", + "historical-forms historical-forms", + "swash", + "swash(3)", + "annotation(a, b)", + "ornaments(a,b)", + "styleset(1234blah)", + "annotation(a), annotation(b)", + "annotation(a) normal", + ], }, - "font-variant-caps": { + "font-variant-caps": { domProp: "fontVariantCaps", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "titling-caps", "unicase" ], - invalid_values: [ "normal small-caps", "petite-caps normal", "unicase unicase" ] + initial_values: ["normal"], + other_values: [ + "small-caps", + "all-small-caps", + "petite-caps", + "all-petite-caps", + "titling-caps", + "unicase", + ], + invalid_values: [ + "normal small-caps", + "petite-caps normal", + "unicase unicase", + ], }, "font-variant-east-asian": { domProp: "fontVariantEastAsian", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "jis78", "jis83", "jis90", "jis04", "simplified", "traditional", "full-width", "proportional-width", "ruby", - "jis78 full-width", "jis78 full-width ruby", "simplified proportional-width", "ruby simplified" ], - invalid_values: [ "jis78 normal", "jis90 jis04", "simplified traditional", "full-width proportional-width", - "ruby simplified ruby", "jis78 ruby simplified" ] + initial_values: ["normal"], + other_values: [ + "jis78", + "jis83", + "jis90", + "jis04", + "simplified", + "traditional", + "full-width", + "proportional-width", + "ruby", + "jis78 full-width", + "jis78 full-width ruby", + "simplified proportional-width", + "ruby simplified", + ], + invalid_values: [ + "jis78 normal", + "jis90 jis04", + "simplified traditional", + "full-width proportional-width", + "ruby simplified ruby", + "jis78 ruby simplified", + ], }, "font-variant-ligatures": { domProp: "fontVariantLigatures", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", - "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual", - "common-ligatures no-discretionary-ligatures", "contextual no-discretionary-ligatures", - "historical-ligatures no-common-ligatures", "no-historical-ligatures discretionary-ligatures", - "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual" ], - invalid_values: [ "common-ligatures normal", "common-ligatures no-common-ligatures", "common-ligatures common-ligatures", - "no-historical-ligatures historical-ligatures", "no-discretionary-ligatures discretionary-ligatures", - "no-contextual contextual", "common-ligatures no-discretionary-ligatures no-common-ligatures", - "common-ligatures none", "no-discretionary-ligatures none", "none common-ligatures" ] + initial_values: ["normal"], + other_values: [ + "none", + "common-ligatures", + "no-common-ligatures", + "discretionary-ligatures", + "no-discretionary-ligatures", + "historical-ligatures", + "no-historical-ligatures", + "contextual", + "no-contextual", + "common-ligatures no-discretionary-ligatures", + "contextual no-discretionary-ligatures", + "historical-ligatures no-common-ligatures", + "no-historical-ligatures discretionary-ligatures", + "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual", + ], + invalid_values: [ + "common-ligatures normal", + "common-ligatures no-common-ligatures", + "common-ligatures common-ligatures", + "no-historical-ligatures historical-ligatures", + "no-discretionary-ligatures discretionary-ligatures", + "no-contextual contextual", + "common-ligatures no-discretionary-ligatures no-common-ligatures", + "common-ligatures none", + "no-discretionary-ligatures none", + "none common-ligatures", + ], }, "font-variant-numeric": { domProp: "fontVariantNumeric", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", - "stacked-fractions", "slashed-zero", "ordinal", "lining-nums diagonal-fractions", - "tabular-nums stacked-fractions", "tabular-nums slashed-zero stacked-fractions", - "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal" ], - invalid_values: [ "lining-nums normal", "lining-nums oldstyle-nums", "lining-nums normal slashed-zero ordinal", - "proportional-nums tabular-nums", "diagonal-fractions stacked-fractions", "slashed-zero diagonal-fractions slashed-zero", - "lining-nums slashed-zero diagonal-fractions oldstyle-nums", "diagonal-fractions diagonal-fractions" ] + initial_values: ["normal"], + other_values: [ + "lining-nums", + "oldstyle-nums", + "proportional-nums", + "tabular-nums", + "diagonal-fractions", + "stacked-fractions", + "slashed-zero", + "ordinal", + "lining-nums diagonal-fractions", + "tabular-nums stacked-fractions", + "tabular-nums slashed-zero stacked-fractions", + "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal", + ], + invalid_values: [ + "lining-nums normal", + "lining-nums oldstyle-nums", + "lining-nums normal slashed-zero ordinal", + "proportional-nums tabular-nums", + "diagonal-fractions stacked-fractions", + "slashed-zero diagonal-fractions slashed-zero", + "lining-nums slashed-zero diagonal-fractions oldstyle-nums", + "diagonal-fractions diagonal-fractions", + ], }, "font-variant-position": { domProp: "fontVariantPosition", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "super", "sub" ], - invalid_values: [ "normal sub", "super sub" ] + initial_values: ["normal"], + other_values: ["super", "sub"], + invalid_values: ["normal sub", "super sub"], }, "font-weight": { domProp: "fontWeight", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal", "400" ], - other_values: [ "bold", "100", "200", "300", "500", "600", "700", "800", "900", "bolder", "lighter" ], - invalid_values: [ "0", "100.0", "107", "399", "401", "699", "710", "1000" ] + initial_values: ["normal", "400"], + other_values: [ + "bold", + "100", + "200", + "300", + "500", + "600", + "700", + "800", + "900", + "bolder", + "lighter", + ], + invalid_values: ["0", "100.0", "107", "399", "401", "699", "710", "1000"], }, - "height": { + height: { domProp: "height", inherited: false, type: CSS_TYPE_LONGHAND, /* FIXME: test zero, and test calc clamping */ - initial_values: [ " auto", + initial_values: [ + " auto", // these four keywords compute to the initial value when the // writing mode is horizontal, and that's the context we're testing in - "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", ], /* computed value tests for height test more with display:block */ - prerequisites: { "display": "block" }, - other_values: [ "15px", "3em", "15%", + prerequisites: { display: "block" }, + other_values: [ + "15px", + "3em", + "15%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "none" ], - quirks_values: { "5": "5px" }, + invalid_values: ["none"], + quirks_values: { 5: "5px" }, }, "ime-mode": { domProp: "imeMode", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "disabled", "active", "inactive" ], - invalid_values: [ "none", "enabled", "1px" ] + initial_values: ["auto"], + other_values: ["normal", "disabled", "active", "inactive"], + invalid_values: ["none", "enabled", "1px"], }, - "left": { + left: { domProp: "left", inherited: false, type: CSS_TYPE_LONGHAND, /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, + prerequisites: { position: "relative" }, /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", + initial_values: ["auto"], + other_values: [ + "32px", + "-3em", + "12%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -3282,19 +5066,28 @@ var gCSSProperties = { "calc(3*25px + 50%)", ], invalid_values: [], - quirks_values: { "5": "5px" }, + quirks_values: { 5: "5px" }, }, "letter-spacing": { domProp: "letterSpacing", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "0", "0px", "1em", "2px", "-3px", - "calc(0px)", "calc(1em)", "calc(1em + 3px)", - "calc(15px / 2)", "calc(15px/2)", "calc(-3px)" + initial_values: ["normal"], + other_values: [ + "0", + "0px", + "1em", + "2px", + "-3px", + "calc(0px)", + "calc(1em)", + "calc(1em + 3px)", + "calc(15px / 2)", + "calc(15px/2)", + "calc(-3px)", ], invalid_values: [], - quirks_values: { "5": "5px" }, + quirks_values: { 5: "5px" }, }, "line-height": { domProp: "lineHeight", @@ -3308,25 +5101,83 @@ var gCSSProperties = { * computation of 'normal'. -moz-block-height requires height * on a block. */ - prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block", "writing-mode": "initial" }, - initial_values: [ "normal" ], - other_values: [ "1.0", "1", "1em", "47px", "-moz-block-height", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", "calc(1 + 2*3/4)" ], - invalid_values: [ "calc(1 + 2px)", "calc(100% + 0.1)" ] + prerequisites: { + "font-size": "19px", + "font-size-adjust": "none", + "font-family": "serif", + "font-weight": "normal", + "font-style": "normal", + height: "18px", + display: "block", + "writing-mode": "initial", + }, + initial_values: ["normal"], + other_values: [ + "1.0", + "1", + "1em", + "47px", + "-moz-block-height", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + "calc(1 + 2*3/4)", + ], + invalid_values: ["calc(1 + 2px)", "calc(100% + 0.1)"], }, "list-style": { domProp: "listStyle", inherited: true, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "list-style-type", "list-style-position", "list-style-image" ], - initial_values: [ "outside", "disc", "disc outside", "outside disc", "disc none", "none disc", "none disc outside", "none outside disc", "disc none outside", "disc outside none", "outside none disc", "outside disc none" ], - other_values: [ "inside none", "none inside", "none none inside", "square", "none", "none none", "outside none none", "none outside none", "none none outside", "none outside", "outside none", "outside outside", "outside inside", "\\32 style", "\\32 style inside", - '"-"', "'-'", "inside '-'", "'-' outside", "none '-'", "inside none '-'", - "symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")", - "symbols(cyclic \"*\" \"\\2020\" \"\\2021\" \"\\A7\")", - "inside symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")", - "symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\") outside", - "none symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")", - "inside none symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")", + subproperties: [ + "list-style-type", + "list-style-position", + "list-style-image", + ], + initial_values: [ + "outside", + "disc", + "disc outside", + "outside disc", + "disc none", + "none disc", + "none disc outside", + "none outside disc", + "disc none outside", + "disc outside none", + "outside none disc", + "outside disc none", + ], + other_values: [ + "inside none", + "none inside", + "none none inside", + "square", + "none", + "none none", + "outside none none", + "none outside none", + "none none outside", + "none outside", + "outside none", + "outside outside", + "outside inside", + "\\32 style", + "\\32 style inside", + '"-"', + "'-'", + "inside '-'", + "'-' outside", + "none '-'", + "inside none '-'", + 'symbols("*" "\\2020" "\\2021" "\\A7")', + 'symbols(cyclic "*" "\\2020" "\\2021" "\\A7")', + 'inside symbols("*" "\\2020" "\\2021" "\\A7")', + 'symbols("*" "\\2020" "\\2021" "\\A7") outside', + 'none symbols("*" "\\2020" "\\2021" "\\A7")', + 'inside none symbols("*" "\\2020" "\\2021" "\\A7")', 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none', @@ -3337,91 +5188,159 @@ var gCSSProperties = { 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside', 'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none', - 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside' + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside', + ], + invalid_values: [ + "disc disc", + "unknown value", + "none none none", + "none disc url(404.png)", + "none url(404.png) disc", + "disc none url(404.png)", + "disc url(404.png) none", + "url(404.png) none disc", + "url(404.png) disc none", + "none disc outside url(404.png)", ], - invalid_values: [ "disc disc", "unknown value", "none none none", "none disc url(404.png)", "none url(404.png) disc", "disc none url(404.png)", "disc url(404.png) none", "url(404.png) none disc", "url(404.png) disc none", "none disc outside url(404.png)" ] }, "list-style-image": { domProp: "listStyleImage", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + initial_values: ["none"], + other_values: [ + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', // Add some tests for interesting url() values here to test serialization, etc. "url(\'data:text/plain,\"\')", - "url(\"data:text/plain,\'\")", + 'url("data:text/plain,\'")', "url(\'data:text/plain,\\\'\')", - "url(\"data:text/plain,\\\"\")", + 'url("data:text/plain,\\"")', "url(\'data:text/plain,\\\"\')", - "url(\"data:text/plain,\\\'\")", + 'url("data:text/plain,\\\'")', "url(data:text/plain,\\\\)", ], - invalid_values: [] + invalid_values: [], }, "list-style-position": { domProp: "listStylePosition", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "outside" ], - other_values: [ "inside" ], - invalid_values: [] + initial_values: ["outside"], + other_values: ["inside"], + invalid_values: [], }, "list-style-type": { domProp: "listStyleType", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "disc" ], - other_values: [ "none", "circle", "square", - "disclosure-closed", "disclosure-open", - "decimal", "decimal-leading-zero", - "lower-roman", "upper-roman", "lower-greek", - "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", - "hebrew", "armenian", "georgian", - "cjk-decimal", "cjk-ideographic", - "hiragana", "katakana", "hiragana-iroha", "katakana-iroha", - "japanese-informal", "japanese-formal", "korean-hangul-formal", - "korean-hanja-informal", "korean-hanja-formal", - "simp-chinese-informal", "simp-chinese-formal", - "trad-chinese-informal", "trad-chinese-formal", + initial_values: ["disc"], + other_values: [ + "none", + "circle", + "square", + "disclosure-closed", + "disclosure-open", + "decimal", + "decimal-leading-zero", + "lower-roman", + "upper-roman", + "lower-greek", + "lower-alpha", + "lower-latin", + "upper-alpha", + "upper-latin", + "hebrew", + "armenian", + "georgian", + "cjk-decimal", + "cjk-ideographic", + "hiragana", + "katakana", + "hiragana-iroha", + "katakana-iroha", + "japanese-informal", + "japanese-formal", + "korean-hangul-formal", + "korean-hanja-informal", + "korean-hanja-formal", + "simp-chinese-informal", + "simp-chinese-formal", + "trad-chinese-informal", + "trad-chinese-formal", "ethiopic-numeric", - "-moz-cjk-heavenly-stem", "-moz-cjk-earthly-branch", - "-moz-trad-chinese-informal", "-moz-trad-chinese-formal", - "-moz-simp-chinese-informal", "-moz-simp-chinese-formal", - "-moz-japanese-informal", "-moz-japanese-formal", - "-moz-arabic-indic", "-moz-persian", "-moz-urdu", - "-moz-devanagari", "-moz-gurmukhi", "-moz-gujarati", - "-moz-oriya", "-moz-kannada", "-moz-malayalam", "-moz-bengali", - "-moz-tamil", "-moz-telugu", "-moz-thai", "-moz-lao", - "-moz-myanmar", "-moz-khmer", - "-moz-hangul", "-moz-hangul-consonant", - "-moz-ethiopic-halehame", "-moz-ethiopic-numeric", + "-moz-cjk-heavenly-stem", + "-moz-cjk-earthly-branch", + "-moz-trad-chinese-informal", + "-moz-trad-chinese-formal", + "-moz-simp-chinese-informal", + "-moz-simp-chinese-formal", + "-moz-japanese-informal", + "-moz-japanese-formal", + "-moz-arabic-indic", + "-moz-persian", + "-moz-urdu", + "-moz-devanagari", + "-moz-gurmukhi", + "-moz-gujarati", + "-moz-oriya", + "-moz-kannada", + "-moz-malayalam", + "-moz-bengali", + "-moz-tamil", + "-moz-telugu", + "-moz-thai", + "-moz-lao", + "-moz-myanmar", + "-moz-khmer", + "-moz-hangul", + "-moz-hangul-consonant", + "-moz-ethiopic-halehame", + "-moz-ethiopic-numeric", "-moz-ethiopic-halehame-am", - "-moz-ethiopic-halehame-ti-er", "-moz-ethiopic-halehame-ti-et", - "other-style", "inside", "outside", "\\32 style", - '"-"', "'-'", - "symbols(\"*\" \"\\2020\" \"\\2021\" \"\\A7\")", - "symbols(cyclic '*' '\\2020' '\\2021' '\\A7')" + "-moz-ethiopic-halehame-ti-er", + "-moz-ethiopic-halehame-ti-et", + "other-style", + "inside", + "outside", + "\\32 style", + '"-"', + "'-'", + 'symbols("*" "\\2020" "\\2021" "\\A7")', + "symbols(cyclic '*' '\\2020' '\\2021' '\\A7')", ], - invalid_values: [] + invalid_values: [], }, - "margin": { + margin: { domProp: "margin", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "margin-top", "margin-right", "margin-bottom", "margin-left" ], - initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt" ], - other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px", "1em calc(2em + 3px) 4ex 5cm" ], - invalid_values: [ "1px calc(nonsense)", "1px red" ], - unbalanced_values: [ "1px calc(" ], - quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, + subproperties: [ + "margin-top", + "margin-right", + "margin-bottom", + "margin-left", + ], + initial_values: ["0", "0px 0 0em", "0% 0px 0em 0pt"], + other_values: [ + "3px 0", + "2em 4px 2pt", + "1em 2em 3px 4px", + "1em calc(2em + 3px) 4ex 5cm", + ], + invalid_values: ["1px calc(nonsense)", "1px red"], + unbalanced_values: ["1px calc("], + quirks_values: { 5: "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, }, "margin-bottom": { domProp: "marginBottom", inherited: false, type: CSS_TYPE_LONGHAND, /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", + initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -3429,16 +5348,30 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, "margin-left": { domProp: "marginLeft", inherited: false, type: CSS_TYPE_LONGHAND, /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", ".5px", "+32px", "+.789px", "-.328px", "+0.56px", "-0.974px", "237px", "-289px", "-056px", "1987.45px", "-84.32px", + initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"], + other_values: [ + "1px", + "2em", + "5%", + ".5px", + "+32px", + "+.789px", + "-.328px", + "+0.56px", + "-0.974px", + "237px", + "-289px", + "-056px", + "1987.45px", + "-84.32px", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -3446,16 +5379,32 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], - quirks_values: { "5": "5px" }, + invalid_values: [ + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], + quirks_values: { 5: "5px" }, }, "margin-right": { domProp: "marginRight", inherited: false, type: CSS_TYPE_LONGHAND, /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", + initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -3463,16 +5412,19 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, "margin-top": { domProp: "marginTop", inherited: false, type: CSS_TYPE_LONGHAND, /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", + initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -3480,20 +5432,27 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, "max-height": { domProp: "maxHeight", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "none", + prerequisites: { display: "block" }, + initial_values: [ + "none", // these four keywords compute to the initial value when the // writing mode is horizontal, and that's the context we're testing in - "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", ], - other_values: [ "30px", "50%", "0", + other_values: [ + "30px", + "50%", + "0", "calc(2px)", "calc(-2px)", "calc(0px)", @@ -3502,20 +5461,26 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "auto" ], - quirks_values: { "5": "5px" }, + invalid_values: ["auto"], + quirks_values: { 5: "5px" }, }, "max-width": { domProp: "maxWidth", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "none" ], - other_values: [ "30px", "50%", "0", + prerequisites: { display: "block" }, + initial_values: ["none"], + other_values: [ + "30px", + "50%", + "0", // these four keywords compute to the initial value only when the // writing mode is vertical, and we're testing with a horizontal // writing mode - "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", "calc(2px)", "calc(-2px)", "calc(0px)", @@ -3524,20 +5489,29 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "auto" ], - quirks_values: { "5": "5px" }, + invalid_values: ["auto"], + quirks_values: { 5: "5px" }, }, "min-height": { domProp: "minHeight", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)", + prerequisites: { display: "block" }, + initial_values: [ + "auto", + "0", + "calc(0em)", + "calc(-2px)", // these four keywords compute to the initial value when the // writing mode is horizontal, and that's the context we're testing in - "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", ], - other_values: [ "30px", "50%", + other_values: [ + "30px", + "50%", "calc(-1%)", "calc(2px)", "calc(50%)", @@ -3546,19 +5520,24 @@ var gCSSProperties = { "calc(3*25px + 50%)", ], invalid_values: ["none"], - quirks_values: { "5": "5px" }, + quirks_values: { 5: "5px" }, }, "min-width": { domProp: "minWidth", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block" }, - initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)" ], - other_values: [ "30px", "50%", + prerequisites: { display: "block" }, + initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"], + other_values: [ + "30px", + "50%", // these four keywords compute to the initial value only when the // writing mode is vertical, and we're testing with a horizontal // writing mode - "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", "calc(-1%)", "calc(2px)", "calc(50%)", @@ -3566,73 +5545,126 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "none" ], - quirks_values: { "5": "5px" }, + invalid_values: ["none"], + quirks_values: { 5: "5px" }, }, - "opacity": { + opacity: { domProp: "opacity", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "17", "397.376", "3e1", "3e+1", "3e0", "3e+0", "3e-0" ], - other_values: [ "0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%" ], - invalid_values: [ "0px", "1px" ] + initial_values: [ + "1", + "17", + "397.376", + "3e1", + "3e+1", + "3e0", + "3e+0", + "3e-0", + ], + other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"], + invalid_values: ["0px", "1px"], }, "-moz-orient": { domProp: "MozOrient", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "inline" ], - other_values: [ "horizontal", "vertical", "block" ], - invalid_values: [ "none" ] + initial_values: ["inline"], + other_values: ["horizontal", "vertical", "block"], + invalid_values: ["none"], }, - "outline": { + outline: { domProp: "outline", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "outline-color", "outline-style", "outline-width" ], + subproperties: ["outline-color", "outline-style", "outline-width"], initial_values: [ - "none", "medium", "thin", + "none", + "medium", + "thin", // XXX Should be invert, but currently currentcolor. //"invert", "none medium invert" - "currentColor", "none medium currentcolor" + "currentColor", + "none medium currentcolor", ], - other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid" ], - invalid_values: [ "5%", "5", "5 solid green" ] + other_values: [ + "solid", + "medium solid", + "green solid", + "10px solid", + "thick solid", + ], + invalid_values: ["5%", "5", "5 solid green"], }, "outline-color": { domProp: "outlineColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor" ], // XXX should be invert - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000", "cc00ff" ] + prerequisites: { color: "black" }, + initial_values: ["currentColor"], // XXX should be invert + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: [ + "#0", + "#00", + "#00000", + "#0000000", + "#000000000", + "000000", + "cc00ff", + ], }, "outline-offset": { domProp: "outlineOffset", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "-0", "calc(0px)", "calc(3em + 2px - 2px - 3em)", "calc(-0em)" ], - other_values: [ "-3px", "1em", "calc(3em)", "calc(7pt + 3 * 2em)", "calc(-3px)" ], - invalid_values: [ "5%" ] + initial_values: [ + "0", + "0px", + "-0", + "calc(0px)", + "calc(3em + 2px - 2px - 3em)", + "calc(-0em)", + ], + other_values: [ + "-3px", + "1em", + "calc(3em)", + "calc(7pt + 3 * 2em)", + "calc(-3px)", + ], + invalid_values: ["5%"], }, "outline-style": { domProp: "outlineStyle", inherited: false, type: CSS_TYPE_LONGHAND, // XXX Should 'hidden' be the same as initial? - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge", "auto" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + "auto", + ], + invalid_values: [], }, "outline-width": { domProp: "outlineWidth", inherited: false, type: CSS_TYPE_LONGHAND, prerequisites: { "outline-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0px)", @@ -3642,166 +5674,242 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%", "5" ] + invalid_values: ["5%", "5"], }, - "overflow": { + overflow: { domProp: "overflow", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - prerequisites: { "display": "block", "contain": "none" }, - subproperties: [ "overflow-x", "overflow-y" ], - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "clip", "-moz-scrollbars-none" ], - invalid_values: [] + prerequisites: { display: "block", contain: "none" }, + subproperties: ["overflow-x", "overflow-y"], + initial_values: ["visible"], + other_values: ["auto", "scroll", "hidden", "clip", "-moz-scrollbars-none"], + invalid_values: [], }, "overflow-x": { domProp: "overflowX", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow-y": "visible", "contain": "none" }, - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "clip" ], - invalid_values: [] + prerequisites: { + display: "block", + "overflow-y": "visible", + contain: "none", + }, + initial_values: ["visible"], + other_values: ["auto", "scroll", "hidden", "clip"], + invalid_values: [], }, "overflow-y": { domProp: "overflowY", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "display": "block", "overflow-x": "visible", "contain": "none" }, - initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "clip" ], - invalid_values: [] + prerequisites: { + display: "block", + "overflow-x": "visible", + contain: "none", + }, + initial_values: ["visible"], + other_values: ["auto", "scroll", "hidden", "clip"], + invalid_values: [], }, - "padding": { + padding: { domProp: "padding", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "padding-top", "padding-right", "padding-bottom", "padding-left" ], - initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt", "calc(0px) calc(0em) calc(-2px) calc(-1%)" ], - other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ], - invalid_values: [ "1px calc(nonsense)", "1px red" ], - unbalanced_values: [ "1px calc(" ], - quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, + subproperties: [ + "padding-top", + "padding-right", + "padding-bottom", + "padding-left", + ], + initial_values: [ + "0", + "0px 0 0em", + "0% 0px 0em 0pt", + "calc(0px) calc(0em) calc(-2px) calc(-1%)", + ], + other_values: ["3px 0", "2em 4px 2pt", "1em 2em 3px 4px"], + invalid_values: ["1px calc(nonsense)", "1px red"], + unbalanced_values: ["1px calc("], + quirks_values: { 5: "5px", "3px 6px 2 5px": "3px 6px 2px 5px" }, }, "padding-bottom": { domProp: "paddingBottom", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "calc(0pt)", + "calc(0% + 0px)", + "calc(-3px)", + "calc(-1%)", + ], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, "padding-left": { domProp: "paddingLeft", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "calc(0pt)", + "calc(0% + 0px)", + "calc(-3px)", + "calc(-1%)", + ], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, "padding-right": { domProp: "paddingRight", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "calc(0pt)", + "calc(0% + 0px)", + "calc(-3px)", + "calc(-1%)", + ], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, "padding-top": { domProp: "paddingTop", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "calc(0pt)", + "calc(0% + 0px)", + "calc(-3px)", + "calc(-1%)", + ], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, "page-break-after": { domProp: "pageBreakAfter", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "always", "avoid", "left", "right" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["always", "avoid", "left", "right"], + invalid_values: [], }, "page-break-before": { domProp: "pageBreakBefore", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "always", "avoid", "left", "right" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["always", "avoid", "left", "right"], + invalid_values: [], }, "page-break-inside": { domProp: "pageBreakInside", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "avoid" ], - invalid_values: [ "left", "right" ] + initial_values: ["auto"], + other_values: ["avoid"], + invalid_values: ["left", "right"], }, "pointer-events": { domProp: "pointerEvents", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "visiblePainted", "visibleFill", "visibleStroke", "visible", - "painted", "fill", "stroke", "all", "none" ], - invalid_values: [] + initial_values: ["auto"], + other_values: [ + "visiblePainted", + "visibleFill", + "visibleStroke", + "visible", + "painted", + "fill", + "stroke", + "all", + "none", + ], + invalid_values: [], }, - "position": { + position: { domProp: "position", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "static" ], - other_values: [ "relative", "absolute", "fixed", "sticky" ], - invalid_values: [] + initial_values: ["static"], + other_values: ["relative", "absolute", "fixed", "sticky"], + invalid_values: [], }, - "quotes": { + quotes: { domProp: "quotes", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ '"\u201C" "\u201D" "\u2018" "\u2019"', - '"\\201C" "\\201D" "\\2018" "\\2019"' ], - other_values: [ "none", "'\"' '\"'" ], - invalid_values: [] + initial_values: [ + '"\u201C" "\u201D" "\u2018" "\u2019"', + '"\\201C" "\\201D" "\\2018" "\\2019"', + ], + other_values: ["none", "'\"' '\"'"], + invalid_values: [], }, - "right": { + right: { domProp: "right", inherited: false, type: CSS_TYPE_LONGHAND, /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, + prerequisites: { position: "relative" }, /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", + initial_values: ["auto"], + other_values: [ + "32px", + "-3em", + "12%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -3810,134 +5918,280 @@ var gCSSProperties = { "calc(3*25px + 50%)", ], invalid_values: [], - quirks_values: { "5": "5px" }, + quirks_values: { 5: "5px" }, }, "ruby-align": { domProp: "rubyAlign", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "space-around" ], - other_values: [ "start", "center", "space-between" ], - invalid_values: [ - "end", "1", "10px", "50%", "start center" - ] + initial_values: ["space-around"], + other_values: ["start", "center", "space-between"], + invalid_values: ["end", "1", "10px", "50%", "start center"], }, "ruby-position": { domProp: "rubyPosition", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "over" ], - other_values: [ "under" ], + initial_values: ["over"], + other_values: ["under"], invalid_values: [ - "left", "right", "auto", "none", "not_a_position", - "over left", "right under", "0", "100px", "50%" - ] + "left", + "right", + "auto", + "none", + "not_a_position", + "over left", + "right under", + "0", + "100px", + "50%", + ], }, "table-layout": { domProp: "tableLayout", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "fixed" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["fixed"], + invalid_values: [], }, "text-align": { domProp: "textAlign", inherited: true, type: CSS_TYPE_LONGHAND, // don't know whether left and right are same as start - initial_values: [ "start" ], - other_values: [ "center", "justify", "end", "match-parent" ], - invalid_values: [ "true", "true true" ] + initial_values: ["start"], + other_values: ["center", "justify", "end", "match-parent"], + invalid_values: ["true", "true true"], }, "text-align-last": { domProp: "textAlignLast", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "center", "justify", "start", "end", "left", "right" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["center", "justify", "start", "end", "left", "right"], + invalid_values: [], }, "text-decoration": { domProp: "textDecoration", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - subproperties: [ "text-decoration-color", "text-decoration-line", "text-decoration-style" ], - initial_values: [ "none" ], - other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration", - "underline red solid", "underline #ff0000", "solid underline", "red underline", "#ff0000 underline", "dotted underline" ], - invalid_values: [ "none none", "underline none", "none underline", "blink none", "none blink", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink", "rgb(0, rubbish, 0) underline" ] + subproperties: [ + "text-decoration-color", + "text-decoration-line", + "text-decoration-style", + ], + initial_values: ["none"], + other_values: [ + "underline", + "overline", + "line-through", + "blink", + "blink line-through underline", + "underline overline line-through blink", + "-moz-anchor-decoration", + "blink -moz-anchor-decoration", + "underline red solid", + "underline #ff0000", + "solid underline", + "red underline", + "#ff0000 underline", + "dotted underline", + ], + invalid_values: [ + "none none", + "underline none", + "none underline", + "blink none", + "none blink", + "line-through blink line-through", + "underline overline line-through blink none", + "underline overline line-throuh blink blink", + "rgb(0, rubbish, 0) underline", + ], }, "text-decoration-color": { domProp: "textDecorationColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000", "ff00ff" ] + prerequisites: { color: "black" }, + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: [ + "#0", + "#00", + "#00000", + "#0000000", + "#000000000", + "000000", + "ff00ff", + ], }, "text-decoration-line": { domProp: "textDecorationLine", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ], - invalid_values: [ "none none", "underline none", "none underline", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink" ] + initial_values: ["none"], + other_values: [ + "underline", + "overline", + "line-through", + "blink", + "blink line-through underline", + "underline overline line-through blink", + "-moz-anchor-decoration", + "blink -moz-anchor-decoration", + ], + invalid_values: [ + "none none", + "underline none", + "none underline", + "line-through blink line-through", + "underline overline line-through blink none", + "underline overline line-throuh blink blink", + ], }, "text-decoration-style": { domProp: "textDecorationStyle", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "solid" ], - other_values: [ "double", "dotted", "dashed", "wavy", "-moz-none" ], - invalid_values: [ "none", "groove", "ridge", "inset", "outset", "solid dashed", "wave" ] + initial_values: ["solid"], + other_values: ["double", "dotted", "dashed", "wavy", "-moz-none"], + invalid_values: [ + "none", + "groove", + "ridge", + "inset", + "outset", + "solid dashed", + "wave", + ], }, "text-emphasis": { domProp: "textEmphasis", inherited: true, type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "color": "black" }, - subproperties: [ "text-emphasis-style", "text-emphasis-color" ], - initial_values: [ "none currentColor", "currentColor none", "none", "currentColor", "none black" ], - other_values: [ "filled dot black", "#f00 circle open", "sesame filled rgba(0,0,255,0.5)", "red", "green none", "currentColor filled", "currentColor open" ], - invalid_values: [ "filled black dot", "filled filled red", "open open circle #000", "circle dot #f00", "rubbish" ] + prerequisites: { color: "black" }, + subproperties: ["text-emphasis-style", "text-emphasis-color"], + initial_values: [ + "none currentColor", + "currentColor none", + "none", + "currentColor", + "none black", + ], + other_values: [ + "filled dot black", + "#f00 circle open", + "sesame filled rgba(0,0,255,0.5)", + "red", + "green none", + "currentColor filled", + "currentColor open", + ], + invalid_values: [ + "filled black dot", + "filled filled red", + "open open circle #000", + "circle dot #f00", + "rubbish", + ], }, "text-emphasis-color": { domProp: "textEmphasisColor", inherited: true, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor", "black", "rgb(0,0,0)" ], - other_values: [ "red", "rgba(255,255,255,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000", "ff00ff", "rgb(255,xxx,255)" ] + prerequisites: { color: "black" }, + initial_values: ["currentColor", "black", "rgb(0,0,0)"], + other_values: ["red", "rgba(255,255,255,0.5)", "transparent"], + invalid_values: [ + "#0", + "#00", + "#00000", + "#0000000", + "#000000000", + "000000", + "ff00ff", + "rgb(255,xxx,255)", + ], }, "text-emphasis-position": { domProp: "textEmphasisPosition", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "over right", "right over" ], - other_values: [ "over left", "left over", "under left", "left under", "under right", "right under" ], - invalid_values: [ "over over", "left left", "over right left", "rubbish left", "over rubbish" ] + initial_values: ["over right", "right over"], + other_values: [ + "over left", + "left over", + "under left", + "left under", + "under right", + "right under", + ], + invalid_values: [ + "over over", + "left left", + "over right left", + "rubbish left", + "over rubbish", + ], }, "text-emphasis-style": { domProp: "textEmphasisStyle", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "filled", "open", "dot", "circle", "double-circle", "triangle", "sesame", "'#'", - "filled dot", "filled circle", "filled double-circle", "filled triangle", "filled sesame", - "dot filled", "circle filled", "double-circle filled", "triangle filled", "sesame filled", - "dot open", "circle open", "double-circle open", "triangle open", "sesame open" ], - invalid_values: [ "rubbish", "dot rubbish", "rubbish dot", "open rubbish", "rubbish open", "open filled", "dot circle", - "open '#'", "'#' filled", "dot '#'", "'#' circle", "1", "1 open", "open 1" ] + initial_values: ["none"], + other_values: [ + "filled", + "open", + "dot", + "circle", + "double-circle", + "triangle", + "sesame", + "'#'", + "filled dot", + "filled circle", + "filled double-circle", + "filled triangle", + "filled sesame", + "dot filled", + "circle filled", + "double-circle filled", + "triangle filled", + "sesame filled", + "dot open", + "circle open", + "double-circle open", + "triangle open", + "sesame open", + ], + invalid_values: [ + "rubbish", + "dot rubbish", + "rubbish dot", + "open rubbish", + "rubbish open", + "open filled", + "dot circle", + "open '#'", + "'#' filled", + "dot '#'", + "'#' circle", + "1", + "1 open", + "open 1", + ], }, "text-indent": { domProp: "textIndent", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "calc(3em - 5em + 2px + 2em - 2px)" ], - other_values: [ "2em", "5%", "-10px", + initial_values: ["0", "calc(3em - 5em + 2px + 2em - 2px)"], + other_values: [ + "2em", + "5%", + "-10px", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -3945,26 +6199,56 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, "text-overflow": { domProp: "textOverflow", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "clip" ], - other_values: [ "ellipsis", '""', "''", '"hello"', 'clip clip', 'ellipsis ellipsis', 'clip ellipsis', 'clip ""', '"hello" ""', '"" ellipsis' ], - invalid_values: [ "none", "auto", '"hello" inherit', 'inherit "hello"', 'clip initial', 'initial clip', 'initial inherit', 'inherit initial', 'inherit none'] + initial_values: ["clip"], + other_values: [ + "ellipsis", + '""', + "''", + '"hello"', + "clip clip", + "ellipsis ellipsis", + "clip ellipsis", + 'clip ""', + '"hello" ""', + '"" ellipsis', + ], + invalid_values: [ + "none", + "auto", + '"hello" inherit', + 'inherit "hello"', + "clip initial", + "initial clip", + "initial inherit", + "inherit initial", + "inherit none", + ], }, "text-shadow": { domProp: "textShadow", inherited: true, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "none" ], - other_values: [ "2px 2px", "2px 2px 1px", "2px 2px green", "2px 2px 1px green", "green 2px 2px", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px", + prerequisites: { color: "blue" }, + initial_values: ["none"], + other_values: [ + "2px 2px", + "2px 2px 1px", + "2px 2px green", + "2px 2px 1px green", + "green 2px 2px", + "green 2px 2px 1px", + "green 2px 2px, blue 1px 3px 4px", + "currentColor 3px 3px", + "blue 2px 2px, currentColor 1px 2px", /* calc() values */ - "2px 2px calc(-5px)", /* clamped */ + "2px 2px calc(-5px)" /* clamped */, "calc(3em - 2px) 2px green", "green calc(3em - 2px) 2px", "2px calc(2px + 0.2em)", @@ -3975,27 +6259,42 @@ var gCSSProperties = { "calc(2px) calc(2px)", "calc(2px) calc(2px) calc(2px)", ], - invalid_values: [ "3% 3%", "2px 2px -5px", "2px 2px 2px 2px", "2px 2px, none", "none, 2px 2px", "inherit, 2px 2px", "2px 2px, inherit", "2 2px", "2px 2", "2px 2px 2", "2px 2px 2px 2", - "calc(2px) calc(2px) calc(2px) calc(2px)", "3px 3px calc(3px + rubbish)" - ] + invalid_values: [ + "3% 3%", + "2px 2px -5px", + "2px 2px 2px 2px", + "2px 2px, none", + "none, 2px 2px", + "inherit, 2px 2px", + "2px 2px, inherit", + "2 2px", + "2px 2", + "2px 2px 2", + "2px 2px 2px 2", + "calc(2px) calc(2px) calc(2px) calc(2px)", + "3px 3px calc(3px + rubbish)", + ], }, "text-transform": { domProp: "textTransform", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "capitalize", "uppercase", "lowercase", "full-width" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["capitalize", "uppercase", "lowercase", "full-width"], + invalid_values: [], }, - "top": { + top: { domProp: "top", inherited: false, type: CSS_TYPE_LONGHAND, /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, + prerequisites: { position: "relative" }, /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", + initial_values: ["auto"], + other_values: [ + "32px", + "-3em", + "12%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -4004,63 +6303,215 @@ var gCSSProperties = { "calc(3*25px + 50%)", ], invalid_values: [], - quirks_values: { "5": "5px" }, + quirks_values: { 5: "5px" }, }, - "transition": { + transition: { domProp: "transition", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], - initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ], - other_values: [ "all 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) 0s", "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all", "3s --my-color" ], - invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial", "1s width,,2s color", "1s width, ,2s color", "bounce 1s cubic-bezier(0, rubbish) 2s", "bounce 1s steps(rubbish) 2s" ] + subproperties: [ + "transition-property", + "transition-duration", + "transition-timing-function", + "transition-delay", + ], + initial_values: ["all 0s ease 0s", "all", "0s", "0s 0s", "ease"], + other_values: [ + "all 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) 0s", + "width 1s linear 2s", + "width 1s 2s linear", + "width linear 1s 2s", + "linear width 1s 2s", + "linear 1s width 2s", + "linear 1s 2s width", + "1s width linear 2s", + "1s width 2s linear", + "1s 2s width linear", + "1s linear width 2s", + "1s linear 2s width", + "1s 2s linear width", + "width linear 1s", + "width 1s linear", + "linear width 1s", + "linear 1s width", + "1s width linear", + "1s linear width", + "1s 2s width", + "1s width 2s", + "width 1s 2s", + "1s 2s linear", + "1s linear 2s", + "linear 1s 2s", + "width 1s", + "1s width", + "linear 1s", + "1s linear", + "1s 2s", + "2s 1s", + "width", + "linear", + "1s", + "height", + "2s", + "ease-in-out", + "2s ease-in", + "opacity linear", + "ease-out 2s", + "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", + "1s \\32width linear 2s", + "1s -width linear 2s", + "1s -\\32width linear 2s", + "1s \\32 0width linear 2s", + "1s -\\32 0width linear 2s", + "1s \\2width linear 2s", + "1s -\\2width linear 2s", + "2s, 1s width", + "1s width, 2s", + "2s all, 1s width", + "1s width, 2s all", + "2s all, 1s width", + "2s width, 1s all", + "3s --my-color", + ], + invalid_values: [ + "1s width, 2s none", + "2s none, 1s width", + "2s inherit", + "inherit 2s", + "2s width, 1s inherit", + "2s inherit, 1s width", + "2s initial", + "1s width,,2s color", + "1s width, ,2s color", + "bounce 1s cubic-bezier(0, rubbish) 2s", + "bounce 1s steps(rubbish) 2s", + ], }, "transition-delay": { domProp: "transitionDelay", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px" ] + initial_values: ["0s", "0ms"], + other_values: ["1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"], + invalid_values: ["0", "0px"], }, "transition-duration": { domProp: "transitionDuration", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0s", "0ms" ], - other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"], - invalid_values: [ "0", "0px", "-1ms", "-2s" ] + initial_values: ["0s", "0ms"], + other_values: ["1s", "250ms", "1s, 250ms, 2.3s"], + invalid_values: ["0", "0px", "-1ms", "-2s"], }, "transition-property": { domProp: "transitionProperty", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "all" ], - other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all", "--my-color" ], - invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ] + initial_values: ["all"], + other_values: [ + "none", + "left", + "top", + "color", + "width, height, opacity", + "foobar", + "auto", + "\\32width", + "-width", + "-\\32width", + "\\32 0width", + "-\\32 0width", + "\\2width", + "-\\2width", + "all, all", + "all, color", + "color, all", + "--my-color", + ], + invalid_values: [ + "none, none", + "color, none", + "none, color", + "inherit, color", + "color, inherit", + "initial, color", + "color, initial", + "none, color", + "color, none", + ], }, "transition-timing-function": { domProp: "transitionTimingFunction", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "ease" ], - other_values: [ "cubic-bezier(0.25, 0.1, 0.25, 1.0)", "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], - invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + initial_values: ["ease"], + other_values: [ + "cubic-bezier(0.25, 0.1, 0.25, 1.0)", + "linear", + "ease-in", + "ease-out", + "ease-in-out", + "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", + "cubic-bezier(0.5, 0.5, 0.5, 0.5)", + "cubic-bezier(0.25, 1.5, 0.75, -0.5)", + "step-start", + "step-end", + "steps(1)", + "steps(2, start)", + "steps(386)", + "steps(3, end)", + ], + invalid_values: [ + "none", + "auto", + "cubic-bezier(0.25, 0.1, 0.25)", + "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", + "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", + "cubic-bezier(1.5, 0.5, 0.5, 0.5)", + "cubic-bezier(0.5, 0.5, -0.5, 0.5)", + "cubic-bezier(0.5, 0.5, 1.5, 0.5)", + "steps(2, step-end)", + "steps(0)", + "steps(-2)", + "steps(0, step-end, 1)", + ], }, "unicode-bidi": { domProp: "unicodeBidi", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "embed", "bidi-override", "isolate", "plaintext", "isolate-override", "-moz-isolate", "-moz-plaintext", "-moz-isolate-override" ], - invalid_values: [ "auto", "none" ] + initial_values: ["normal"], + other_values: [ + "embed", + "bidi-override", + "isolate", + "plaintext", + "isolate-override", + "-moz-isolate", + "-moz-plaintext", + "-moz-isolate-override", + ], + invalid_values: ["auto", "none"], }, "vertical-align": { domProp: "verticalAlign", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "baseline" ], - other_values: [ "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom", "-moz-middle-with-baseline", "15%", "3px", "0.2em", "-5px", "-3%", + initial_values: ["baseline"], + other_values: [ + "sub", + "super", + "top", + "text-top", + "middle", + "bottom", + "text-bottom", + "-moz-middle-with-baseline", + "15%", + "3px", + "0.2em", + "-5px", + "-3%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -4068,46 +6519,78 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], - quirks_values: { "5": "5px" }, + invalid_values: [], + quirks_values: { 5: "5px" }, }, - "visibility": { + visibility: { domProp: "visibility", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "visible" ], - other_values: [ "hidden", "collapse" ], - invalid_values: [] + initial_values: ["visible"], + other_values: ["hidden", "collapse"], + invalid_values: [], }, "white-space": { domProp: "whiteSpace", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "pre", "nowrap", "pre-wrap", "pre-line", "-moz-pre-space", "break-spaces" ], - invalid_values: [] + initial_values: ["normal"], + other_values: [ + "pre", + "nowrap", + "pre-wrap", + "pre-line", + "-moz-pre-space", + "break-spaces", + ], + invalid_values: [], }, - "width": { + width: { domProp: "width", inherited: false, type: CSS_TYPE_LONGHAND, /* computed value tests for width test more with display:block */ - prerequisites: { "display": "block" }, - initial_values: [ " auto" ], + prerequisites: { display: "block" }, + initial_values: [" auto"], /* XXX these have prerequisites */ - other_values: [ "15px", "3em", "15%", + other_values: [ + "15px", + "3em", + "15%", // these three keywords compute to the initial value only when the // writing mode is vertical, and we're testing with a horizontal // writing mode - "-moz-max-content", "-moz-min-content", "-moz-fit-content", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", // whether -moz-available computes to the initial value depends on // the container size, and for the container size we're testing // with, it does // "-moz-available", - "3e1px", "3e+1px", "3e0px", "3e+0px", "3e-0px", "3e-1px", - "3.2e1px", "3.2e+1px", "3.2e0px", "3.2e+0px", "3.2e-0px", "3.2e-1px", - "3e1%", "3e+1%", "3e0%", "3e+0%", "3e-0%", "3e-1%", - "3.2e1%", "3.2e+1%", "3.2e0%", "3.2e+0%", "3.2e-0%", "3.2e-1%", + "3e1px", + "3e+1px", + "3e0px", + "3e+0px", + "3e-0px", + "3e-1px", + "3.2e1px", + "3.2e+1px", + "3.2e0px", + "3.2e+0px", + "3.2e-0px", + "3.2e-1px", + "3e1%", + "3e+1%", + "3e0%", + "3e+0%", + "3e-0%", + "3e-1%", + "3.2e1%", + "3.2e+1%", + "3.2e0%", + "3.2e+0%", + "3.2e-0%", + "3.2e-1%", /* valid -moz-calc() values */ "-moz-calc(-2px)", "-moz-calc(2px)", @@ -4161,7 +6644,9 @@ var gCSSProperties = { "calc(50px/2)", "calc(50px/(2 - 1))", ], - invalid_values: [ "none", "-2px", + invalid_values: [ + "none", + "-2px", /* invalid for width but not flex-basis */ "content", /* invalid -moz-calc() values */ @@ -4196,453 +6681,766 @@ var gCSSProperties = { "calc(3em * (3em / 100%))", "calc(3em * 3em / 100%)", ], - quirks_values: { "5": "5px" }, + quirks_values: { 5: "5px" }, }, "will-change": { domProp: "willChange", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "scroll-position", "contents", "transform", "opacity", "scroll-position, transform", "transform, opacity", "contents, transform", "property-that-doesnt-exist-yet" ], - invalid_values: [ "none", "all", "default", "auto, scroll-position", "scroll-position, auto", "transform scroll-position", ",", "trailing,", "will-change", "transform, will-change" ] + initial_values: ["auto"], + other_values: [ + "scroll-position", + "contents", + "transform", + "opacity", + "scroll-position, transform", + "transform, opacity", + "contents, transform", + "property-that-doesnt-exist-yet", + ], + invalid_values: [ + "none", + "all", + "default", + "auto, scroll-position", + "scroll-position, auto", + "transform scroll-position", + ",", + "trailing,", + "will-change", + "transform, will-change", + ], }, "word-break": { domProp: "wordBreak", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "break-all", "keep-all" ], - invalid_values: [] + initial_values: ["normal"], + other_values: ["break-all", "keep-all"], + invalid_values: [], }, "word-spacing": { domProp: "wordSpacing", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal", "0", "0px", "-0em", - "calc(-0px)", "calc(0em)" - ], - other_values: [ "1em", "2px", "-3px", "0%", "50%", "-120%", - "calc(1em)", "calc(1em + 3px)", - "calc(15px / 2)", "calc(15px/2)", - "calc(-2em)", "calc(0% + 0px)", - "calc(-10%/2 - 1em)" + initial_values: ["normal", "0", "0px", "-0em", "calc(-0px)", "calc(0em)"], + other_values: [ + "1em", + "2px", + "-3px", + "0%", + "50%", + "-120%", + "calc(1em)", + "calc(1em + 3px)", + "calc(15px / 2)", + "calc(15px/2)", + "calc(-2em)", + "calc(0% + 0px)", + "calc(-10%/2 - 1em)", ], invalid_values: [], - quirks_values: { "5": "5px" }, + quirks_values: { 5: "5px" }, }, "overflow-wrap": { domProp: "overflowWrap", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "break-word" ], - invalid_values: [] + initial_values: ["normal"], + other_values: ["break-word"], + invalid_values: [], }, - "hyphens": { + hyphens: { domProp: "hyphens", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "manual" ], - other_values: [ "none", "auto" ], - invalid_values: [] + initial_values: ["manual"], + other_values: ["none", "auto"], + invalid_values: [], }, "z-index": { domProp: "zIndex", inherited: false, type: CSS_TYPE_LONGHAND, /* XXX requires position */ - initial_values: [ "auto" ], - other_values: [ "0", "3", "-7000", "12000" ], - invalid_values: [ "3.0", "17.5", "3e1" ] - } - , + initial_values: ["auto"], + other_values: ["0", "3", "-7000", "12000"], + invalid_values: ["3.0", "17.5", "3e1"], + }, "clip-path": { domProp: "clipPath", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mypath)", "url('404.svg#mypath')" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["url(#mypath)", "url('404.svg#mypath')"], + invalid_values: [], }, "clip-rule": { domProp: "clipRule", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "nonzero" ], - other_values: [ "evenodd" ], - invalid_values: [] + initial_values: ["nonzero"], + other_values: ["evenodd"], + invalid_values: [], }, "color-interpolation": { domProp: "colorInterpolation", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "sRGB" ], - other_values: [ "auto", "linearRGB" ], - invalid_values: [] + initial_values: ["sRGB"], + other_values: ["auto", "linearRGB"], + invalid_values: [], }, "color-interpolation-filters": { domProp: "colorInterpolationFilters", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "linearRGB" ], - other_values: [ "sRGB", "auto" ], - invalid_values: [] + initial_values: ["linearRGB"], + other_values: ["sRGB", "auto"], + invalid_values: [], }, "dominant-baseline": { domProp: "dominantBaseline", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "use-script", "no-change", "reset-size", "ideographic", "alphabetic", "hanging", "mathematical", "central", "middle", "text-after-edge", "text-before-edge" ], - invalid_values: [] + initial_values: ["auto"], + other_values: [ + "use-script", + "no-change", + "reset-size", + "ideographic", + "alphabetic", + "hanging", + "mathematical", + "central", + "middle", + "text-after-edge", + "text-before-edge", + ], + invalid_values: [], }, - "fill": { + fill: { domProp: "fill", inherited: true, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "none", "currentColor", "context-fill", "context-stroke" ], - invalid_values: [ "000000", "ff00ff", "url('#myserver') rgb(0, rubbish, 0)" ] + prerequisites: { color: "blue" }, + initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"], + other_values: [ + "green", + "#fc3", + "url('#myserver')", + "url(foo.svg#myserver)", + 'url("#myserver") green', + "none", + "currentColor", + "context-fill", + "context-stroke", + ], + invalid_values: ["000000", "ff00ff", "url('#myserver') rgb(0, rubbish, 0)"], }, "fill-opacity": { domProp: "fillOpacity", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000", "300%", "context-fill-opacity", "context-stroke-opacity" ], - other_values: [ "0", "0.3", "-7.3", "-100%", "50%" ], - invalid_values: [] + initial_values: [ + "1", + "2.8", + "1.000", + "300%", + "context-fill-opacity", + "context-stroke-opacity", + ], + other_values: ["0", "0.3", "-7.3", "-100%", "50%"], + invalid_values: [], }, "fill-rule": { domProp: "fillRule", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "nonzero" ], - other_values: [ "evenodd" ], - invalid_values: [] + initial_values: ["nonzero"], + other_values: ["evenodd"], + invalid_values: [], }, - "filter": { + filter: { domProp: "filter", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#myfilt)" ], - invalid_values: [ "url(#myfilt) none" ] + initial_values: ["none"], + other_values: ["url(#myfilt)"], + invalid_values: ["url(#myfilt) none"], }, "flood-color": { domProp: "floodColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + prerequisites: { color: "blue" }, + initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"], + other_values: ["green", "#fc3", "currentColor"], + invalid_values: [ + "url('#myserver')", + "url(foo.svg#myserver)", + 'url("#myserver") green', + "000000", + "ff00ff", + ], }, "flood-opacity": { domProp: "floodOpacity", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000", "300%" ], - other_values: [ "0", "0.3", "-7.3", "-100%", "50%" ], - invalid_values: [] + initial_values: ["1", "2.8", "1.000", "300%"], + other_values: ["0", "0.3", "-7.3", "-100%", "50%"], + invalid_values: [], }, "image-rendering": { domProp: "imageRendering", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "optimizeQuality", "-moz-crisp-edges" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["optimizeSpeed", "optimizeQuality", "-moz-crisp-edges"], + invalid_values: [], }, "lighting-color": { domProp: "lightingColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "white", "#fff", "#ffffff", "rgb(255,255,255)", "rgba(255,255,255,1.0)", "rgba(255,255,255,42.0)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + prerequisites: { color: "blue" }, + initial_values: [ + "white", + "#fff", + "#ffffff", + "rgb(255,255,255)", + "rgba(255,255,255,1.0)", + "rgba(255,255,255,42.0)", + ], + other_values: ["green", "#fc3", "currentColor"], + invalid_values: [ + "url('#myserver')", + "url(foo.svg#myserver)", + 'url("#myserver") green', + "000000", + "ff00ff", + ], }, - "marker": { + marker: { domProp: "marker", inherited: true, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "marker-start", "marker-mid", "marker-end" ], - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [ "none none", "url(#mysym) url(#mysym)", "none url(#mysym)", "url(#mysym) none" ] + subproperties: ["marker-start", "marker-mid", "marker-end"], + initial_values: ["none"], + other_values: ["url(#mysym)"], + invalid_values: [ + "none none", + "url(#mysym) url(#mysym)", + "none url(#mysym)", + "url(#mysym) none", + ], }, "marker-end": { domProp: "markerEnd", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["url(#mysym)"], + invalid_values: [], }, "marker-mid": { domProp: "markerMid", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["url(#mysym)"], + invalid_values: [], }, "marker-start": { domProp: "markerStart", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mysym)" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["url(#mysym)"], + invalid_values: [], }, "shape-rendering": { domProp: "shapeRendering", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "crispEdges", "geometricPrecision" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["optimizeSpeed", "crispEdges", "geometricPrecision"], + invalid_values: [], }, "stop-color": { domProp: "stopColor", inherited: false, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "blue" }, - initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ], - other_values: [ "green", "#fc3", "currentColor" ], - invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ] + prerequisites: { color: "blue" }, + initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"], + other_values: ["green", "#fc3", "currentColor"], + invalid_values: [ + "url('#myserver')", + "url(foo.svg#myserver)", + 'url("#myserver") green', + "000000", + "ff00ff", + ], }, "stop-opacity": { domProp: "stopOpacity", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000", "300%" ], - other_values: [ "0", "0.3", "-7.3", "-100%", "50%" ], - invalid_values: [] + initial_values: ["1", "2.8", "1.000", "300%"], + other_values: ["0", "0.3", "-7.3", "-100%", "50%"], + invalid_values: [], }, - "stroke": { + stroke: { domProp: "stroke", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)", "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "currentColor", "context-fill", "context-stroke" ], - invalid_values: [ "000000", "ff00ff" ] + initial_values: ["none"], + other_values: [ + "black", + "#000", + "#000000", + "rgb(0,0,0)", + "rgba(0,0,0,1)", + "green", + "#fc3", + "url('#myserver')", + "url(foo.svg#myserver)", + 'url("#myserver") green', + "currentColor", + "context-fill", + "context-stroke", + ], + invalid_values: ["000000", "ff00ff"], }, "stroke-dasharray": { domProp: "strokeDasharray", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none", "context-value" ], - other_values: [ "5px,3px,2px", "5px 3px 2px", " 5px ,3px\t, 2px ", "1px", "5%", "3em" ], - invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ] + initial_values: ["none", "context-value"], + other_values: [ + "5px,3px,2px", + "5px 3px 2px", + " 5px ,3px\t, 2px ", + "1px", + "5%", + "3em", + ], + invalid_values: ["-5px,3px,2px", "5px,3px,-2px"], }, "stroke-dashoffset": { domProp: "strokeDashoffset", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "-0px", "0em", "context-value" ], - other_values: [ "3px", "3%", "1em" ], - invalid_values: [] + initial_values: ["0", "-0px", "0em", "context-value"], + other_values: ["3px", "3%", "1em"], + invalid_values: [], }, "stroke-linecap": { domProp: "strokeLinecap", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "butt" ], - other_values: [ "round", "square" ], - invalid_values: [] + initial_values: ["butt"], + other_values: ["round", "square"], + invalid_values: [], }, "stroke-linejoin": { domProp: "strokeLinejoin", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "miter" ], - other_values: [ "round", "bevel" ], - invalid_values: [] + initial_values: ["miter"], + other_values: ["round", "bevel"], + invalid_values: [], }, "stroke-miterlimit": { domProp: "strokeMiterlimit", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "4" ], - other_values: [ "1", "7", "5000", "1.1" ], - invalid_values: [ "0.9", "0", "-1", "3px", "-0.3" ] + initial_values: ["4"], + other_values: ["1", "7", "5000", "1.1"], + invalid_values: ["0.9", "0", "-1", "3px", "-0.3"], }, "stroke-opacity": { domProp: "strokeOpacity", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "1", "2.8", "1.000", "300%", "context-fill-opacity", "context-stroke-opacity" ], - other_values: [ "0", "0.3", "-7.3", "-100%", "50%" ], - invalid_values: [] + initial_values: [ + "1", + "2.8", + "1.000", + "300%", + "context-fill-opacity", + "context-stroke-opacity", + ], + other_values: ["0", "0.3", "-7.3", "-100%", "50%"], + invalid_values: [], }, "stroke-width": { domProp: "strokeWidth", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "1px", "context-value" ], - other_values: [ "0", "0px", "-0em", "17px", "0.2em" ], - invalid_values: [ "-0.1px", "-3px" ] + initial_values: ["1px", "context-value"], + other_values: ["0", "0px", "-0em", "17px", "0.2em"], + invalid_values: ["-0.1px", "-3px"], }, "text-anchor": { domProp: "textAnchor", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "start" ], - other_values: [ "middle", "end" ], - invalid_values: [] + initial_values: ["start"], + other_values: ["middle", "end"], + invalid_values: [], }, "text-rendering": { domProp: "textRendering", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "optimizeSpeed", "optimizeLegibility", "geometricPrecision" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["optimizeSpeed", "optimizeLegibility", "geometricPrecision"], + invalid_values: [], }, "vector-effect": { domProp: "vectorEffect", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "non-scaling-stroke" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["non-scaling-stroke"], + invalid_values: [], }, "-moz-window-dragging": { domProp: "MozWindowDragging", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "default" ], - other_values: [ "drag", "no-drag" ], - invalid_values: [ "none" ] + initial_values: ["default"], + other_values: ["drag", "no-drag"], + invalid_values: ["none"], }, "align-content": { domProp: "alignContent", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "start", "end", "flex-start", "flex-end", "center", "left", - "right", "space-between", "space-around", "space-evenly", - "first baseline", "last baseline", "baseline", "stretch", "start safe", - "unsafe end", "unsafe end stretch", "end safe space-evenly" ], - invalid_values: [ "none", "5", "self-end", "safe", "normal unsafe", "unsafe safe", - "safe baseline", "baseline unsafe", "baseline end", "end normal", - "safe end unsafe start", "safe end unsafe", "normal safe start", - "unsafe end start", "end start safe", "space-between unsafe", - "stretch safe", "auto", "first", "last" ] + initial_values: ["normal"], + other_values: [ + "start", + "end", + "flex-start", + "flex-end", + "center", + "left", + "right", + "space-between", + "space-around", + "space-evenly", + "first baseline", + "last baseline", + "baseline", + "stretch", + "start safe", + "unsafe end", + "unsafe end stretch", + "end safe space-evenly", + ], + invalid_values: [ + "none", + "5", + "self-end", + "safe", + "normal unsafe", + "unsafe safe", + "safe baseline", + "baseline unsafe", + "baseline end", + "end normal", + "safe end unsafe start", + "safe end unsafe", + "normal safe start", + "unsafe end start", + "end start safe", + "space-between unsafe", + "stretch safe", + "auto", + "first", + "last", + ], }, "align-items": { domProp: "alignItems", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], + initial_values: ["normal"], // Can't test 'left'/'right' here since that computes to 'start' for blocks. - other_values: [ "end", "flex-start", "flex-end", "self-start", "self-end", - "center", "stretch", "first baseline", "last baseline", "baseline", - "unsafe left", "start", "center unsafe", "safe right", "center safe" ], - invalid_values: [ "space-between", "abc", "5%", "legacy", "legacy end", - "end legacy", "unsafe", "unsafe baseline", "normal unsafe", - "safe left unsafe", "safe stretch", "end end", "auto" ] + other_values: [ + "end", + "flex-start", + "flex-end", + "self-start", + "self-end", + "center", + "stretch", + "first baseline", + "last baseline", + "baseline", + "unsafe left", + "start", + "center unsafe", + "safe right", + "center safe", + ], + invalid_values: [ + "space-between", + "abc", + "5%", + "legacy", + "legacy end", + "end legacy", + "unsafe", + "unsafe baseline", + "normal unsafe", + "safe left unsafe", + "safe stretch", + "end end", + "auto", + ], }, "align-self": { domProp: "alignSelf", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "start", "flex-start", "flex-end", "center", "stretch", - "first baseline", "last baseline", "baseline", "right safe", - "unsafe center", "self-start", "self-end safe" ], - invalid_values: [ "space-between", "abc", "30px", "stretch safe", "safe" ] + initial_values: ["auto"], + other_values: [ + "normal", + "start", + "flex-start", + "flex-end", + "center", + "stretch", + "first baseline", + "last baseline", + "baseline", + "right safe", + "unsafe center", + "self-start", + "self-end safe", + ], + invalid_values: ["space-between", "abc", "30px", "stretch safe", "safe"], }, "justify-content": { domProp: "justifyContent", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "start", "end", "flex-start", "flex-end", "center", "left", - "right", "space-between", "space-around", "space-evenly", - "first baseline", "last baseline", "baseline", "stretch", "start safe", - "unsafe end", "unsafe end stretch", "end safe space-evenly" ], - invalid_values: [ "30px", "5%", "self-end", "safe", "normal unsafe", "unsafe safe", - "safe baseline", "baseline unsafe", "baseline end", "normal end", - "safe end unsafe start", "safe end unsafe", "normal safe start", - "unsafe end start", "end start safe", "space-around unsafe", - "safe stretch", "auto", "first", "last" ] + initial_values: ["normal"], + other_values: [ + "start", + "end", + "flex-start", + "flex-end", + "center", + "left", + "right", + "space-between", + "space-around", + "space-evenly", + "first baseline", + "last baseline", + "baseline", + "stretch", + "start safe", + "unsafe end", + "unsafe end stretch", + "end safe space-evenly", + ], + invalid_values: [ + "30px", + "5%", + "self-end", + "safe", + "normal unsafe", + "unsafe safe", + "safe baseline", + "baseline unsafe", + "baseline end", + "normal end", + "safe end unsafe start", + "safe end unsafe", + "normal safe start", + "unsafe end start", + "end start safe", + "space-around unsafe", + "safe stretch", + "auto", + "first", + "last", + ], }, "justify-items": { domProp: "justifyItems", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto", "normal" ], - other_values: [ "end", "flex-start", "flex-end", "self-start", "self-end", - "center", "left", "right", "first baseline", "last baseline", - "baseline", "stretch", "start", "legacy left", "right legacy", - "legacy center", "unsafe right", "left unsafe", "safe right", - "center safe" ], - invalid_values: [ "space-between", "abc", "30px", "legacy", "legacy start", - "end legacy", "legacy baseline", "legacy legacy", "unsafe", - "safe legacy left", "legacy left safe", "legacy safe left", - "safe left legacy", "legacy left legacy", "baseline unsafe", - "safe unsafe", "safe left unsafe", "safe stretch", "last" ] + initial_values: ["auto", "normal"], + other_values: [ + "end", + "flex-start", + "flex-end", + "self-start", + "self-end", + "center", + "left", + "right", + "first baseline", + "last baseline", + "baseline", + "stretch", + "start", + "legacy left", + "right legacy", + "legacy center", + "unsafe right", + "left unsafe", + "safe right", + "center safe", + ], + invalid_values: [ + "space-between", + "abc", + "30px", + "legacy", + "legacy start", + "end legacy", + "legacy baseline", + "legacy legacy", + "unsafe", + "safe legacy left", + "legacy left safe", + "legacy safe left", + "safe left legacy", + "legacy left legacy", + "baseline unsafe", + "safe unsafe", + "safe left unsafe", + "safe stretch", + "last", + ], }, "justify-self": { domProp: "justifySelf", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "start", "end", "flex-start", "flex-end", "self-start", - "self-end", "center", "left", "right", "baseline", "first baseline", - "last baseline", "stretch", "left unsafe", "unsafe right", - "safe right", "center safe" ], - invalid_values: [ "space-between", "abc", "30px", "none", "first", "last", - "legacy left", "right legacy", "baseline first", "baseline last" ] + initial_values: ["auto"], + other_values: [ + "normal", + "start", + "end", + "flex-start", + "flex-end", + "self-start", + "self-end", + "center", + "left", + "right", + "baseline", + "first baseline", + "last baseline", + "stretch", + "left unsafe", + "unsafe right", + "safe right", + "center safe", + ], + invalid_values: [ + "space-between", + "abc", + "30px", + "none", + "first", + "last", + "legacy left", + "right legacy", + "baseline first", + "baseline last", + ], }, "place-content": { domProp: "placeContent", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "align-content", "justify-content" ], - initial_values: [ "normal" ], - other_values: [ "normal start", "end baseline", "end end", - "space-between flex-end", "last baseline start", - "space-evenly", "flex-start", "end", "left" ], - invalid_values: [ "none", "center safe", "unsafe start", "right / end" ] + subproperties: ["align-content", "justify-content"], + initial_values: ["normal"], + other_values: [ + "normal start", + "end baseline", + "end end", + "space-between flex-end", + "last baseline start", + "space-evenly", + "flex-start", + "end", + "left", + ], + invalid_values: ["none", "center safe", "unsafe start", "right / end"], }, "place-items": { domProp: "placeItems", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "align-items", "justify-items" ], - initial_values: [ "normal" ], - other_values: [ "normal center", "end baseline", "end auto", - "end", "right", "baseline", "start last baseline", - "left flex-end", "last baseline start", "stretch" ], - invalid_values: [ "space-between", "start space-evenly", "none", "end/end", - "center safe", "auto start", "end legacy left" ] + subproperties: ["align-items", "justify-items"], + initial_values: ["normal"], + other_values: [ + "normal center", + "end baseline", + "end auto", + "end", + "right", + "baseline", + "start last baseline", + "left flex-end", + "last baseline start", + "stretch", + ], + invalid_values: [ + "space-between", + "start space-evenly", + "none", + "end/end", + "center safe", + "auto start", + "end legacy left", + ], }, "place-self": { domProp: "placeSelf", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "align-self", "justify-self" ], - initial_values: [ "auto" ], - other_values: [ "normal start", "end first baseline", "end auto", - "end", "right", "normal", "baseline", "start baseline", - "left self-end", "last baseline start", "stretch" ], - invalid_values: [ "space-between", "start space-evenly", "none", "end safe", - "auto legacy left", "legacy left", "auto/auto" ] + subproperties: ["align-self", "justify-self"], + initial_values: ["auto"], + other_values: [ + "normal start", + "end first baseline", + "end auto", + "end", + "right", + "normal", + "baseline", + "start baseline", + "left self-end", + "last baseline start", + "stretch", + ], + invalid_values: [ + "space-between", + "start space-evenly", + "none", + "end safe", + "auto legacy left", + "legacy left", + "auto/auto", + ], }, - "flex": { + flex: { domProp: "flex", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "flex-grow", - "flex-shrink", - "flex-basis" - ], - initial_values: [ "0 1 auto", "auto 0 1", "0 auto", "auto 0" ], + subproperties: ["flex-grow", "flex-shrink", "flex-basis"], + initial_values: ["0 1 auto", "auto 0 1", "0 auto", "auto 0"], other_values: [ "none", "1", @@ -4662,7 +7460,7 @@ var gCSSProperties = { "1 2 -moz-max-content", "-moz-max-content 1", "-moz-max-content 1 2", - "-0" + "-0", ], invalid_values: [ "1 2px 3", @@ -4672,16 +7470,16 @@ var gCSSProperties = { "-1", "1 -1", "0 1 calc(0px + rubbish)", - ] + ], }, "flex-basis": { domProp: "flexBasis", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ " auto" ], - // NOTE: Besides "content", this is cribbed directly from the "width" - // chunk, since this property takes the exact same values as width - // (plus 'content' & with different semantics on 'auto'). + initial_values: [" auto"], + // NOTE: Besides "content", this is cribbed directly from the "width" + // chunk, since this property takes the exact same values as width + // (plus 'content' & with different semantics on 'auto'). other_values: [ "15px", "3em", @@ -4716,9 +7514,11 @@ var gCSSProperties = { "calc(2em)", "calc(50%)", "calc(50px/2)", - "calc(50px/(2 - 1))" + "calc(50px/(2 - 1))", ], - invalid_values: [ "none", "-2px", + invalid_values: [ + "none", + "-2px", // invalid calc() values "calc(50%+ 2px)", "calc(50% +2px)", @@ -4744,26 +7544,23 @@ var gCSSProperties = { "calc((3em / 100%) * 3em)", "calc(3em / 100% * 3em)", "calc(3em * (3em / 100%))", - "calc(3em * 3em / 100%)" - ] + "calc(3em * 3em / 100%)", + ], }, "flex-direction": { domProp: "flexDirection", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "row" ], - other_values: [ "row-reverse", "column", "column-reverse" ], - invalid_values: [ "10px", "30%", "justify", "column wrap" ] + initial_values: ["row"], + other_values: ["row-reverse", "column", "column-reverse"], + invalid_values: ["10px", "30%", "justify", "column wrap"], }, "flex-flow": { domProp: "flexFlow", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "flex-direction", - "flex-wrap" - ], - initial_values: [ "row nowrap", "nowrap row", "row", "nowrap" ], + subproperties: ["flex-direction", "flex-wrap"], + initial_values: ["row nowrap", "nowrap row", "row", "nowrap"], other_values: [ // only specifying one property: "column", @@ -4792,40 +7589,43 @@ var gCSSProperties = { "nowrap row wrap-reverse", "row nowrap wrap-reverse", // Invalid data-type / invalid keyword type: - "1px", "5%", "justify", "none" - ] + "1px", + "5%", + "justify", + "none", + ], }, "flex-grow": { domProp: "flexGrow", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "3", "1", "1.0", "2.5", "123" ], - invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] + initial_values: ["0"], + other_values: ["3", "1", "1.0", "2.5", "123"], + invalid_values: ["0px", "-5", "1%", "3em", "stretch", "auto"], }, "flex-shrink": { domProp: "flexShrink", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "1" ], - other_values: [ "3", "0", "0.0", "2.5", "123" ], - invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ] + initial_values: ["1"], + other_values: ["3", "0", "0.0", "2.5", "123"], + invalid_values: ["0px", "-5", "1%", "3em", "stretch", "auto"], }, "flex-wrap": { domProp: "flexWrap", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "nowrap" ], - other_values: [ "wrap", "wrap-reverse" ], - invalid_values: [ "10px", "30%", "justify", "column wrap", "auto" ] + initial_values: ["nowrap"], + other_values: ["wrap", "wrap-reverse"], + invalid_values: ["10px", "30%", "justify", "column wrap", "auto"], }, - "order": { + order: { domProp: "order", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0" ], - other_values: [ "1", "99999", "-1", "-50" ], - invalid_values: [ "0px", "1.0", "1.", "1%", "0.2", "3em", "stretch" ] + initial_values: ["0"], + other_values: ["1", "99999", "-1", "-50"], + invalid_values: ["0px", "1.0", "1.", "1%", "0.2", "3em", "stretch"], }, // Aliases @@ -4834,30 +7634,53 @@ var gCSSProperties = { inherited: true, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "overflow-wrap", - subproperties: [ "overflow-wrap" ], + subproperties: ["overflow-wrap"], }, "-moz-transform": { domProp: "MozTransform", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transform", - subproperties: [ "transform" ], + subproperties: ["transform"], // NOTE: We specify other_values & invalid_values explicitly here (instead // of deferring to "transform") because we accept some legacy syntax as // valid for "-moz-transform" but not for "transform". - other_values: [ "translatex(1px)", "translatex(4em)", - "translatex(-4px)", "translatex(3px)", + other_values: [ + "translatex(1px)", + "translatex(4em)", + "translatex(-4px)", + "translatex(3px)", "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", - "translatey(4em)", "translate(3px)", "translate(10px, -3px)", - "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", - "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", - "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", - "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", - "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", - "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", + "translatey(4em)", + "translate(3px)", + "translate(10px, -3px)", + "rotate(45deg)", + "rotate(45grad)", + "rotate(45rad)", + "rotate(0.25turn)", + "rotate(0)", + "scalex(10)", + "scaley(10)", + "scale(10)", + "scale(10, 20)", + "skewx(30deg)", + "skewx(0)", + "skewy(0)", + "skewx(30grad)", + "skewx(30rad)", + "skewx(0.08turn)", + "skewy(30deg)", + "skewy(30grad)", + "skewy(30rad)", + "skewy(0.08turn)", + "rotate(45deg) scale(2, 1)", + "skewx(45deg) skewx(-50grad)", "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", - "translatex(50%)", "translatey(50%)", "translate(50%)", - "translate(3%, 5px)", "translate(5px, 3%)", + "translatex(50%)", + "translatey(50%)", + "translate(50%)", + "translate(3%, 5px)", + "translate(5px, 3%)", "matrix(1, 2, 3, 4, 5, 6)", /* valid calc() values */ "translatex(calc(5px + 10%))", @@ -4871,28 +7694,51 @@ var gCSSProperties = { "matrix(1, 2, 3, 4, 5%, 6%)", "matrix(1, 2, 3, 4, 5px, 6em)", "matrix(1, 0, 0, 1, calc(5px * 3), calc(10% - 3px))", - "translatez(1px)", "translatez(4em)", "translatez(-4px)", - "translatez(0px)", "translatez(2px) translatez(5px)", - "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", + "translatez(1px)", + "translatez(4em)", + "translatez(-4px)", + "translatez(0px)", + "translatez(2px) translatez(5px)", + "translate3d(3px, 4px, 5px)", + "translate3d(2em, 3px, 1em)", "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", - "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", - "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", - "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", - "rotatez(72rad)", "rotatex(0.125turn)", - "perspective(0px)", "perspective(1000px)", + "scale3d(4, 4, 4)", + "scale3d(-2, 3, -7)", + "scalez(4)", + "scalez(-6)", + "rotate3d(2, 3, 4, 45deg)", + "rotate3d(-3, 7, 0, 12rad)", + "rotatex(15deg)", + "rotatey(-12grad)", + "rotatez(72rad)", + "rotatex(0.125turn)", + "perspective(0px)", + "perspective(1000px)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", /* valid only when prefixed */ "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)", ], - invalid_values: ["1px", "#0000ff", "red", "auto", - "translatex(1)", "translatey(1)", "translate(2)", + invalid_values: [ + "1px", + "#0000ff", + "red", + "auto", + "translatex(1)", + "translatey(1)", + "translate(2)", "translate(-3, -4)", - "translatex(1px 1px)", "translatex(translatex(1px))", - "translatex(#0000ff)", "translatex(red)", "translatey()", - "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", - "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", - "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", + "translatex(1px 1px)", + "translatex(translatex(1px))", + "translatex(#0000ff)", + "translatex(red)", + "translatey()", + "matrix(1px, 2px, 3px, 4px, 5px, 6px)", + "scale(150%)", + "skewx(red)", + "matrix(1%, 0, 0, 0, 0px, 0px)", + "matrix(0, 1%, 2, 3, 4px,5px)", + "matrix(0, 1, 2%, 3, 4px, 5px)", "matrix(0, 1, 2, 3%, 4%, 5%)", /* invalid calc() values */ "translatey(-moz-min(5px,10%))", @@ -4900,12 +7746,15 @@ var gCSSProperties = { "translate(10px, calc(min(5px,10%)))", "translate(calc(max(5px,10%)), 10%)", "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))", - "perspective(-10px)", "matrix3d(dinosaur)", + "perspective(-10px)", + "matrix3d(dinosaur)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)", - "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)", + "rotatey(words)", + "rotatex(7)", + "translate3d(3px, 4px, 1px, 7px)", ], }, "-moz-transform-origin": { @@ -4913,194 +7762,247 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transform-origin", - subproperties: [ "transform-origin" ], + subproperties: ["transform-origin"], }, "-moz-perspective-origin": { domProp: "MozPerspectiveOrigin", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "perspective-origin", - subproperties: [ "perspective-origin" ], + subproperties: ["perspective-origin"], }, "-moz-perspective": { domProp: "MozPerspective", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "perspective", - subproperties: [ "perspective" ], + subproperties: ["perspective"], }, "-moz-backface-visibility": { domProp: "MozBackfaceVisibility", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "backface-visibility", - subproperties: [ "backface-visibility" ], + subproperties: ["backface-visibility"], }, "-moz-transform-style": { domProp: "MozTransformStyle", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transform-style", - subproperties: [ "transform-style" ], + subproperties: ["transform-style"], }, "-moz-border-image": { domProp: "MozBorderImage", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "border-image", - subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], + subproperties: [ + "border-image-source", + "border-image-slice", + "border-image-width", + "border-image-outset", + "border-image-repeat", + ], }, "-moz-transition": { domProp: "MozTransition", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "transition", - subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], + subproperties: [ + "transition-property", + "transition-duration", + "transition-timing-function", + "transition-delay", + ], }, "-moz-transition-delay": { domProp: "MozTransitionDelay", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transition-delay", - subproperties: [ "transition-delay" ], + subproperties: ["transition-delay"], }, "-moz-transition-duration": { domProp: "MozTransitionDuration", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transition-duration", - subproperties: [ "transition-duration" ], + subproperties: ["transition-duration"], }, "-moz-transition-property": { domProp: "MozTransitionProperty", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transition-property", - subproperties: [ "transition-property" ], + subproperties: ["transition-property"], }, "-moz-transition-timing-function": { domProp: "MozTransitionTimingFunction", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transition-timing-function", - subproperties: [ "transition-timing-function" ], + subproperties: ["transition-timing-function"], }, "-moz-animation": { domProp: "MozAnimation", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "animation", - subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count", "animation-play-state" ], + subproperties: [ + "animation-name", + "animation-duration", + "animation-timing-function", + "animation-delay", + "animation-direction", + "animation-fill-mode", + "animation-iteration-count", + "animation-play-state", + ], }, "-moz-animation-delay": { domProp: "MozAnimationDelay", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-delay", - subproperties: [ "animation-delay" ], + subproperties: ["animation-delay"], }, "-moz-animation-direction": { domProp: "MozAnimationDirection", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-direction", - subproperties: [ "animation-direction" ], + subproperties: ["animation-direction"], }, "-moz-animation-duration": { domProp: "MozAnimationDuration", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-duration", - subproperties: [ "animation-duration" ], + subproperties: ["animation-duration"], }, "-moz-animation-fill-mode": { domProp: "MozAnimationFillMode", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-fill-mode", - subproperties: [ "animation-fill-mode" ], + subproperties: ["animation-fill-mode"], }, "-moz-animation-iteration-count": { domProp: "MozAnimationIterationCount", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-iteration-count", - subproperties: [ "animation-iteration-count" ], + subproperties: ["animation-iteration-count"], }, "-moz-animation-name": { domProp: "MozAnimationName", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-name", - subproperties: [ "animation-name" ], + subproperties: ["animation-name"], }, "-moz-animation-play-state": { domProp: "MozAnimationPlayState", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-play-state", - subproperties: [ "animation-play-state" ], + subproperties: ["animation-play-state"], }, "-moz-animation-timing-function": { domProp: "MozAnimationTimingFunction", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-timing-function", - subproperties: [ "animation-timing-function" ], + subproperties: ["animation-timing-function"], }, "-moz-font-feature-settings": { domProp: "MozFontFeatureSettings", inherited: true, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "font-feature-settings", - subproperties: [ "font-feature-settings" ], + subproperties: ["font-feature-settings"], }, "-moz-font-language-override": { domProp: "MozFontLanguageOverride", inherited: true, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "font-language-override", - subproperties: [ "font-language-override" ], + subproperties: ["font-language-override"], }, "-moz-hyphens": { domProp: "MozHyphens", inherited: true, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "hyphens", - subproperties: [ "hyphens" ], + subproperties: ["hyphens"], }, "-moz-text-align-last": { domProp: "MozTextAlignLast", inherited: true, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "text-align-last", - subproperties: [ "text-align-last" ], + subproperties: ["text-align-last"], }, // vertical text properties "writing-mode": { domProp: "writingMode", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "horizontal-tb", "lr", "lr-tb", "rl", "rl-tb" ], - other_values: [ "vertical-lr", "vertical-rl", "sideways-rl", "sideways-lr", "tb", "tb-rl" ], - invalid_values: [ "10px", "30%", "justify", "auto", "1em" ] + initial_values: ["horizontal-tb", "lr", "lr-tb", "rl", "rl-tb"], + other_values: [ + "vertical-lr", + "vertical-rl", + "sideways-rl", + "sideways-lr", + "tb", + "tb-rl", + ], + invalid_values: ["10px", "30%", "justify", "auto", "1em"], }, "text-orientation": { domProp: "textOrientation", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "mixed" ], - other_values: [ "upright", "sideways", "sideways-right" ], /* sideways-right alias for backward compatibility */ - invalid_values: [ "none", "3em", "sideways-left" ] /* sideways-left removed from CSS Writing Modes */ + initial_values: ["mixed"], + other_values: [ + "upright", + "sideways", + "sideways-right", + ] /* sideways-right alias for backward compatibility */, + invalid_values: [ + "none", + "3em", + "sideways-left", + ] /* sideways-left removed from CSS Writing Modes */, }, "border-block-end": { domProp: "borderBlockEnd", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-block-end-color", "border-block-end-style", "border-block-end-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] + subproperties: [ + "border-block-end-color", + "border-block-end-style", + "border-block-end-width", + ], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + ], + other_values: [ + "solid", + "green", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "5px green none", + ], + invalid_values: ["5%", "5", "5 solid green"], }, "block-size": { domProp: "blockSize", @@ -5110,16 +8012,25 @@ var gCSSProperties = { axis: true, get_computed: logical_axis_prop_get_computed, /* XXX testing auto has prerequisites */ - initial_values: [ "auto" ], - prerequisites: { "display": "block" }, - other_values: [ "15px", "3em", "15%", + initial_values: ["auto"], + prerequisites: { display: "block" }, + other_values: [ + "15px", + "3em", + "15%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ], + invalid_values: [ + "none", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", + ], }, "border-block-end-color": { domProp: "borderBlockEndColor", @@ -5127,9 +8038,9 @@ var gCSSProperties = { type: CSS_TYPE_LONGHAND, logical: true, get_computed: logical_box_prop_get_computed, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000" ] + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"], }, "border-block-end-style": { domProp: "borderBlockEndStyle", @@ -5138,9 +8049,18 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + ], + invalid_values: [], }, "border-block-end-width": { domProp: "borderBlockEndWidth", @@ -5149,8 +8069,12 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, prerequisites: { "border-block-end-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0em)", @@ -5160,16 +8084,34 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%", "5" ] + invalid_values: ["5%", "5"], }, "border-block-start": { domProp: "borderBlockStart", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "border-block-start-color", "border-block-start-style", "border-block-start-width" ], - initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ], - other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ], - invalid_values: [ "5%", "5", "5 solid green" ] + subproperties: [ + "border-block-start-color", + "border-block-start-style", + "border-block-start-width", + ], + initial_values: [ + "none", + "medium", + "currentColor", + "thin", + "none medium currentcolor", + ], + other_values: [ + "solid", + "green", + "medium solid", + "green solid", + "10px solid", + "thick solid", + "5px green none", + ], + invalid_values: ["5%", "5", "5 solid green"], }, "border-block-start-color": { domProp: "borderBlockStartColor", @@ -5177,9 +8119,9 @@ var gCSSProperties = { type: CSS_TYPE_LONGHAND, logical: true, get_computed: logical_box_prop_get_computed, - initial_values: [ "currentColor" ], - other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000" ] + initial_values: ["currentColor"], + other_values: ["green", "rgba(255,128,0,0.5)", "transparent"], + invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"], }, "border-block-start-style": { domProp: "borderBlockStartStyle", @@ -5188,9 +8130,18 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* XXX hidden is sometimes the same as initial */ - initial_values: [ "none" ], - other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ], - invalid_values: [] + initial_values: ["none"], + other_values: [ + "solid", + "dashed", + "dotted", + "double", + "outset", + "inset", + "groove", + "ridge", + ], + invalid_values: [], }, "border-block-start-width": { domProp: "borderBlockStartWidth", @@ -5199,8 +8150,12 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, prerequisites: { "border-block-start-style": "solid" }, - initial_values: [ "medium", "3px", "calc(4px - 1px)" ], - other_values: [ "thin", "thick", "1px", "2em", + initial_values: ["medium", "3px", "calc(4px - 1px)"], + other_values: [ + "thin", + "thick", + "1px", + "2em", "calc(2px)", "calc(-2px)", "calc(0em)", @@ -5210,21 +8165,25 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 5em)", ], - invalid_values: [ "5%", "5" ] + invalid_values: ["5%", "5"], }, "-moz-border-end": { domProp: "MozBorderEnd", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "border-inline-end", - subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ], + subproperties: [ + "-moz-border-end-color", + "-moz-border-end-style", + "-moz-border-end-width", + ], }, "-moz-border-end-color": { domProp: "MozBorderEndColor", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-inline-end-color", - subproperties: [ "border-inline-end-color" ], + subproperties: ["border-inline-end-color"], get_computed: logical_box_prop_get_computed, }, "-moz-border-end-style": { @@ -5232,7 +8191,7 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-inline-end-style", - subproperties: [ "border-inline-end-style" ], + subproperties: ["border-inline-end-style"], get_computed: logical_box_prop_get_computed, }, "-moz-border-end-width": { @@ -5240,7 +8199,7 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-inline-end-width", - subproperties: [ "border-inline-end-width" ], + subproperties: ["border-inline-end-width"], get_computed: logical_box_prop_get_computed, }, "-moz-border-start": { @@ -5248,14 +8207,18 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "border-inline-start", - subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ], + subproperties: [ + "-moz-border-start-color", + "-moz-border-start-style", + "-moz-border-start-width", + ], }, "-moz-border-start-color": { domProp: "MozBorderStartColor", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-inline-start-color", - subproperties: [ "border-inline-start-color" ], + subproperties: ["border-inline-start-color"], get_computed: logical_box_prop_get_computed, }, "-moz-border-start-style": { @@ -5263,7 +8226,7 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-inline-start-style", - subproperties: [ "border-inline-start-style" ], + subproperties: ["border-inline-start-style"], get_computed: logical_box_prop_get_computed, }, "-moz-border-start-width": { @@ -5271,7 +8234,7 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-inline-start-width", - subproperties: [ "border-inline-start-width" ], + subproperties: ["border-inline-start-width"], get_computed: logical_box_prop_get_computed, }, "inline-size": { @@ -5282,13 +8245,18 @@ var gCSSProperties = { axis: true, get_computed: logical_axis_prop_get_computed, /* XXX testing auto has prerequisites */ - initial_values: [ "auto" ], - prerequisites: { "display": "block" }, - other_values: [ "15px", "3em", "15%", + initial_values: ["auto"], + prerequisites: { display: "block" }, + other_values: [ + "15px", + "3em", + "15%", // these three keywords compute to the initial value only when the // writing mode is vertical, and we're testing with a horizontal // writing mode - "-moz-max-content", "-moz-min-content", "-moz-fit-content", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", // whether -moz-available computes to the initial value depends on // the container size, and for the container size we're testing // with, it does @@ -5299,15 +8267,18 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "none" ], + invalid_values: ["none"], }, "margin-block": { domProp: "marginBlock", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "margin-block-start", "margin-block-end" ], - initial_values: [ "0", "0px 0em" ], - other_values: [ "1px", "3em 1%", "5%", + subproperties: ["margin-block-start", "margin-block-end"], + initial_values: ["0", "0px 0em"], + other_values: [ + "1px", + "3em 1%", + "5%", "calc(2px) 1%", "calc(-2px) 1%", "calc(50%) 1%", @@ -5315,7 +8286,21 @@ var gCSSProperties = { "calc(25px*3) 1em", "calc(3*25px + 50%) calc(3*25px - 50%)", ], - invalid_values: [ "5", "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + invalid_values: [ + "5", + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], }, "margin-block-end": { domProp: "marginBlockEnd", @@ -5324,8 +8309,11 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", + initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -5333,7 +8321,20 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + invalid_values: [ + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], }, "margin-block-start": { domProp: "marginBlockStart", @@ -5342,8 +8343,11 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* XXX testing auto has prerequisites */ - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ], - other_values: [ "1px", "2em", "5%", + initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -5351,14 +8355,27 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + invalid_values: [ + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], }, "-moz-margin-end": { domProp: "MozMarginEnd", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "margin-inline-end", - subproperties: [ "margin-inline-end" ], + subproperties: ["margin-inline-end"], get_computed: logical_box_prop_get_computed, }, "-moz-margin-start": { @@ -5366,7 +8383,7 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "margin-inline-start", - subproperties: [ "margin-inline-start" ], + subproperties: ["margin-inline-start"], get_computed: logical_box_prop_get_computed, }, "max-block-size": { @@ -5376,16 +8393,25 @@ var gCSSProperties = { logical: true, axis: true, get_computed: logical_axis_prop_get_computed, - prerequisites: { "display": "block" }, - initial_values: [ "none" ], - other_values: [ "30px", "50%", + prerequisites: { display: "block" }, + initial_values: ["none"], + other_values: [ + "30px", + "50%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "auto", "5", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ] + invalid_values: [ + "auto", + "5", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", + ], }, "max-inline-size": { domProp: "maxInlineSize", @@ -5394,20 +8420,25 @@ var gCSSProperties = { logical: true, axis: true, get_computed: logical_axis_prop_get_computed, - prerequisites: { "display": "block" }, - initial_values: [ "none" ], - other_values: [ "30px", "50%", + prerequisites: { display: "block" }, + initial_values: ["none"], + other_values: [ + "30px", + "50%", // these four keywords compute to the initial value only when the // writing mode is vertical, and we're testing with a horizontal // writing mode - "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "auto", "5" ] + invalid_values: ["auto", "5"], }, "min-block-size": { domProp: "minBlockSize", @@ -5416,9 +8447,11 @@ var gCSSProperties = { logical: true, axis: true, get_computed: logical_axis_prop_get_computed, - prerequisites: { "display": "block" }, - initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)" ], - other_values: [ "30px", "50%", + prerequisites: { display: "block" }, + initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"], + other_values: [ + "30px", + "50%", "calc(-1%)", "calc(2px)", "calc(50%)", @@ -5426,7 +8459,14 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "none", "5", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ] + invalid_values: [ + "none", + "5", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", + ], }, "min-inline-size": { domProp: "minInlineSize", @@ -5435,13 +8475,18 @@ var gCSSProperties = { logical: true, axis: true, get_computed: logical_axis_prop_get_computed, - prerequisites: { "display": "block" }, - initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)" ], - other_values: [ "30px", "50%", + prerequisites: { display: "block" }, + initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"], + other_values: [ + "30px", + "50%", // these four keywords compute to the initial value only when the // writing mode is vertical, and we're testing with a horizontal // writing mode - "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", + "-moz-max-content", + "-moz-min-content", + "-moz-fit-content", + "-moz-available", "calc(-1%)", "calc(2px)", "calc(50%)", @@ -5449,19 +8494,24 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ "none", "5" ] + invalid_values: ["none", "5"], }, - "inset": { + inset: { domProp: "inset", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "top", "right", "bottom", "left" ], + subproperties: ["top", "right", "bottom", "left"], /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, - initial_values: [ "auto" ], - other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px", "1em calc(2em + 3px) 4ex 5cm" ], - invalid_values: [ "1px calc(nonsense)", "1px red", "3" ], - unbalanced_values: [ "1px calc(" ], + prerequisites: { position: "relative" }, + initial_values: ["auto"], + other_values: [ + "3px 0", + "2em 4px 2pt", + "1em 2em 3px 4px", + "1em calc(2em + 3px) 4ex 5cm", + ], + invalid_values: ["1px calc(nonsense)", "1px red", "3"], + unbalanced_values: ["1px calc("], }, "inset-block-end": { domProp: "insetBlockEnd", @@ -5470,10 +8520,13 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, + prerequisites: { position: "relative" }, /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", + initial_values: ["auto"], + other_values: [ + "32px", + "-3em", + "12%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -5481,7 +8534,7 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [] + invalid_values: [], }, "inset-block-start": { domProp: "insetBlockStart", @@ -5490,10 +8543,13 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, + prerequisites: { position: "relative" }, /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", + initial_values: ["auto"], + other_values: [ + "32px", + "-3em", + "12%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -5501,7 +8557,7 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [] + invalid_values: [], }, "inset-inline-end": { domProp: "insetInlineEnd", @@ -5510,10 +8566,13 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, + prerequisites: { position: "relative" }, /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", + initial_values: ["auto"], + other_values: [ + "32px", + "-3em", + "12%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -5521,7 +8580,7 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [] + invalid_values: [], }, "inset-inline-start": { domProp: "insetInlineStart", @@ -5530,10 +8589,13 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, /* FIXME: run tests with multiple prerequisites */ - prerequisites: { "position": "relative" }, + prerequisites: { position: "relative" }, /* XXX 0 may or may not be equal to auto */ - initial_values: [ "auto" ], - other_values: [ "32px", "-3em", "12%", + initial_values: ["auto"], + other_values: [ + "32px", + "-3em", + "12%", "calc(2px)", "calc(-2px)", "calc(50%)", @@ -5541,7 +8603,7 @@ var gCSSProperties = { "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [] + invalid_values: [], }, "offset-block-start": { domProp: "offsetBlockStart", @@ -5550,7 +8612,7 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, alias_for: "inset-block-start", - subproperties: [ "inset-block-start" ], + subproperties: ["inset-block-start"], }, "offset-block-end": { domProp: "offsetBlockEnd", @@ -5559,7 +8621,7 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, alias_for: "inset-block-end", - subproperties: [ "inset-block-end" ], + subproperties: ["inset-block-end"], }, "offset-inline-start": { domProp: "offsetInlineStart", @@ -5568,7 +8630,7 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, alias_for: "inset-inline-start", - subproperties: [ "inset-inline-start" ], + subproperties: ["inset-inline-start"], }, "offset-inline-end": { domProp: "offsetInlineEnd", @@ -5577,15 +8639,18 @@ var gCSSProperties = { logical: true, get_computed: logical_box_prop_get_computed, alias_for: "inset-inline-end", - subproperties: [ "inset-inline-end" ], + subproperties: ["inset-inline-end"], }, "padding-block": { domProp: "paddingBlock", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "padding-block-start", "padding-block-end" ], - initial_values: [ "0", "0px 0em" ], - other_values: [ "1px", "3em 1%", "5%", + subproperties: ["padding-block-start", "padding-block-end"], + initial_values: ["0", "0px 0em"], + other_values: [ + "1px", + "3em 1%", + "5%", "calc(2px) 1%", "calc(-2px) 1%", "calc(50%) 1%", @@ -5593,7 +8658,21 @@ var gCSSProperties = { "calc(25px*3) 1em", "calc(3*25px + 50%) calc(3*25px - 50%)", ], - invalid_values: [ "5", "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], + invalid_values: [ + "5", + "..25px", + ".+5px", + ".px", + "-.px", + "++5px", + "-+4px", + "+-3px", + "--7px", + "+-.6px", + "-+.5px", + "++.7px", + "--.4px", + ], }, "padding-block-end": { domProp: "paddingBlockEnd", @@ -5601,15 +8680,26 @@ var gCSSProperties = { type: CSS_TYPE_LONGHAND, logical: true, get_computed: logical_box_prop_get_computed, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "calc(0pt)", + "calc(0% + 0px)", + "calc(-3px)", + "calc(-1%)", + ], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], + invalid_values: [], }, "padding-block-start": { domProp: "paddingBlockStart", @@ -5617,22 +8707,33 @@ var gCSSProperties = { type: CSS_TYPE_LONGHAND, logical: true, get_computed: logical_box_prop_get_computed, - initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ], - other_values: [ "1px", "2em", "5%", + initial_values: [ + "0", + "0px", + "0%", + "calc(0pt)", + "calc(0% + 0px)", + "calc(-3px)", + "calc(-1%)", + ], + other_values: [ + "1px", + "2em", + "5%", "calc(2px)", "calc(50%)", "calc(3*25px)", "calc(25px*3)", "calc(3*25px + 50%)", ], - invalid_values: [ ], + invalid_values: [], }, "-moz-padding-end": { domProp: "MozPaddingEnd", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "padding-inline-end", - subproperties: [ "padding-inline-end" ], + subproperties: ["padding-inline-end"], get_computed: logical_box_prop_get_computed, }, "-moz-padding-start": { @@ -5640,37 +8741,48 @@ var gCSSProperties = { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "padding-inline-start", - subproperties: [ "padding-inline-start" ], + subproperties: ["padding-inline-start"], get_computed: logical_box_prop_get_computed, }, -} // end of gCSSProperties +}; // end of gCSSProperties -function logical_axis_prop_get_computed(cs, property) -{ +function logical_axis_prop_get_computed(cs, property) { // Use defaults for these two properties in case the vertical text // pref (which they live behind) is turned off. var writingMode = cs.getPropertyValue("writing-mode") || "horizontal-tb"; var orientation = writingMode.substring(0, writingMode.indexOf("-")); var mappings = { - "block-size": { horizontal: "height", - vertical: "width", - sideways: "width" }, - "inline-size": { horizontal: "width", - vertical: "height", - sideways: "height" }, - "max-block-size": { horizontal: "max-height", - vertical: "max-width", - sideways: "max-width" }, - "max-inline-size": { horizontal: "max-width", - vertical: "max-height", - sideways: "max-height" }, - "min-block-size": { horizontal: "min-height", - vertical: "min-width", - sideways: "min-width" }, - "min-inline-size": { horizontal: "min-width", - vertical: "min-height", - sideways: "min-height" }, + "block-size": { + horizontal: "height", + vertical: "width", + sideways: "width", + }, + "inline-size": { + horizontal: "width", + vertical: "height", + sideways: "height", + }, + "max-block-size": { + horizontal: "max-height", + vertical: "max-width", + sideways: "max-width", + }, + "max-inline-size": { + horizontal: "max-width", + vertical: "max-height", + sideways: "max-height", + }, + "min-block-size": { + horizontal: "min-height", + vertical: "min-width", + sideways: "min-width", + }, + "min-inline-size": { + horizontal: "min-width", + vertical: "min-height", + sideways: "min-height", + }, }; if (!mappings[property]) { @@ -5685,8 +8797,7 @@ function logical_axis_prop_get_computed(cs, property) return cs.getPropertyValue(prop); } -function logical_box_prop_get_computed(cs, property) -{ +function logical_box_prop_get_computed(cs, property) { // http://dev.w3.org/csswg/css-writing-modes-3/#logical-to-physical // Use default for writing-mode in case the vertical text @@ -5697,26 +8808,26 @@ function logical_box_prop_get_computed(cs, property) // keys in blockMappings are writing-mode values var blockMappings = { - "horizontal-tb": { "start": "top", "end": "bottom" }, - "vertical-rl": { "start": "right", "end": "left" }, - "vertical-lr": { "start": "left", "end": "right" }, - "sideways-rl": { "start": "right", "end": "left" }, - "sideways-lr": { "start": "left", "end": "right" }, + "horizontal-tb": { start: "top", end: "bottom" }, + "vertical-rl": { start: "right", end: "left" }, + "vertical-lr": { start: "left", end: "right" }, + "sideways-rl": { start: "right", end: "left" }, + "sideways-lr": { start: "left", end: "right" }, }; // keys in inlineMappings are regular expressions that match against // a {writing-mode,direction} pair as a space-separated string var inlineMappings = { - "horizontal-tb ltr": { "start": "left", "end": "right" }, - "horizontal-tb rtl": { "start": "right", "end": "left" }, - "vertical-.. ltr": { "start": "bottom", "end": "top" }, - "vertical-.. rtl": { "start": "top", "end": "bottom" }, - "vertical-.. ltr": { "start": "top", "end": "bottom" }, - "vertical-.. rtl": { "start": "bottom", "end": "top" }, - "sideways-lr ltr": { "start": "bottom", "end": "top" }, - "sideways-lr rtl": { "start": "top", "end": "bottom" }, - "sideways-rl ltr": { "start": "top", "end": "bottom" }, - "sideways-rl rtl": { "start": "bottom", "end": "top" }, + "horizontal-tb ltr": { start: "left", end: "right" }, + "horizontal-tb rtl": { start: "right", end: "left" }, + "vertical-.. ltr": { start: "bottom", end: "top" }, + "vertical-.. rtl": { start: "top", end: "bottom" }, + "vertical-.. ltr": { start: "top", end: "bottom" }, + "vertical-.. rtl": { start: "bottom", end: "top" }, + "sideways-lr ltr": { start: "bottom", end: "top" }, + "sideways-lr rtl": { start: "top", end: "bottom" }, + "sideways-rl ltr": { start: "top", end: "bottom" }, + "sideways-rl rtl": { start: "bottom", end: "top" }, }; var blockMapping = blockMappings[writingMode]; @@ -5748,7 +8859,7 @@ function logical_box_prop_get_computed(cs, property) if (/^-moz-/.test(property)) { property = physicalize(property.substring(5), inlineMapping, ""); } else if (/^(offset|inset)-(block|inline)-(start|end)/.test(property)) { - property = property.replace("offset-", "").replace("inset-", ""); // we want "top" not "offset-top", e.g. + property = property.replace("offset-", "").replace("inset-", ""); // we want "top" not "offset-top", e.g. property = physicalize(property, blockMapping, "block-"); property = physicalize(property, inlineMapping, "inline-"); } else if (/-(block|inline)-(start|end)/.test(property)) { @@ -5762,12 +8873,13 @@ function logical_box_prop_get_computed(cs, property) // Get the computed value for a property. For shorthands, return the // computed values of all the subproperties, delimited by " ; ". -function get_computed_value(cs, property) -{ +function get_computed_value(cs, property) { var info = gCSSProperties[property]; - if (info.type == CSS_TYPE_TRUE_SHORTHAND || - (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND && - (property == "text-decoration" || property == "mask"))) { + if ( + info.type == CSS_TYPE_TRUE_SHORTHAND || + (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND && + (property == "text-decoration" || property == "mask")) + ) { var results = []; for (var idx in info.subproperties) { var subprop = info.subproperties[idx]; @@ -5775,29 +8887,83 @@ function get_computed_value(cs, property) } return results.join(" ; "); } - if (info.get_computed) - return info.get_computed(cs, property); + if (info.get_computed) return info.get_computed(cs, property); return cs.getPropertyValue(property); } if (IsCSSPropertyPrefEnabled("layout.css.touch_action.enabled")) { - gCSSProperties["touch-action"] = { - domProp: "touchAction", - inherited: false, - type: CSS_TYPE_LONGHAND, - initial_values: ["auto"], - other_values: ["none", "pan-x", "pan-y", "pan-x pan-y", "pan-y pan-x", "manipulation"], - invalid_values: ["zoom", "pinch", "tap", "10px", "2", "auto pan-x", "pan-x auto", "none pan-x", "pan-x none", - "auto pan-y", "pan-y auto", "none pan-y", "pan-y none", "pan-x pan-x", "pan-y pan-y", - "pan-x pan-y none", "pan-x none pan-y", "none pan-x pan-y", "pan-y pan-x none", "pan-y none pan-x", "none pan-y pan-x", - "pan-x pan-y auto", "pan-x auto pan-y", "auto pan-x pan-y", "pan-y pan-x auto", "pan-y auto pan-x", "auto pan-y pan-x", - "pan-x pan-y zoom", "pan-x zoom pan-y", "zoom pan-x pan-y", "pan-y pan-x zoom", "pan-y zoom pan-x", "zoom pan-y pan-x", - "pan-x pan-y pan-x", "pan-x pan-x pan-y", "pan-y pan-x pan-x", "pan-y pan-x pan-y", "pan-y pan-y pan-x", "pan-x pan-y pan-y", - "manipulation none", "none manipulation", "manipulation auto", "auto manipulation", "manipulation zoom", "zoom manipulation", - "manipulation manipulation", "manipulation pan-x", "pan-x manipulation", "manipulation pan-y", "pan-y manipulation", - "manipulation pan-x pan-y", "pan-x manipulation pan-y", "pan-x pan-y manipulation", - "manipulation pan-y pan-x", "pan-y manipulation pan-x", "pan-y pan-x manipulation"] - }; + gCSSProperties["touch-action"] = { + domProp: "touchAction", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: ["auto"], + other_values: [ + "none", + "pan-x", + "pan-y", + "pan-x pan-y", + "pan-y pan-x", + "manipulation", + ], + invalid_values: [ + "zoom", + "pinch", + "tap", + "10px", + "2", + "auto pan-x", + "pan-x auto", + "none pan-x", + "pan-x none", + "auto pan-y", + "pan-y auto", + "none pan-y", + "pan-y none", + "pan-x pan-x", + "pan-y pan-y", + "pan-x pan-y none", + "pan-x none pan-y", + "none pan-x pan-y", + "pan-y pan-x none", + "pan-y none pan-x", + "none pan-y pan-x", + "pan-x pan-y auto", + "pan-x auto pan-y", + "auto pan-x pan-y", + "pan-y pan-x auto", + "pan-y auto pan-x", + "auto pan-y pan-x", + "pan-x pan-y zoom", + "pan-x zoom pan-y", + "zoom pan-x pan-y", + "pan-y pan-x zoom", + "pan-y zoom pan-x", + "zoom pan-y pan-x", + "pan-x pan-y pan-x", + "pan-x pan-x pan-y", + "pan-y pan-x pan-x", + "pan-y pan-x pan-y", + "pan-y pan-y pan-x", + "pan-x pan-y pan-y", + "manipulation none", + "none manipulation", + "manipulation auto", + "auto manipulation", + "manipulation zoom", + "zoom manipulation", + "manipulation manipulation", + "manipulation pan-x", + "pan-x manipulation", + "manipulation pan-y", + "pan-y manipulation", + "manipulation pan-x pan-y", + "pan-x manipulation pan-y", + "pan-x pan-y manipulation", + "manipulation pan-y pan-x", + "pan-y manipulation pan-x", + "pan-y pan-x manipulation", + ], + }; } if (IsCSSPropertyPrefEnabled("layout.css.text-combine-upright.enabled")) { @@ -5805,15 +8971,35 @@ if (IsCSSPropertyPrefEnabled("layout.css.text-combine-upright.enabled")) { domProp: "textCombineUpright", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "all" ], - invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0", - "digits 12", "none 3", "digits 3.1415", "digits3", "digits 1", - "digits 3 all", "digits foo", "digits all", "digits 3.0" ] + initial_values: ["none"], + other_values: ["all"], + invalid_values: [ + "auto", + "all 2", + "none all", + "digits -3", + "digits 0", + "digits 12", + "none 3", + "digits 3.1415", + "digits3", + "digits 1", + "digits 3 all", + "digits foo", + "digits all", + "digits 3.0", + ], }; - if (IsCSSPropertyPrefEnabled("layout.css.text-combine-upright-digits.enabled")) { + if ( + IsCSSPropertyPrefEnabled("layout.css.text-combine-upright-digits.enabled") + ) { gCSSProperties["text-combine-upright"].other_values.push( - "digits", "digits 2", "digits 3", "digits 4", "digits 3"); + "digits", + "digits 2", + "digits 3", + "digits 4", + "digits 3", + ); } } @@ -5822,9 +9008,9 @@ if (IsCSSPropertyPrefEnabled("layout.css.text-justify.enabled")) { domProp: "textJustify", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none", "inter-word", "inter-character", "distribute" ], - invalid_values: [] + initial_values: ["auto"], + other_values: ["none", "inter-word", "inter-character", "distribute"], + invalid_values: [], }; } @@ -5833,9 +9019,14 @@ if (IsCSSPropertyPrefEnabled("svg.paint-order.enabled")) { domProp: "paintOrder", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "fill", "fill stroke", "fill stroke markers", "stroke markers fill" ], - invalid_values: [ "fill stroke markers fill", "fill normal" ] + initial_values: ["normal"], + other_values: [ + "fill", + "fill stroke", + "fill stroke markers", + "stroke markers fill", + ], + invalid_values: ["fill stroke markers fill", "fill normal"], }; } @@ -5844,9 +9035,9 @@ if (IsCSSPropertyPrefEnabled("svg.transform-box.enabled")) { domProp: "transformBox", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "border-box" ], - other_values: [ "fill-box", "view-box" ], - invalid_values: [] + initial_values: ["border-box"], + other_values: ["fill-box", "view-box"], + invalid_values: [], }; } @@ -6022,7 +9213,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.clip-path-shapes.enabled")) { domProp: "clipPath", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: [ // SVG reference clip-path "url(#my-clip-path)", @@ -6045,22 +9236,19 @@ if (IsCSSPropertyPrefEnabled("layout.css.shape-outside.enabled")) { domProp: "shapeOutside", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ - "url(#my-shape-outside)", - ].concat(basicShapeOtherValues), + initial_values: ["none"], + other_values: ["url(#my-shape-outside)"].concat(basicShapeOtherValues), invalid_values: basicShapeInvalidValues, unbalanced_values: basicShapeUnbalancedValues, }; } - if (IsCSSPropertyPrefEnabled("layout.css.filters.enabled")) { gCSSProperties["filter"] = { domProp: "filter", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: [ // SVG reference filters "url(#my-filter)", @@ -6112,7 +9300,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.filters.enabled")) { "drop-shadow(green 2px 2px)", "drop-shadow(green 2px 2px 1px)", "drop-shadow(currentColor 3px 3px)", - "drop-shadow(2px 2px calc(-5px))", /* clamped */ + "drop-shadow(2px 2px calc(-5px))" /* clamped */, "drop-shadow(calc(3em - 2px) 2px green)", "drop-shadow(green calc(3em - 2px) 2px)", "drop-shadow(2px calc(2px + 0.2em))", @@ -6286,19 +9474,20 @@ if (IsCSSPropertyPrefEnabled("layout.css.filters.enabled")) { "sepia(#my-filter)", "sepia(10px)", "sepia(-1)", - ] + ], }; } -var isGridTemplateSubgridValueEnabled = - IsCSSPropertyPrefEnabled("layout.css.grid-template-subgrid-value.enabled"); +var isGridTemplateSubgridValueEnabled = IsCSSPropertyPrefEnabled( + "layout.css.grid-template-subgrid-value.enabled", +); gCSSProperties["display"].other_values.push("grid", "inline-grid"); gCSSProperties["grid-auto-flow"] = { domProp: "gridAutoFlow", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "row" ], + initial_values: ["row"], other_values: [ "column", "column dense", @@ -6307,21 +9496,14 @@ gCSSProperties["grid-auto-flow"] = { "dense row", "dense", ], - invalid_values: [ - "", - "auto", - "none", - "10px", - "column row", - "dense row dense", - ] + invalid_values: ["", "auto", "none", "10px", "column row", "dense row dense"], }; gCSSProperties["grid-auto-columns"] = { domProp: "gridAutoColumns", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], + initial_values: ["auto"], other_values: [ "40px", "2em", @@ -6356,7 +9538,7 @@ gCSSProperties["grid-auto-columns"] = { "fit-content(-1px)", "fit-content(auto)", "fit-content(min-content)", - ] + ], }; gCSSProperties["grid-auto-rows"] = { domProp: "gridAutoRows", @@ -6364,14 +9546,14 @@ gCSSProperties["grid-auto-rows"] = { type: CSS_TYPE_LONGHAND, initial_values: gCSSProperties["grid-auto-columns"].initial_values, other_values: gCSSProperties["grid-auto-columns"].other_values, - invalid_values: gCSSProperties["grid-auto-columns"].invalid_values + invalid_values: gCSSProperties["grid-auto-columns"].invalid_values, }; gCSSProperties["grid-template-columns"] = { domProp: "gridTemplateColumns", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: [ "auto", "40px", @@ -6475,9 +9657,7 @@ gCSSProperties["grid-template-columns"] = { "fit-content(1px) repeat(auto-fit, 1px)", "fit-content(1px) repeat(auto-fill, 1px)", ], - unbalanced_values: [ - "(foo] 40px", - ] + unbalanced_values: ["(foo] 40px"], }; if (isGridTemplateSubgridValueEnabled) { gCSSProperties["grid-template-columns"].other_values.push( @@ -6490,7 +9670,7 @@ if (isGridTemplateSubgridValueEnabled) { "subgrid Repeat(4, [a] [b c] [] [d])", "subgrid repeat(auto-fill, [])", "subgrid [x] repeat( Auto-fill, [a b c]) []", - "subgrid [x] repeat(auto-fill, []) [y z]" + "subgrid [x] repeat(auto-fill, []) [y z]", ); gCSSProperties["grid-template-columns"].invalid_values.push( "subgrid [inherit]", @@ -6518,7 +9698,7 @@ if (isGridTemplateSubgridValueEnabled) { "subgrid repeat(auto-fill, 1px)", "subgrid repeat(auto-fill, 1px [])", "subgrid repeat(Auto-fill, [a] [b c] [] [d])", - "subgrid repeat(auto-fill, []) repeat(auto-fill, [])" + "subgrid repeat(auto-fill, []) repeat(auto-fill, [])", ); } gCSSProperties["grid-template-rows"] = { @@ -6527,13 +9707,13 @@ gCSSProperties["grid-template-rows"] = { type: CSS_TYPE_LONGHAND, initial_values: gCSSProperties["grid-template-columns"].initial_values, other_values: gCSSProperties["grid-template-columns"].other_values, - invalid_values: gCSSProperties["grid-template-columns"].invalid_values + invalid_values: gCSSProperties["grid-template-columns"].invalid_values, }; gCSSProperties["grid-template-areas"] = { domProp: "gridTemplateAreas", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: [ "''", "'' ''", @@ -6553,7 +9733,7 @@ gCSSProperties["grid-template-areas"] = { "'a a .' 'a a a'", "'a a' 'a .'", "'a a'\n'..'\n'a a'", - ] + ], }; gCSSProperties["grid-template"] = { @@ -6565,10 +9745,7 @@ gCSSProperties["grid-template"] = { "grid-template-rows", "grid-template-columns", ], - initial_values: [ - "none", - "none / none", - ], + initial_values: ["none", "none / none"], other_values: [ // <'grid-template-rows'> / <'grid-template-columns'> "40px / 100px", @@ -6591,8 +9768,8 @@ gCSSProperties["grid-template"] = { "[foo] [bar] 40px / 100px", "[fizz] [buzz] 100px / 40px", "[fizz] [buzz] 'foo' / 40px", - "'foo' / none" - ] + "'foo' / none", + ], }; if (isGridTemplateSubgridValueEnabled) { gCSSProperties["grid-template"].other_values.push( @@ -6602,12 +9779,12 @@ if (isGridTemplateSubgridValueEnabled) { "40px 20px/subgrid", "40px 20px/subgrid [foo] [] repeat(3, [a] [b]) [bar baz]", "subgrid/subgrid", - "subgrid [foo] [] [bar baz]/subgrid [foo] [] [bar baz]" + "subgrid [foo] [] [bar baz]/subgrid [foo] [] [bar baz]", ); gCSSProperties["grid-template"].invalid_values.push( "subgrid []", "subgrid [] / 'fizz'", - "subgrid / 'fizz'" + "subgrid / 'fizz'", ); } @@ -6625,10 +9802,7 @@ gCSSProperties["grid"] = { "grid-column-gap", "grid-row-gap", ], - initial_values: [ - "none", - "none / none", - ], + initial_values: ["none", "none / none"], other_values: [ "auto-flow 40px / none", "auto-flow / 40px", @@ -6638,9 +9812,7 @@ gCSSProperties["grid"] = { "none / auto-flow 40px", "40px / auto-flow", "none / dense auto-flow auto", - ].concat( - gCSSProperties["grid-template"].other_values - ), + ].concat(gCSSProperties["grid-template"].other_values), invalid_values: [ "auto-flow", " / auto-flow", @@ -6656,9 +9828,8 @@ gCSSProperties["grid"] = { ].concat( gCSSProperties["grid-template"].invalid_values, gCSSProperties["grid-auto-flow"].other_values, - gCSSProperties["grid-auto-flow"].invalid_values - .filter((v) => v != 'none') - ) + gCSSProperties["grid-auto-flow"].invalid_values.filter((v) => v != "none"), + ), }; var gridLineOtherValues = [ @@ -6706,47 +9877,46 @@ gCSSProperties["grid-column-start"] = { domProp: "gridColumnStart", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], + initial_values: ["auto"], other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues + invalid_values: gridLineInvalidValues, }; gCSSProperties["grid-column-end"] = { domProp: "gridColumnEnd", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], + initial_values: ["auto"], other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues + invalid_values: gridLineInvalidValues, }; gCSSProperties["grid-row-start"] = { domProp: "gridRowStart", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], + initial_values: ["auto"], other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues + invalid_values: gridLineInvalidValues, }; gCSSProperties["grid-row-end"] = { domProp: "gridRowEnd", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], + initial_values: ["auto"], other_values: gridLineOtherValues, - invalid_values: gridLineInvalidValues + invalid_values: gridLineInvalidValues, }; // The grid-column and grid-row shorthands take values of the form // [ / ]? var gridColumnRowOtherValues = [].concat(gridLineOtherValues); -gridLineOtherValues.concat([ "auto" ]).forEach(function(val) { +gridLineOtherValues.concat(["auto"]).forEach(function (val) { gridColumnRowOtherValues.push(" foo / " + val); gridColumnRowOtherValues.push(val + "/2"); }); -var gridColumnRowInvalidValues = [ - "foo, bar", - "foo / bar / baz", -].concat(gridLineInvalidValues); -gridLineInvalidValues.forEach(function(val) { +var gridColumnRowInvalidValues = ["foo, bar", "foo / bar / baz"].concat( + gridLineInvalidValues, +); +gridLineInvalidValues.forEach(function (val) { gridColumnRowInvalidValues.push("span 3 / " + val); gridColumnRowInvalidValues.push(val + " / foo"); }); @@ -6754,29 +9924,23 @@ gCSSProperties["grid-column"] = { domProp: "gridColumn", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-column-start", - "grid-column-end" - ], - initial_values: [ "auto", "auto / auto" ], + subproperties: ["grid-column-start", "grid-column-end"], + initial_values: ["auto", "auto / auto"], other_values: gridColumnRowOtherValues, - invalid_values: gridColumnRowInvalidValues + invalid_values: gridColumnRowInvalidValues, }; gCSSProperties["grid-row"] = { domProp: "gridRow", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ - "grid-row-start", - "grid-row-end" - ], - initial_values: [ "auto", "auto / auto" ], + subproperties: ["grid-row-start", "grid-row-end"], + initial_values: ["auto", "auto / auto"], other_values: gridColumnRowOtherValues, - invalid_values: gridColumnRowInvalidValues + invalid_values: gridColumnRowInvalidValues, }; var gridAreaOtherValues = gridLineOtherValues.slice(); -gridLineOtherValues.forEach(function(val) { +gridLineOtherValues.forEach(function (val) { gridAreaOtherValues.push("foo / " + val); gridAreaOtherValues.push(val + "/2/3"); gridAreaOtherValues.push("foo / bar / " + val + " / baz"); @@ -6789,7 +9953,7 @@ var gridAreaInvalidValues = [ "foo / bar / inherit / baz", "foo / bar / baz / unset", ].concat(gridLineInvalidValues); -gridLineInvalidValues.forEach(function(val) { +gridLineInvalidValues.forEach(function (val) { gridAreaInvalidValues.push("foo / " + val); gridAreaInvalidValues.push("foo / bar / " + val); gridAreaInvalidValues.push("foo / 4 / bar / " + val); @@ -6803,67 +9967,99 @@ gCSSProperties["grid-area"] = { "grid-row-start", "grid-column-start", "grid-row-end", - "grid-column-end" + "grid-column-end", ], initial_values: [ "auto", "auto / auto", "auto / auto / auto", - "auto / auto / auto / auto" + "auto / auto / auto / auto", ], other_values: gridAreaOtherValues, - invalid_values: gridAreaInvalidValues + invalid_values: gridAreaInvalidValues, }; gCSSProperties["column-gap"] = { domProp: "columnGap", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "2px", "2%", "1em", "calc(1px + 1em)", "calc(1%)", - "calc(1% + 1ch)" , "calc(1px - 99%)" ], - invalid_values: [ "-1px", "auto", "none", "1px 1px", "-1%", "fit-content(1px)" ], + initial_values: ["normal"], + other_values: [ + "2px", + "2%", + "1em", + "calc(1px + 1em)", + "calc(1%)", + "calc(1% + 1ch)", + "calc(1px - 99%)", + ], + invalid_values: [ + "-1px", + "auto", + "none", + "1px 1px", + "-1%", + "fit-content(1px)", + ], }; gCSSProperties["grid-column-gap"] = { domProp: "gridColumnGap", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "column-gap", - subproperties: [ "column-gap" ] + subproperties: ["column-gap"], }; gCSSProperties["row-gap"] = { domProp: "rowGap", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "2px", "2%", "1em", "calc(1px + 1em)", "calc(1%)", - "calc(1% + 1ch)" , "calc(1px - 99%)" ], - invalid_values: [ "-1px", "auto", "none", "1px 1px", "-1%", "min-content" ], + initial_values: ["normal"], + other_values: [ + "2px", + "2%", + "1em", + "calc(1px + 1em)", + "calc(1%)", + "calc(1% + 1ch)", + "calc(1px - 99%)", + ], + invalid_values: ["-1px", "auto", "none", "1px 1px", "-1%", "min-content"], }; gCSSProperties["grid-row-gap"] = { domProp: "gridRowGap", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "row-gap", - subproperties: [ "row-gap" ] + subproperties: ["row-gap"], }; gCSSProperties["gap"] = { domProp: "gap", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "column-gap", "row-gap" ], - initial_values: [ "normal", "normal normal" ], - other_values: [ "1ch 0", "1px 1%", "1em 1px", "calc(1px) calc(1%)", - "normal 0", "1% normal" ], - invalid_values: [ "-1px", "1px -1px", "1px 1px 1px", "inherit 1px", - "1px auto" ] + subproperties: ["column-gap", "row-gap"], + initial_values: ["normal", "normal normal"], + other_values: [ + "1ch 0", + "1px 1%", + "1em 1px", + "calc(1px) calc(1%)", + "normal 0", + "1% normal", + ], + invalid_values: [ + "-1px", + "1px -1px", + "1px 1px 1px", + "inherit 1px", + "1px auto", + ], }; gCSSProperties["grid-gap"] = { domProp: "gridGap", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "gap", - subproperties: [ "column-gap", "row-gap" ], + subproperties: ["column-gap", "row-gap"], }; if (IsCSSPropertyPrefEnabled("layout.css.display-contents.enabled")) { @@ -6875,7 +10071,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.contain.enabled")) { domProp: "contain", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: [ "strict", "layout", @@ -6906,7 +10102,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.contain.enabled")) { "auto", "10px", "0", - ] + ], }; } @@ -6981,7 +10177,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.image-orientation.enabled")) { "from-image 0deg", "flip from-image", "from-image flip", - ] + ], }; } @@ -6990,9 +10186,9 @@ if (IsCSSPropertyPrefEnabled("layout.css.initial-letter.enabled")) { domProp: "initialLetter", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "2", "2.5", "3.7 2", "4 3" ], - invalid_values: [ "-3", "3.7 -2", "25%", "16px", "1 0", "0", "0 1" ] + initial_values: ["normal"], + other_values: ["2", "2.5", "3.7 2", "4 3"], + invalid_values: ["-3", "3.7 -2", "25%", "16px", "1 0", "0", "0 1"], }; } @@ -7001,9 +10197,9 @@ if (IsCSSPropertyPrefEnabled("layout.css.osx-font-smoothing.enabled")) { domProp: "MozOsxFontSmoothing", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "grayscale" ], - invalid_values: [ "none", "subpixel-antialiased", "antialiased" ] + initial_values: ["auto"], + other_values: ["grayscale"], + invalid_values: ["none", "subpixel-antialiased", "antialiased"], }; } @@ -7012,10 +10208,25 @@ if (IsCSSPropertyPrefEnabled("layout.css.mix-blend-mode.enabled")) { domProp: "mixBlendMode", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: ["multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", - "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], - invalid_values: [] + initial_values: ["normal"], + other_values: [ + "multiply", + "screen", + "overlay", + "darken", + "lighten", + "color-dodge", + "color-burn", + "hard-light", + "soft-light", + "difference", + "exclusion", + "hue", + "saturation", + "color", + "luminosity", + ], + invalid_values: [], }; } @@ -7024,9 +10235,9 @@ if (IsCSSPropertyPrefEnabled("layout.css.isolation.enabled")) { domProp: "isolation", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], + initial_values: ["auto"], other_values: ["isolate"], - invalid_values: [] + invalid_values: [], }; } @@ -7035,10 +10246,25 @@ if (IsCSSPropertyPrefEnabled("layout.css.background-blend-mode.enabled")) { domProp: "backgroundBlendMode", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", - "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ], - invalid_values: ["none", "10px", "multiply multiply"] + initial_values: ["normal"], + other_values: [ + "multiply", + "screen", + "overlay", + "darken", + "lighten", + "color-dodge", + "color-burn", + "hard-light", + "soft-light", + "difference", + "exclusion", + "hue", + "saturation", + "color", + "luminosity", + ], + invalid_values: ["none", "10px", "multiply multiply"], }; } @@ -7047,15 +10273,15 @@ if (IsCSSPropertyPrefEnabled("layout.css.object-fit-and-position.enabled")) { domProp: "objectFit", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "fill" ], - other_values: [ "contain", "cover", "none", "scale-down" ], - invalid_values: [ "auto", "5px", "100%" ] + initial_values: ["fill"], + other_values: ["contain", "cover", "none", "scale-down"], + invalid_values: ["auto", "5px", "100%"], }; gCSSProperties["object-position"] = { domProp: "objectPosition", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "50% 50%", "50%", "center", "center center" ], + initial_values: ["50% 50%", "50%", "center", "center center"], other_values: [ "calc(20px)", "calc(20px) 10px", @@ -7084,13 +10310,24 @@ if (IsCSSPropertyPrefEnabled("layout.css.object-fit-and-position.enabled")) { "left top 15px", "left 10px top", "left 20%", - "right 20%" + "right 20%", + ], + invalid_values: [ + "center 10px center 4px", + "center 10px center", + "top 20%", + "bottom 20%", + "50% left", + "top 50%", + "50% bottom 10%", + "right 10% 50%", + "left right", + "top bottom", + "left 10% right", + "top 20px bottom 20px", + "left left", + "20 20", ], - invalid_values: [ "center 10px center 4px", "center 10px center", - "top 20%", "bottom 20%", "50% left", "top 50%", - "50% bottom 10%", "right 10% 50%", "left right", - "top bottom", "left 10% right", - "top 20px bottom 20px", "left left", "20 20" ] }; } @@ -7099,9 +10336,9 @@ if (IsCSSPropertyPrefEnabled("layout.css.overflow-clip-box.enabled")) { domProp: "overflowClipBox", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "padding-box" ], - other_values: [ "content-box" ], - invalid_values: [ "none", "auto", "border-box", "0" ] + initial_values: ["padding-box"], + other_values: ["content-box"], + invalid_values: ["none", "auto", "border-box", "0"], }; } @@ -7110,9 +10347,9 @@ if (IsCSSPropertyPrefEnabled("layout.css.box-decoration-break.enabled")) { domProp: "boxDecorationBreak", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "slice" ], - other_values: [ "clone" ], - invalid_values: [ "auto", "none", "1px" ] + initial_values: ["slice"], + other_values: ["clone"], + invalid_values: ["auto", "none", "1px"], }; } @@ -7121,9 +10358,9 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-behavior.property-enabled")) { domProp: "scrollBehavior", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "smooth" ], - invalid_values: [ "none", "1px" ] + initial_values: ["auto"], + other_values: ["smooth"], + invalid_values: ["none", "1px"], }; } @@ -7132,77 +10369,90 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-snap.enabled")) { domProp: "scrollSnapCoordinate", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "25% 25%", "top", "0px 100px, 10em 50%", - "top left, top right, bottom left, bottom right, center", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)", - "calc(20%) calc(3*25px), center"], - invalid_values: [ "auto", "default" ] - } + initial_values: ["none"], + other_values: [ + "25% 25%", + "top", + "0px 100px, 10em 50%", + "top left, top right, bottom left, bottom right, center", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + "calc(20%) calc(3*25px), center", + ], + invalid_values: ["auto", "default"], + }; gCSSProperties["scroll-snap-destination"] = { domProp: "scrollSnapDestination", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "0px 0px" ], - other_values: [ "25% 25%", "6px 5px", "20% 3em", "0in 1in", - "top", "right", "top left", "top right", "center", - "calc(2px)", - "calc(50%)", - "calc(3*25px)", - "calc(3*25px) 5px", - "5px calc(3*25px)", - "calc(20%) calc(3*25px)", - "calc(25px*3)", - "calc(3*25px + 50%)"], - invalid_values: [ "auto", "none", "default" ] - } + initial_values: ["0px 0px"], + other_values: [ + "25% 25%", + "6px 5px", + "20% 3em", + "0in 1in", + "top", + "right", + "top left", + "top right", + "center", + "calc(2px)", + "calc(50%)", + "calc(3*25px)", + "calc(3*25px) 5px", + "5px calc(3*25px)", + "calc(20%) calc(3*25px)", + "calc(25px*3)", + "calc(3*25px + 50%)", + ], + invalid_values: ["auto", "none", "default"], + }; gCSSProperties["scroll-snap-points-x"] = { domProp: "scrollSnapPointsX", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "repeat(100%)", "repeat(120px)", "repeat(calc(3*25px))" ], - invalid_values: [ "auto", "1px", "left", "rgb(1,2,3)" ] - } + initial_values: ["none"], + other_values: ["repeat(100%)", "repeat(120px)", "repeat(calc(3*25px))"], + invalid_values: ["auto", "1px", "left", "rgb(1,2,3)"], + }; gCSSProperties["scroll-snap-points-y"] = { domProp: "scrollSnapPointsY", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "repeat(100%)", "repeat(120px)", "repeat(calc(3*25px))" ], - invalid_values: [ "auto", "1px", "top", "rgb(1,2,3)" ] - } + initial_values: ["none"], + other_values: ["repeat(100%)", "repeat(120px)", "repeat(calc(3*25px))"], + invalid_values: ["auto", "1px", "top", "rgb(1,2,3)"], + }; gCSSProperties["scroll-snap-type"] = { domProp: "scrollSnapType", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "scroll-snap-type-x", "scroll-snap-type-y" ], - initial_values: [ "none" ], - other_values: [ "mandatory", "proximity" ], - invalid_values: [ "auto", "1px" ] + subproperties: ["scroll-snap-type-x", "scroll-snap-type-y"], + initial_values: ["none"], + other_values: ["mandatory", "proximity"], + invalid_values: ["auto", "1px"], }; gCSSProperties["scroll-snap-type-x"] = { domProp: "scrollSnapTypeX", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: ["mandatory", "proximity"], - invalid_values: [ "auto", "1px" ] + invalid_values: ["auto", "1px"], }; gCSSProperties["scroll-snap-type-y"] = { domProp: "scrollSnapTypeY", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: ["mandatory", "proximity"], - invalid_values: [ "auto", "1px" ] + invalid_values: ["auto", "1px"], }; } @@ -7216,12 +10466,44 @@ if (SupportsMaskShorthand()) { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, /* FIXME: All mask-border-* should be added when we implement them. */ - subproperties: ["mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position-x", "mask-position-y", "mask-repeat", "mask-size" , "mask-composite"], - initial_values: [ "match-source", "none", "repeat", "add", "0% 0%", "top left", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto", - "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "top left / auto none", "left top / auto none", + subproperties: [ + "mask-clip", + "mask-image", + "mask-mode", + "mask-origin", + "mask-position-x", + "mask-position-y", + "mask-repeat", + "mask-size", + "mask-composite", + ], + initial_values: [ + "match-source", + "none", + "repeat", + "add", + "0% 0%", + "top left", + "0% 0% / auto", + "top left / auto", + "left top / auto", + "0% 0% / auto auto", + "top left none", + "left top none", + "none left top", + "none top left", + "none 0% 0%", + "top left / auto none", + "left top / auto none", "top left / auto auto none", - "match-source none repeat add top left", "top left repeat none add", "none repeat add top left / auto", "top left / auto repeat none add match-source", "none repeat add 0% 0% / auto auto match-source", - "border-box", "border-box border-box" ], + "match-source none repeat add top left", + "top left repeat none add", + "none repeat add top left / auto", + "top left / auto repeat none add match-source", + "none repeat add 0% 0% / auto auto match-source", + "border-box", + "border-box border-box", + ], other_values: [ "none alpha repeat add left top", "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", @@ -7273,7 +10555,8 @@ if (SupportsMaskShorthand()) { ], invalid_values: [ /* mixes with keywords have to be in correct order */ - "50% left", "top 50%", + "50% left", + "top 50%", /* no quirks mode colors */ "-moz-radial-gradient(10% bottom, ffffff, black) add no-repeat", /* no quirks mode lengths */ @@ -7281,70 +10564,132 @@ if (SupportsMaskShorthand()) { "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", "linear-gradient(red -99, yellow, green, blue 120%)", /* bug 258080: don't accept background-position separated */ - "left url(404.png) top", "top url(404.png) left", + "left url(404.png) top", + "top url(404.png) left", "alpha padding-box url(404.png) border-box", "alpha padding-box url(404.png) padding-box", "-moz-element(#a rubbish)", - "left top / match-source" - ] + "left top / match-source", + ], }; gCSSProperties["mask-clip"] = { domProp: "maskClip", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "border-box" ], - other_values: [ "content-box", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], - invalid_values: [ "margin-box", "content-box content-box" ] + initial_values: ["border-box"], + other_values: [ + "content-box", + "padding-box", + "border-box, padding-box", + "padding-box, padding-box, padding-box", + "border-box, border-box", + ], + invalid_values: ["margin-box", "content-box content-box"], }; gCSSProperties["mask-image"] = { domProp: "maskImage", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], + initial_values: ["none"], other_values: [ - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', - "none, none", - "none, none, none, none, none", - "url(#mymask)", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", - "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", - "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", + "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", + 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', + "none, none", + "none, none, none, none, none", + "url(#mymask)", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", + "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none", + "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", ].concat(validGradientAndElementValues), - invalid_values: [ - ].concat(invalidGradientAndElementValues), - unbalanced_values: [ - ].concat(unbalancedGradientAndElementValues) + invalid_values: [].concat(invalidGradientAndElementValues), + unbalanced_values: [].concat(unbalancedGradientAndElementValues), }; gCSSProperties["mask-mode"] = { domProp: "maskMode", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "match-source" ], - other_values: [ "alpha", "luminance", "match-source, match-source", "match-source, alpha", "alpha, luminance, match-source"], - invalid_values: [ "match-source match-source", "alpha match-source" ] + initial_values: ["match-source"], + other_values: [ + "alpha", + "luminance", + "match-source, match-source", + "match-source, alpha", + "alpha, luminance, match-source", + ], + invalid_values: ["match-source match-source", "alpha match-source"], }; gCSSProperties["mask-composite"] = { domProp: "maskComposite", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "add" ], - other_values: [ "subtract", "intersect", "exclude", "add, add", "subtract, intersect", "subtract, subtract, add"], - invalid_values: [ "add subtract", "intersect exclude" ] + initial_values: ["add"], + other_values: [ + "subtract", + "intersect", + "exclude", + "add, add", + "subtract, intersect", + "subtract, subtract, add", + ], + invalid_values: ["add subtract", "intersect exclude"], }; gCSSProperties["mask-origin"] = { domProp: "maskOrigin", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "border-box" ], - other_values: [ "padding-box", "content-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ], - invalid_values: [ "margin-box", "padding-box padding-box" ] + initial_values: ["border-box"], + other_values: [ + "padding-box", + "content-box", + "border-box, padding-box", + "padding-box, padding-box, padding-box", + "border-box, border-box", + ], + invalid_values: ["margin-box", "padding-box padding-box"], }; gCSSProperties["mask-position"] = { domProp: "maskPosition", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ], - other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top", + initial_values: [ + "top 0% left 0%", + "top 0% left", + "top left", + "left top", + "0% 0%", + "0% top", + "left 0%", + ], + other_values: [ + "top", + "left", + "right", + "bottom", + "center", + "center bottom", + "bottom center", + "center right", + "right center", + "center top", + "top center", + "center left", + "left center", + "right bottom", + "bottom right", + "50%", + "top left, top left", + "top left, top right", + "top right, top left", + "left top, 0% 0%", + "10% 20%, 30%, 40%", + "top left, bottom right", + "right bottom, left top", + "0%", + "0px", + "30px", + "0%, 10%, 20%, 30%", + "top, top, top, top, top", "calc(20px)", "calc(20px) 10px", "10px calc(20px)", @@ -7372,22 +10717,44 @@ if (SupportsMaskShorthand()) { "left top 15px", "left 10px top", "left 20%", - "right 20%" + "right 20%", + ], + subproperties: ["mask-position-x", "mask-position-y"], + invalid_values: [ + "center 10px center 4px", + "center 10px center", + "top 20%", + "bottom 20%", + "50% left", + "top 50%", + "50% bottom 10%", + "right 10% 50%", + "left right", + "top bottom", + "left 10% right", + "top 20px bottom 20px", + "left left", + "0px calc(0px + rubbish)", ], - subproperties: [ "mask-position-x", "mask-position-y" ], - invalid_values: [ "center 10px center 4px", "center 10px center", - "top 20%", "bottom 20%", "50% left", "top 50%", - "50% bottom 10%", "right 10% 50%", "left right", - "top bottom", "left 10% right", - "top 20px bottom 20px", "left left", - "0px calc(0px + rubbish)"], }; gCSSProperties["mask-position-x"] = { domProp: "maskPositionX", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "left", "0%" ], - other_values: [ "right", "center", "50%", "center, center", "center, right", "right, center", "center, 50%", "10%, 20%, 40%", "1px", "30px", "50%, 10%, 20%, 30%", "center, center, center, center, center", + initial_values: ["left", "0%"], + other_values: [ + "right", + "center", + "50%", + "center, center", + "center, right", + "right, center", + "center, 50%", + "10%, 20%, 40%", + "1px", + "30px", + "50%, 10%, 20%, 30%", + "center, center, center, center, center", "calc(20px)", "calc(20px + 1em)", "calc(20px / 2)", @@ -7403,17 +10770,43 @@ if (SupportsMaskShorthand()) { "right 20px", "right 3em", ], - invalid_values: [ "center 10px", "right 10% 50%", "left right", "left left", - "bottom 20px", "top 10%", "bottom 3em", - "top", "bottom", "top, top", "top, bottom", "bottom, top", "top, 0%", "top, top, top, top, top", - "calc(0px + rubbish)", "center 0%"], + invalid_values: [ + "center 10px", + "right 10% 50%", + "left right", + "left left", + "bottom 20px", + "top 10%", + "bottom 3em", + "top", + "bottom", + "top, top", + "top, bottom", + "bottom, top", + "top, 0%", + "top, top, top, top, top", + "calc(0px + rubbish)", + "center 0%", + ], }; gCSSProperties["mask-position-y"] = { domProp: "maskPositionY", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "top", "0%" ], - other_values: [ "bottom", "center", "50%", "center, center", "center, bottom", "bottom, center", "center, 0%", "10%, 20%, 40%", "1px", "30px", "50%, 10%, 20%, 30%", "center, center, center, center, center", + initial_values: ["top", "0%"], + other_values: [ + "bottom", + "center", + "50%", + "center, center", + "center, bottom", + "bottom, center", + "center, 0%", + "10%, 20%, 40%", + "1px", + "30px", + "50%, 10%, 20%, 30%", + "center, center, center, center, center", "calc(20px)", "calc(20px + 1em)", "calc(20px / 2)", @@ -7429,17 +10822,34 @@ if (SupportsMaskShorthand()) { "bottom 20px", "bottom 3em", ], - invalid_values: [ "center 10px", "bottom 10% 50%", "top bottom", "top top", - "right 20px", "left 10%", "right 3em", - "left", "right", "left, left", "left, right", "right, left", "left, 0%", "left, left, left, left, left", - "calc(0px + rubbish)", "center 0%"], + invalid_values: [ + "center 10px", + "bottom 10% 50%", + "top bottom", + "top top", + "right 20px", + "left 10%", + "right 3em", + "left", + "right", + "left, left", + "left, right", + "right, left", + "left, 0%", + "left, left, left, left, left", + "calc(0px + rubbish)", + "center 0%", + ], }; gCSSProperties["mask-repeat"] = { domProp: "maskRepeat", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "repeat", "repeat repeat" ], - other_values: [ "repeat-x", "repeat-y", "no-repeat", + initial_values: ["repeat", "repeat repeat"], + other_values: [ + "repeat-x", + "repeat-y", + "no-repeat", "repeat-x, repeat-x", "repeat, no-repeat", "repeat-y, no-repeat, repeat-y", @@ -7450,19 +10860,29 @@ if (SupportsMaskShorthand()) { "repeat no-repeat", "no-repeat no-repeat, no-repeat no-repeat", ], - invalid_values: [ "repeat repeat repeat", - "repeat-x repeat-y", - "repeat repeat-x", - "repeat repeat-y", - "repeat-x repeat", - "repeat-y repeat" ] + invalid_values: [ + "repeat repeat repeat", + "repeat-x repeat-y", + "repeat repeat-x", + "repeat repeat-y", + "repeat-x repeat", + "repeat-y repeat", + ], }; gCSSProperties["mask-size"] = { domProp: "maskSize", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto", "auto auto" ], - other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%", + initial_values: ["auto", "auto auto"], + other_values: [ + "contain", + "cover", + "100px auto", + "auto 100px", + "100% auto", + "auto 100%", + "25% 50px", + "3em 40%", "calc(20px)", "calc(20px) 10px", "10px calc(20px)", @@ -7472,18 +10892,31 @@ if (SupportsMaskShorthand()) { "calc(20px + 1em) calc(20px / 2)", "calc(20px + 50%) calc(50% - 10px)", "calc(-20px) calc(-50%)", - "calc(-20%) calc(-50%)" + "calc(-20%) calc(-50%)", + ], + invalid_values: [ + "contain contain", + "cover cover", + "cover auto", + "auto cover", + "contain cover", + "cover contain", + "-5px 3px", + "3px -5px", + "auto -5px", + "-5px auto", + "5 3", + "10px calc(10px + rubbish)", ], - invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3", "10px calc(10px + rubbish)" ] }; } else { gCSSProperties["mask"] = { domProp: "mask", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "url(#mymask)" ], - invalid_values: [] + initial_values: ["none"], + other_values: ["url(#mymask)"], + invalid_values: [], }; } @@ -7493,400 +10926,473 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "animation", - subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count", "animation-play-state" ], + subproperties: [ + "animation-name", + "animation-duration", + "animation-timing-function", + "animation-delay", + "animation-direction", + "animation-fill-mode", + "animation-iteration-count", + "animation-play-state", + ], }; gCSSProperties["-webkit-animation-delay"] = { domProp: "webkitAnimationDelay", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-delay", - subproperties: [ "animation-delay" ], + subproperties: ["animation-delay"], }; gCSSProperties["-webkit-animation-direction"] = { domProp: "webkitAnimationDirection", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-direction", - subproperties: [ "animation-direction" ], + subproperties: ["animation-direction"], }; gCSSProperties["-webkit-animation-duration"] = { domProp: "webkitAnimationDuration", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-duration", - subproperties: [ "animation-duration" ], + subproperties: ["animation-duration"], }; gCSSProperties["-webkit-animation-fill-mode"] = { domProp: "webkitAnimationFillMode", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-fill-mode", - subproperties: [ "animation-fill-mode" ], + subproperties: ["animation-fill-mode"], }; gCSSProperties["-webkit-animation-iteration-count"] = { domProp: "webkitAnimationIterationCount", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-iteration-count", - subproperties: [ "animation-iteration-count" ], + subproperties: ["animation-iteration-count"], }; gCSSProperties["-webkit-animation-name"] = { domProp: "webkitAnimationName", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-name", - subproperties: [ "animation-name" ], + subproperties: ["animation-name"], }; gCSSProperties["-webkit-animation-play-state"] = { domProp: "webkitAnimationPlayState", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-play-state", - subproperties: [ "animation-play-state" ], + subproperties: ["animation-play-state"], }; gCSSProperties["-webkit-animation-timing-function"] = { domProp: "webkitAnimationTimingFunction", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "animation-timing-function", - subproperties: [ "animation-timing-function" ], + subproperties: ["animation-timing-function"], }; gCSSProperties["-webkit-filter"] = { domProp: "webkitFilter", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "filter", - subproperties: [ "filter" ], + subproperties: ["filter"], }; gCSSProperties["-webkit-text-fill-color"] = { domProp: "webkitTextFillColor", inherited: true, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor", "black", "#000", "#000000", "rgb(0,0,0)" ], - other_values: [ "red", "rgba(255,255,255,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000", "ff00ff", "rgb(255,xxx,255)" ] + prerequisites: { color: "black" }, + initial_values: ["currentColor", "black", "#000", "#000000", "rgb(0,0,0)"], + other_values: ["red", "rgba(255,255,255,0.5)", "transparent"], + invalid_values: [ + "#0", + "#00", + "#00000", + "#0000000", + "#000000000", + "000000", + "ff00ff", + "rgb(255,xxx,255)", + ], }; gCSSProperties["-webkit-text-stroke"] = { domProp: "webkitTextStroke", inherited: true, type: CSS_TYPE_TRUE_SHORTHAND, - prerequisites: { "color": "black" }, - subproperties: [ "-webkit-text-stroke-width", "-webkit-text-stroke-color" ], - initial_values: [ "0 currentColor", "currentColor 0px", "0", "currentColor", "0px black" ], - other_values: [ "thin black", "#f00 medium", "thick rgba(0,0,255,0.5)", "calc(4px - 8px) green", "2px", "green 0", "currentColor 4em", "currentColor calc(5px - 1px)" ], - invalid_values: [ "-3px black", "calc(50%+ 2px) #000", "30% #f00" ] + prerequisites: { color: "black" }, + subproperties: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"], + initial_values: [ + "0 currentColor", + "currentColor 0px", + "0", + "currentColor", + "0px black", + ], + other_values: [ + "thin black", + "#f00 medium", + "thick rgba(0,0,255,0.5)", + "calc(4px - 8px) green", + "2px", + "green 0", + "currentColor 4em", + "currentColor calc(5px - 1px)", + ], + invalid_values: ["-3px black", "calc(50%+ 2px) #000", "30% #f00"], }; gCSSProperties["-webkit-text-stroke-color"] = { domProp: "webkitTextStrokeColor", inherited: true, type: CSS_TYPE_LONGHAND, - prerequisites: { "color": "black" }, - initial_values: [ "currentColor", "black", "#000", "#000000", "rgb(0,0,0)" ], - other_values: [ "red", "rgba(255,255,255,0.5)", "transparent" ], - invalid_values: [ "#0", "#00", "#00000", "#0000000", "#000000000", "000000", "ff00ff", "rgb(255,xxx,255)" ] + prerequisites: { color: "black" }, + initial_values: ["currentColor", "black", "#000", "#000000", "rgb(0,0,0)"], + other_values: ["red", "rgba(255,255,255,0.5)", "transparent"], + invalid_values: [ + "#0", + "#00", + "#00000", + "#0000000", + "#000000000", + "000000", + "ff00ff", + "rgb(255,xxx,255)", + ], }; - gCSSProperties["-webkit-text-stroke-width"] = { + ((gCSSProperties["-webkit-text-stroke-width"] = { domProp: "webkitTextStrokeWidth", inherited: true, type: CSS_TYPE_LONGHAND, - initial_values: [ "0", "0px", "0em", "0ex", "calc(0pt)", "calc(4px - 8px)" ], - other_values: [ "thin", "medium", "thick", "17px", "0.2em", "calc(3*25px + 5em)", "calc(5px - 1px)" ], - invalid_values: [ "5%", "1px calc(nonsense)", "1px red", "-0.1px", "-3px", "30%" ] - }, - gCSSProperties["-webkit-text-size-adjust"] = { - domProp: "webkitTextSizeAdjust", - inherited: true, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "-moz-text-size-adjust", - subproperties: [ "-moz-text-size-adjust" ], - }; + initial_values: ["0", "0px", "0em", "0ex", "calc(0pt)", "calc(4px - 8px)"], + other_values: [ + "thin", + "medium", + "thick", + "17px", + "0.2em", + "calc(3*25px + 5em)", + "calc(5px - 1px)", + ], + invalid_values: [ + "5%", + "1px calc(nonsense)", + "1px red", + "-0.1px", + "-3px", + "30%", + ], + }), + (gCSSProperties["-webkit-text-size-adjust"] = { + domProp: "webkitTextSizeAdjust", + inherited: true, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "-moz-text-size-adjust", + subproperties: ["-moz-text-size-adjust"], + })); gCSSProperties["-webkit-transform"] = { domProp: "webkitTransform", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transform", - subproperties: [ "transform" ], + subproperties: ["transform"], }; gCSSProperties["-webkit-transform-origin"] = { domProp: "webkitTransformOrigin", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transform-origin", - subproperties: [ "transform-origin" ], + subproperties: ["transform-origin"], }; gCSSProperties["-webkit-transform-style"] = { domProp: "webkitTransformStyle", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transform-style", - subproperties: [ "transform-style" ], + subproperties: ["transform-style"], }; gCSSProperties["-webkit-backface-visibility"] = { domProp: "webkitBackfaceVisibility", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "backface-visibility", - subproperties: [ "backface-visibility" ], + subproperties: ["backface-visibility"], }; gCSSProperties["-webkit-perspective"] = { domProp: "webkitPerspective", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "perspective", - subproperties: [ "perspective" ], + subproperties: ["perspective"], }; gCSSProperties["-webkit-perspective-origin"] = { domProp: "webkitPerspectiveOrigin", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "perspective-origin", - subproperties: [ "perspective-origin" ], + subproperties: ["perspective-origin"], }; gCSSProperties["-webkit-transition"] = { domProp: "webkitTransition", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "transition", - subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ], + subproperties: [ + "transition-property", + "transition-duration", + "transition-timing-function", + "transition-delay", + ], }; gCSSProperties["-webkit-transition-delay"] = { domProp: "webkitTransitionDelay", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transition-delay", - subproperties: [ "transition-delay" ], + subproperties: ["transition-delay"], }; gCSSProperties["-webkit-transition-duration"] = { domProp: "webkitTransitionDuration", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transition-duration", - subproperties: [ "transition-duration" ], + subproperties: ["transition-duration"], }; gCSSProperties["-webkit-transition-property"] = { domProp: "webkitTransitionProperty", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transition-property", - subproperties: [ "transition-property" ], + subproperties: ["transition-property"], }; gCSSProperties["-webkit-transition-timing-function"] = { domProp: "webkitTransitionTimingFunction", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "transition-timing-function", - subproperties: [ "transition-timing-function" ], + subproperties: ["transition-timing-function"], }; gCSSProperties["-webkit-border-radius"] = { domProp: "webkitBorderRadius", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "border-radius", - subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ], + subproperties: [ + "border-bottom-left-radius", + "border-bottom-right-radius", + "border-top-left-radius", + "border-top-right-radius", + ], }; gCSSProperties["-webkit-border-top-left-radius"] = { domProp: "webkitBorderTopLeftRadius", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-top-left-radius", - subproperties: [ "border-top-left-radius" ], + subproperties: ["border-top-left-radius"], }; gCSSProperties["-webkit-border-top-right-radius"] = { domProp: "webkitBorderTopRightRadius", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-top-right-radius", - subproperties: [ "border-top-right-radius" ], + subproperties: ["border-top-right-radius"], }; gCSSProperties["-webkit-border-bottom-left-radius"] = { domProp: "webkitBorderBottomLeftRadius", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-bottom-left-radius", - subproperties: [ "border-bottom-left-radius" ], + subproperties: ["border-bottom-left-radius"], }; gCSSProperties["-webkit-border-bottom-right-radius"] = { domProp: "webkitBorderBottomRightRadius", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "border-bottom-right-radius", - subproperties: [ "border-bottom-right-radius" ], + subproperties: ["border-bottom-right-radius"], }; gCSSProperties["-webkit-background-clip"] = { domProp: "webkitBackgroundClip", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "background-clip", - subproperties: [ "background-clip" ], + subproperties: ["background-clip"], }; gCSSProperties["-webkit-background-origin"] = { domProp: "webkitBackgroundOrigin", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "background-origin", - subproperties: [ "background-origin" ], + subproperties: ["background-origin"], }; gCSSProperties["-webkit-background-size"] = { domProp: "webkitBackgroundSize", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "background-size", - subproperties: [ "background-size" ], + subproperties: ["background-size"], }; gCSSProperties["-webkit-border-image"] = { domProp: "webkitBorderImage", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "border-image", - subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ], + subproperties: [ + "border-image-source", + "border-image-slice", + "border-image-width", + "border-image-outset", + "border-image-repeat", + ], }; gCSSProperties["-webkit-box-shadow"] = { domProp: "webkitBoxShadow", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "box-shadow", - subproperties: [ "box-shadow" ], + subproperties: ["box-shadow"], }; gCSSProperties["-webkit-box-sizing"] = { domProp: "webkitBoxSizing", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "box-sizing", - subproperties: [ "box-sizing" ], + subproperties: ["box-sizing"], }; gCSSProperties["-webkit-box-flex"] = { domProp: "webkitBoxFlex", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "-moz-box-flex", - subproperties: [ "-moz-box-flex" ], + subproperties: ["-moz-box-flex"], }; gCSSProperties["-webkit-box-ordinal-group"] = { domProp: "webkitBoxOrdinalGroup", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "-moz-box-ordinal-group", - subproperties: [ "-moz-box-ordinal-group" ], + subproperties: ["-moz-box-ordinal-group"], }; gCSSProperties["-webkit-box-orient"] = { domProp: "webkitBoxOrient", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "-moz-box-orient", - subproperties: [ "-moz-box-orient" ], + subproperties: ["-moz-box-orient"], }; gCSSProperties["-webkit-box-direction"] = { domProp: "webkitBoxDirection", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "-moz-box-direction", - subproperties: [ "-moz-box-direction" ], + subproperties: ["-moz-box-direction"], }; gCSSProperties["-webkit-box-align"] = { domProp: "webkitBoxAlign", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "-moz-box-align", - subproperties: [ "-moz-box-align" ], + subproperties: ["-moz-box-align"], }; gCSSProperties["-webkit-box-pack"] = { domProp: "webkitBoxPack", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "-moz-box-pack", - subproperties: [ "-moz-box-pack" ], + subproperties: ["-moz-box-pack"], }; gCSSProperties["-webkit-flex-direction"] = { domProp: "webkitFlexDirection", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "flex-direction", - subproperties: [ "flex-direction" ], + subproperties: ["flex-direction"], }; gCSSProperties["-webkit-flex-wrap"] = { domProp: "webkitFlexWrap", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "flex-wrap", - subproperties: [ "flex-wrap" ], + subproperties: ["flex-wrap"], }; gCSSProperties["-webkit-flex-flow"] = { domProp: "webkitFlexFlow", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "flex-flow", - subproperties: [ "flex-direction", "flex-wrap" ], + subproperties: ["flex-direction", "flex-wrap"], }; gCSSProperties["-webkit-order"] = { domProp: "webkitOrder", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "order", - subproperties: [ "order" ], + subproperties: ["order"], }; gCSSProperties["-webkit-flex"] = { domProp: "webkitFlex", inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "flex", - subproperties: [ "flex-grow", "flex-shrink", "flex-basis" ], + subproperties: ["flex-grow", "flex-shrink", "flex-basis"], }; gCSSProperties["-webkit-flex-grow"] = { domProp: "webkitFlexGrow", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "flex-grow", - subproperties: [ "flex-grow" ], + subproperties: ["flex-grow"], }; gCSSProperties["-webkit-flex-shrink"] = { domProp: "webkitFlexShrink", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "flex-shrink", - subproperties: [ "flex-shrink" ], + subproperties: ["flex-shrink"], }; gCSSProperties["-webkit-flex-basis"] = { domProp: "webkitFlexBasis", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "flex-basis", - subproperties: [ "flex-basis" ], + subproperties: ["flex-basis"], }; gCSSProperties["-webkit-justify-content"] = { domProp: "webkitJustifyContent", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "justify-content", - subproperties: [ "justify-content" ], + subproperties: ["justify-content"], }; gCSSProperties["-webkit-align-items"] = { domProp: "webkitAlignItems", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "align-items", - subproperties: [ "align-items" ], + subproperties: ["align-items"], }; gCSSProperties["-webkit-align-self"] = { domProp: "webkitAlignSelf", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "align-self", - subproperties: [ "align-self" ], + subproperties: ["align-self"], }; gCSSProperties["-webkit-align-content"] = { domProp: "webkitAlignContent", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "align-content", - subproperties: [ "align-content" ], + subproperties: ["align-content"], }; gCSSProperties["-webkit-user-select"] = { domProp: "webkitUserSelect", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "user-select", - subproperties: [ "user-select" ], + subproperties: ["user-select"], }; if (SupportsMaskShorthand()) { @@ -7895,14 +11401,23 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { inherited: false, type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "mask", - subproperties: [ "mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position", "mask-repeat", "mask-size" , "mask-composite" ], + subproperties: [ + "mask-clip", + "mask-image", + "mask-mode", + "mask-origin", + "mask-position", + "mask-repeat", + "mask-size", + "mask-composite", + ], }; gCSSProperties["-webkit-mask-clip"] = { domProp: "webkitMaskClip", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-clip", - subproperties: [ "mask-clip" ], + subproperties: ["mask-clip"], }; gCSSProperties["-webkit-mask-composite"] = { @@ -7910,7 +11425,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-composite", - subproperties: [ "mask-composite" ], + subproperties: ["mask-composite"], }; gCSSProperties["-webkit-mask-image"] = { @@ -7918,79 +11433,156 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-image", - subproperties: [ "mask-image" ], + subproperties: ["mask-image"], }; gCSSProperties["-webkit-mask-origin"] = { domProp: "webkitMaskOrigin", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-origin", - subproperties: [ "mask-origin" ], + subproperties: ["mask-origin"], }; gCSSProperties["-webkit-mask-position"] = { domProp: "webkitMaskPosition", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-position", - subproperties: [ "mask-position" ], + subproperties: ["mask-position"], }; gCSSProperties["-webkit-mask-position-x"] = { domProp: "webkitMaskPositionX", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-position-x", - subproperties: [ "mask-position-x" ], + subproperties: ["mask-position-x"], }; gCSSProperties["-webkit-mask-position-y"] = { domProp: "webkitMaskPositionY", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-position-y", - subproperties: [ "mask-position-y" ], + subproperties: ["mask-position-y"], }; gCSSProperties["-webkit-mask-repeat"] = { domProp: "webkitMaskRepeat", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-repeat", - subproperties: [ "mask-repeat" ], + subproperties: ["mask-repeat"], }; gCSSProperties["-webkit-mask-size"] = { domProp: "webkitMaskSize", inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-size", - subproperties: [ "mask-size" ], + subproperties: ["mask-size"], }; } } if (IsCSSPropertyPrefEnabled("layout.css.unset-value.enabled")) { gCSSProperties["animation"].invalid_values.push("2s unset"); - gCSSProperties["animation-direction"].invalid_values.push("normal, unset", "unset, normal"); - gCSSProperties["animation-name"].invalid_values.push("bounce, unset", "unset, bounce"); - gCSSProperties["-moz-border-bottom-colors"].invalid_values.push("red unset", "unset red"); - gCSSProperties["-moz-border-left-colors"].invalid_values.push("red unset", "unset red"); - gCSSProperties["border-radius"].invalid_values.push("unset 2px", "unset / 2px", "2px unset", "2px / unset"); - gCSSProperties["border-bottom-left-radius"].invalid_values.push("unset 2px", "2px unset"); - gCSSProperties["border-bottom-right-radius"].invalid_values.push("unset 2px", "2px unset"); - gCSSProperties["border-top-left-radius"].invalid_values.push("unset 2px", "2px unset"); - gCSSProperties["border-top-right-radius"].invalid_values.push("unset 2px", "2px unset"); - gCSSProperties["-moz-border-right-colors"].invalid_values.push("red unset", "unset red"); - gCSSProperties["-moz-border-top-colors"].invalid_values.push("red unset", "unset red"); - gCSSProperties["-moz-outline-radius"].invalid_values.push("unset 2px", "unset / 2px", "2px unset", "2px / unset"); - gCSSProperties["-moz-outline-radius-bottomleft"].invalid_values.push("unset 2px", "2px unset"); - gCSSProperties["-moz-outline-radius-bottomright"].invalid_values.push("unset 2px", "2px unset"); - gCSSProperties["-moz-outline-radius-topleft"].invalid_values.push("unset 2px", "2px unset"); - gCSSProperties["-moz-outline-radius-topright"].invalid_values.push("unset 2px", "2px unset"); - gCSSProperties["background-image"].invalid_values.push("-moz-linear-gradient(unset, 10px 10px, from(blue))", "-moz-linear-gradient(unset, 10px 10px, blue 0)", "-moz-repeating-linear-gradient(unset, 10px 10px, blue 0)"); - gCSSProperties["box-shadow"].invalid_values.push("unset, 2px 2px", "2px 2px, unset", "inset unset"); - gCSSProperties["text-overflow"].invalid_values.push('"hello" unset', 'unset "hello"', 'clip unset', 'unset clip', 'unset inherit', 'unset none', 'initial unset'); - gCSSProperties["text-shadow"].invalid_values.push("unset, 2px 2px", "2px 2px, unset"); + gCSSProperties["animation-direction"].invalid_values.push( + "normal, unset", + "unset, normal", + ); + gCSSProperties["animation-name"].invalid_values.push( + "bounce, unset", + "unset, bounce", + ); + gCSSProperties["-moz-border-bottom-colors"].invalid_values.push( + "red unset", + "unset red", + ); + gCSSProperties["-moz-border-left-colors"].invalid_values.push( + "red unset", + "unset red", + ); + gCSSProperties["border-radius"].invalid_values.push( + "unset 2px", + "unset / 2px", + "2px unset", + "2px / unset", + ); + gCSSProperties["border-bottom-left-radius"].invalid_values.push( + "unset 2px", + "2px unset", + ); + gCSSProperties["border-bottom-right-radius"].invalid_values.push( + "unset 2px", + "2px unset", + ); + gCSSProperties["border-top-left-radius"].invalid_values.push( + "unset 2px", + "2px unset", + ); + gCSSProperties["border-top-right-radius"].invalid_values.push( + "unset 2px", + "2px unset", + ); + gCSSProperties["-moz-border-right-colors"].invalid_values.push( + "red unset", + "unset red", + ); + gCSSProperties["-moz-border-top-colors"].invalid_values.push( + "red unset", + "unset red", + ); + gCSSProperties["-moz-outline-radius"].invalid_values.push( + "unset 2px", + "unset / 2px", + "2px unset", + "2px / unset", + ); + gCSSProperties["-moz-outline-radius-bottomleft"].invalid_values.push( + "unset 2px", + "2px unset", + ); + gCSSProperties["-moz-outline-radius-bottomright"].invalid_values.push( + "unset 2px", + "2px unset", + ); + gCSSProperties["-moz-outline-radius-topleft"].invalid_values.push( + "unset 2px", + "2px unset", + ); + gCSSProperties["-moz-outline-radius-topright"].invalid_values.push( + "unset 2px", + "2px unset", + ); + gCSSProperties["background-image"].invalid_values.push( + "-moz-linear-gradient(unset, 10px 10px, from(blue))", + "-moz-linear-gradient(unset, 10px 10px, blue 0)", + "-moz-repeating-linear-gradient(unset, 10px 10px, blue 0)", + ); + gCSSProperties["box-shadow"].invalid_values.push( + "unset, 2px 2px", + "2px 2px, unset", + "inset unset", + ); + gCSSProperties["text-overflow"].invalid_values.push( + '"hello" unset', + 'unset "hello"', + "clip unset", + "unset clip", + "unset inherit", + "unset none", + "initial unset", + ); + gCSSProperties["text-shadow"].invalid_values.push( + "unset, 2px 2px", + "2px 2px, unset", + ); gCSSProperties["transition"].invalid_values.push("2s unset"); - gCSSProperties["transition-property"].invalid_values.push("unset, color", "color, unset"); + gCSSProperties["transition-property"].invalid_values.push( + "unset, color", + "color, unset", + ); if (IsCSSPropertyPrefEnabled("layout.css.filters.enabled")) { - gCSSProperties["filter"].invalid_values.push("drop-shadow(unset, 2px 2px)", "drop-shadow(2px 2px, unset)"); + gCSSProperties["filter"].invalid_values.push( + "drop-shadow(unset, 2px 2px)", + "drop-shadow(2px 2px, unset)", + ); } if (IsCSSPropertyPrefEnabled("layout.css.text-align-unsafe-value.enabled")) { gCSSProperties["text-align"].other_values.push("true left"); @@ -8016,22 +11608,22 @@ if (IsCSSPropertyPrefEnabled("layout.css.background-clip-text.enabled")) { "text", "content-box, text", "text, border-box", - "text, text" + "text, text", ); gCSSProperties["background"].other_values.push( "url(404.png) green padding-box text", - "content-box text url(404.png) blue" + "content-box text url(404.png) blue", ); } else { gCSSProperties["background-clip"].invalid_values.push( "text", "content-box, text", "text, border-box", - "text, text" + "text, text", ); gCSSProperties["background"].invalid_values.push( "url(404.png) green padding-box text", - "content-box text url(404.png) blue" + "content-box text url(404.png) blue", ); } @@ -8045,22 +11637,31 @@ for (var prop in gCSSProperties) { if (entry.alias_for) { var aliasTargetEntry = gCSSProperties[entry.alias_for]; if (!aliasTargetEntry) { - ok(false, - "Alias '" + prop + "' alias_for field, '" + entry.alias_for + "', " + - "must be set to a recognized CSS property in gCSSProperties"); + ok( + false, + "Alias '" + + prop + + "' alias_for field, '" + + entry.alias_for + + "', " + + "must be set to a recognized CSS property in gCSSProperties", + ); } else { // Copy 'values' fields & 'prerequisites' field from aliasTargetEntry: - var fieldsToCopy = - ["initial_values", "other_values", "invalid_values", - "quirks_values", "unbalanced_values", - "prerequisites"]; + var fieldsToCopy = [ + "initial_values", + "other_values", + "invalid_values", + "quirks_values", + "unbalanced_values", + "prerequisites", + ]; - fieldsToCopy.forEach(function(fieldName) { + fieldsToCopy.forEach(function (fieldName) { // (Don't copy the field if the alias already has something there, // or if the aliased property doesn't have anything to copy.) - if (!(fieldName in entry) && - fieldName in aliasTargetEntry) { - entry[fieldName] = aliasTargetEntry[fieldName] + if (!(fieldName in entry) && fieldName in aliasTargetEntry) { + entry[fieldName] = aliasTargetEntry[fieldName]; } }); } @@ -8072,13 +11673,12 @@ if (IsCSSPropertyPrefEnabled("layout.css.scrollbar-width.enabled")) { domProp: "scrollbarWidth", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "none", "thin" ], - invalid_values: [ "1px" ] + initial_values: ["auto"], + other_values: ["none", "thin"], + invalid_values: ["1px"], }; } - if (false) { // TODO These properties are chrome-only, and are not exposed via CSSOM. // We may still want to find a way to test them. See bug 1206999. @@ -8086,8 +11686,8 @@ if (false) { //domProp: "MozWindowShadow", inherited: false, type: CSS_TYPE_LONGHAND, - initial_values: [ "default" ], - other_values: [ "none", "menu", "tooltip", "sheet" ], - invalid_values: [] + initial_values: ["default"], + other_values: ["none", "menu", "tooltip", "sheet"], + invalid_values: [], }; } diff --git a/layout/style/test/test_computed_style.html b/layout/style/test/test_computed_style.html index 938a3fcf50..88e4cfc573 100644 --- a/layout/style/test/test_computed_style.html +++ b/layout/style/test/test_computed_style.html @@ -1,17 +1,24 @@ - + - - Test for miscellaneous computed style issues - - - - -Mozilla Bug -

- -
+    
+        Test for miscellaneous computed style issues
+        
+        
+    
+    
+        Mozilla Bug
+        
+        

+ +
 
 
- +