### ----------------------------------------------------
### -- CSS::Module
### -- Licenses: Artistic-2.0
### -- Authors: David Warring
### -- File: t/error-handling.json
### ----------------------------------------------------
[ "declarations", { "input" : "{background:url('http://www.bg.com/pinkish.gif')}", "ast" : { "declarations" : [ { "property" : { "ident" : "background", "expr" : [ { "expr:background-image" : [ { "url" : "http://www.bg.com/pinkish.gif" } ] } ] } } ] } } ]
[ "declarations", { "input" : "{background:URL(http://www.bg.com/pinkish.gif)}", "ast" : { "declarations" : [ { "property" : { "ident" : "background", "expr" : [ { "expr:background-image" : [ { "url" : "http://www.bg.com/pinkish.gif" } ] } ] } } ] } } ]
[ "declarations", { "input" : "{background:URL(http://www.bg.com/pinkish.gif\n}", "ast" : { "declarations" : [] }, "warnings" : [ "usage background: ['background-color' || 'background-image' || 'background-repeat' || 'background-attachment' || 'background-position'] | inherit | initial" ] } ]
[ "declarations", { "input" : "{background:URL('http://www.bg.com/pinkish.gif\n}", "ast" : null, "warnings" : [ "usage background: ['background-color' || 'background-image' || 'background-repeat' || 'background-attachment' || 'background-position'] | inherit | initial" ] } ]
[ "ruleset", { "input" : "h1 { color: red; rotation: 70minutes }", "warnings" : [ "unknown units: minutes", "dropping declaration: rotation" ], "ast" : { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "h1" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "color", "expr" : [ { "rgb" : [ { "num" : 255 }, { "num" : 0 }, { "num" : 0 } ] } ] } } ] } } } ]
[ "ruleset", { "input" : "h1 {content:'kept1'; color: dropped1 rgb(10,20,30 dropped2; font-family:kept2}", "warnings" : [ "usage color: <color> | inherit | initial" ], "ast" : { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "h1" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "content", "expr" : [ { "string" : "kept1" } ] } }, { "property" : { "ident" : "font-family", "expr" : [ { "ident" : "kept2" } ] } } ] } } } ]
[ "ruleset", { "input" : "h1 {color:red; content:'Section' counter(hdr-1)}", "ast" : { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "h1" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "color", "expr" : [ { "rgb" : [ { "num" : 255 }, { "num" : 0 }, { "num" : 0 } ] } ] } }, { "property" : { "ident" : "content", "expr" : [ { "string" : "Section" }, { "func" : { "ident" : "counter", "args" : [ { "ident" : "hdr-1" } ] } } ] } } ] } } } ]
[ "ruleset", { "input" : "h2 {bad: dropme 'http://unclosed-string.org; color:blue;\n    background-color:#ccc;}", "ast" : { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "h2" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "background-color", "expr" : [ { "rgb" : [ { "num" : 204 }, { "num" : 204 }, { "num" : 204 } ] } ] } } ] } }, "warnings" : [ "unterminated string: 'http://unclosed-string.org; color:blue;", "dropping term: dropme", "dropping declaration: bad" ] } ]
[ "ruleset", { "input" : "p { color:rgb(10,17); }", "ast" : {"ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "p" } } ] } ] } ], "declarations" : [ ] } }, "warnings" : [ "usage: rgb(c,c,c) where c is 0..255 or 0%-100%", "dropping declaration: color" ] } ]
[ "ruleset", { "input" : "p:foo(42) { color:#abc; }", "ast" : null, "warnings" : [ "ignoring function: foo" ] } ]
[ "ruleset", { "input" : "p { color:bar({37+5}); }", "ast" : null, "warnings" : [ "usage color: <color> | inherit | initial" ] } ]
[ "ruleset", { "input" : "p { color }", "ast" : { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "p" } } ] } ] } ], "declarations" : [ ] } }, "warnings" : "dropping term: color" } ]
[ "ruleset", { "input" : "p { content:'a'; color; font-family:b }", "ast" : { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "p" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "content", "expr" : [ { "string" : "a" } ] } }, { "property" : { "ident" : "font-family", "expr" : [ { "ident" : "b" } ] } } ] } }, "warnings" : "dropping term: color" } ]
[ "ruleset", { "input" : "p {content:'a'; color: }", "ast" : { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "p" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "content", "expr" : [ { "string" : "a" } ] } } ] } }, "warnings" : "usage color: <color> | inherit | initial" } ]
[ "ruleset", { "input" : "p { content:'a'; color:; font-family:b }", "ast" : { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "p" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "content", "expr" : [ { "string" : "a" } ] } }, { "property" : { "ident" : "font-family", "expr" : [ { "ident" : "b" } ] } } ] } }, "warnings" : "usage color: <color> | inherit | initial" } ]
[ "ruleset", { "input" : "p { content:'a'; color{;color:maroon} }", "ast" : null, "warnings" : "dropping term: color{;color:maroon}" } ]
[ "ruleset", { "input" : "p { content:'a'; color{;color:maroon}; color:green }", "ast" : null, "warnings" : "dropping term: color{;color:maroon}" } ]
[ "stylesheet", { "input" : "p @here {color: red}", "ast" : null, "warnings" : "dropping: p @here {color: red}" } ]
[ "stylesheet", { "input" : "@foo @bar;", "ast" : null, "warnings" : "dropping: @foo @bar;" } ]
[ "stylesheet", { "input" : "}} {{ - }}", "ast" : null, "warnings" : [ "dropping: }", "dropping: }", "dropping: {{ - }}" ] } ]
[ "stylesheet", { "input" : "h1, h2 {color: green }\nh3, h4 & h5 {color: red }\nh6 {color: black }", "warnings" : "dropping: h3, h4 & h5 {color: red }", "ast" : { "stylesheet" : [ { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "h1" } } ] } ] }, { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "h2" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "color", "expr" : [ { "rgb" : [ { "num" : 0 }, { "num" : 128 }, { "num" : 0 } ] } ] } } ] } }, { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "h6" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "color", "expr" : [ { "rgb" : [ { "num" : 0 }, { "num" : 0 }, { "num" : 0 } ] } ] } } ] } } ] } } ]
[ "stylesheet", { "input" : "@three-dee { @background-lighting { azimuth: 30deg; elevation: 190deg; } h1 { color: red } }  h1 { color: blue }", "warnings" : "dropping: @three-dee { @background-lighting { azimuth: 30deg; elevation: 190deg; } h1 { color: red } }", "ast" : { "stylesheet" : [ { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "h1" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "color", "expr" : [ { "rgb" : [ { "num" : 0 }, { "num" : 0 }, { "num" : 255 } ] } ] } } ] } } ] } } ]
[ "stylesheet", { "input" : "@media print and (width: 21cm) { @page { margin: 3cm; @top-center { content: 'Page ' counter(page); }}}", "ast" : { "stylesheet" : [ { "at-rule" : { "media-list" : [ { "media-query" : [ { "ident" : "print" }, { "keyw" : "and" }, { "property" : { "ident" : "width", "expr" : [ { "cm" : 21 } ] } } ] } ], "rule-list" : [ { "at-rule" : { "declarations" : [ { "property" : { "ident" : "margin", "expr" : [ { "cm" : 3 } ] } }, { "at-rule" : { "at-keyw" : "top-center", "declarations" : [ { "property" : { "ident" : "content", "expr" : [ { "string" : "Page " }, { "func" : { "ident" : "counter", "args" : [ { "ident" : "page" } ] } } ] } } ] } } ], "at-keyw" : "page" } } ], "at-keyw" : "media" } } ] } } ]
[ "stylesheet", { "input" : "* foo|* |h1 body:not(.home) h2 + p:first-letter tr:nth-last-child(-n+2) object[type^='image/'] {color:blue}", "ast" : { "stylesheet" : [ { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "*" } } ] }, { "simple-selector" : [ { "qname" : { "ns-prefix" : "foo", "element-name" : "*" } } ] }, { "simple-selector" : [ { "qname" : { "ns-prefix" : "", "element-name" : "h1" } } ] }, { "simple-selector" : [ { "qname" : { "element-name" : "body" } }, { "pseudo-func" : { "ident" : "not", "expr" : [ { "class" : "home" } ] } } ] }, { "simple-selector" : [ { "qname" : { "element-name" : "h2" } } ] }, { "op" : "+" }, { "simple-selector" : [ { "qname" : { "element-name" : "p" } }, { "pseudo-elem" : "first-letter" } ] }, { "simple-selector" : [ { "qname" : { "element-name" : "tr" } }, { "pseudo-func" : { "expr" : [ { "op" : "-" }, { "op" : "n" }, { "op" : "+" }, { "int" : 2 } ], "ident" : "nth-last-child" } } ] }, { "simple-selector" : [ { "qname" : { "element-name" : "object" } }, { "attrib" : [ { "ident" : "type" }, { "op" : "^=" }, { "string" : "image/" } ] } ] } ] } ], "declarations" : [ { "property" : { "ident" : "color", "expr" : [ { "rgb" : [ { "num" : 0 }, { "num" : 0 }, { "num" : 255 } ] } ] } } ] } } ] } } ]


