Revision: 5651
Author: [email protected]
Date: Fri Dec 27 23:36:20 2013 UTC
Log: 'transparent' is now a CSS color
https://codereview.appspot.com/46080043
'transparent' used to be a special keyword in some CSS rules.
CSS3 makes 'transparent' a color keyword, and it's valid anywhere
a color is valid.
This change makes 'transparent' a color.
R=kpreid2
http://code.google.com/p/google-caja/source/detail?r=5651
Modified:
/trunk/src/com/google/caja/lang/css/css3-defs.json
/trunk/tests/com/google/caja/lang/css/CssPropertyPatternsTest.java
=======================================
--- /trunk/src/com/google/caja/lang/css/css3-defs.json Tue Nov 26 22:27:53
2013 UTC
+++ /trunk/src/com/google/caja/lang/css/css3-defs.json Fri Dec 27 23:36:20
2013 UTC
@@ -142,7 +142,7 @@
},
{ "key": "background-color",
- "signature": "<color> | transparent",
+ "signature": "<color>",
"default": "transparent",
"appliesTo": "*",
"inherited": false,
@@ -189,7 +189,7 @@
"source": "http://dev.w3.org/csswg/css-backgrounds/#background-size"
},
{ "key": "border",
- "signature": "[ <border-width> || <border-style> || [<color> |
transparent] ]",
+ "signature": "[ <border-width> || <border-style> || <color> ]",
"default": null, "default-comment": "see individual properties",
"appliesTo": "*",
"inherited": false,
@@ -232,7 +232,7 @@
"mediaGroups": ["visual"] },
{ "key": "border-color",
- "signature": "[ <color> | transparent ]{1,4}",
+ "signature": "[ <color> ]{1,4}",
"default": null, "default-comment": "see individual properties",
"appliesTo": "*",
"inherited": false,
@@ -292,7 +292,7 @@
"mediaGroups": ["visual"] },
{ "key": "border-top-color",
- "signature": "<color> | transparent",
+ "signature": "<color>",
"default": null, "default-comment": "the value of the 'color'
property",
"appliesTo": "*",
"inherited": false,
@@ -1250,8 +1250,11 @@
},
{ "key": "<color>",
- "signature": "<hex-color>|aliceblue|antiquewhite|aqua|aquamarine|
azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|
cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|
darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkkhaki|darkmagenta|
darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|
darkslateblue|darkslategray|darkturquoise|darkviolet|deeppink|deepskyblue|
dimgray|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|
ghostwhite|gold|goldenrod|gray|green|greenyellow|honeydew|hotpink|indianred|
indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|
lightcoral|lightcyan|lightgoldenrodyellow|lightgreen|lightgrey|lightpink|
lightsalmon|lightseagreen|lightskyblue|lightslategray|lightsteelblue|
lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|
mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|
mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|
navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|
palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|
peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|
sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|snow|
springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|
whitesmoke|yellow|yellowgreen|rgb(<red>,<green>,<blue>)|
rgba(<red>,<green>,<blue>,<alpha>)",
- "source": "http://www.w3.org/TR/css3-iccprof#colorunits"
+ "signature": "<hex-color>|aliceblue|antiquewhite|aqua|aquamarine|
azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|
cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|
darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkkhaki|darkmagenta|
darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|
darkslateblue|darkslategray|darkturquoise|darkviolet|deeppink|deepskyblue|
dimgray|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|
ghostwhite|gold|goldenrod|gray|green|greenyellow|honeydew|hotpink|indianred|
indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|
lightcoral|lightcyan|lightgoldenrodyellow|lightgreen|lightgrey|lightpink|
lightsalmon|lightseagreen|lightskyblue|lightslategray|lightsteelblue|
lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|
mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|
mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|
navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|
palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|
peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|
sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|snow|
springgreen|steelblue|tan|teal|thistle|tomato|turquoise|transparent|violet|
wheat|white|whitesmoke|yellow|yellowgreen|rgb(<red>,<green>,<blue>)|
rgba(<red>,<green>,<blue>,<alpha>)",
+ "source": [
+ "http://www.w3.org/TR/css3-iccprof#colorunits",
+ "http://www.w3.org/TR/css3-color/"
+ ]
},
{ "key": "<counter>",
=======================================
--- /trunk/tests/com/google/caja/lang/css/CssPropertyPatternsTest.java Tue
Sep 24 20:06:05 2013 UTC
+++ /trunk/tests/com/google/caja/lang/css/CssPropertyPatternsTest.java Fri
Dec 27 23:36:20 2013 UTC
@@ -92,7 +92,7 @@
);
assertMatches(
"'color'", "#fff", "#aabbcc", "red", "rgb(0,0,255)",
- "rgb(0, 0, 255)", "hotpink", "yellow", "black");
+ "rgb(0, 0, 255)", "hotpink", "yellow", "black", "transparent");
assertDoesNotMatch("'color'", "infrateal", "rgbv(0,0,255)",
"rgb(expression(alert(1337)))", "rgba(do,evil,now)");
}
--
---
You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.