### ----------------------------------------------------
### -- CSS::Module
### -- Licenses: Artistic-2.0
### -- Authors: David Warring
### -- File: t/css3x-media-queries.json
### ----------------------------------------------------
[ "resolution", { "input" : "300dpi", "ast" : { "dpi" : 300 } } ] 
[ "media-expr", { "input" : "max-width: foo", "warnings" : "usage [min-|max-]?[device-]?width: <length>" } ]
[ "at-rule", { "input" : "@media all { body { background:lime } }", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "ident" : "all" } ] } ], "rule-list" : [ { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "body" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "background", "expr" : [ { "expr:background-color" : [ { "rgb" : [ { "num" : 0 }, { "num" : 255 }, { "num" : 0 } ] } ] } ] } } ] } } ], "at-keyw" : "media" } } } ]
[ "at-rule", { "input" : "@media all and (color) { }", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "ident" : "all" }, { "keyw" : "and" }, { "property" : { "ident" : "color" } } ] } ], "rule-list" : [  ], "at-keyw" : "media" } } } ]
[ "at-rule", { "input" : "@media screen { * { font-family: sans-serif } }", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "ident" : "screen" } ] } ], "rule-list" : [ { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "*" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "font-family", "expr" : [ { "keyw" : "sans-serif" } ] } } ] } } ], "at-keyw" : "media" } } } ]
//  try out dpi and dpcm term extensions
[ "at-rule", { "input" : "@media all AND (min-resolution: 300dpi) And (max-resolution: 118dpcm) {}", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "ident" : "all" }, { "keyw" : "and" }, { "property" : { "ident" : "min-resolution", "expr" : [ { "dpi" : 300 } ] } }, { "keyw" : "and" }, { "property" : { "ident" : "max-resolution", "expr" : [ { "dpcm" : 118 } ] } } ] } ], "rule-list" : [  ], "at-keyw" : "media" } } } ]
[ "at-rule", { "input" : "@media noT print {body{margin : 1cm}}", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "keyw" : "not" }, { "ident" : "print" } ] } ], "rule-list" : [ { "ruleset" : { "selectors" : [ { "selector" : [ { "simple-selector" : [ { "qname" : { "element-name" : "body" } } ] } ] } ], "declarations" : [ { "property" : { "ident" : "margin", "expr" : [ { "cm" : 1 } ] } } ] } } ], "at-keyw" : "media" } } } ]
[ "at-rule", { "input" : "@media ONLY all And (none) { }", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "keyw" : "not" }, { "ident" : "all" } ] } ], "rule-list" : [  ], "at-keyw" : "media" } }, "warnings" : "unknown media-feature: none" } ]
// error handling unknown media features; treated as not all:
// http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/#error-handling
// all the following should equate to 'not all'
[ "at-rule", { "input" : "@media not all {}", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "keyw" : "not" }, { "ident" : "all" } ] } ], "rule-list" : [  ], "at-keyw" : "media" } } } ]
[ "at-rule", { "input" : "@media (min-orientation:portrait) {}", "warnings" : "unknown media-feature: min-orientation", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "keyw" : "not" }, { "ident" : "all" } ] } ], "rule-list" : [  ], "at-keyw" : "media" } } } ]
[ "at-rule", { "input" : "@media (color:20example) {}", "warnings" : "usage [min-|max-]?color[-index]?: <integer>", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "keyw" : "not" }, { "ident" : "all" } ] } ], "rule-list" : [  ], "at-keyw" : "media" } } } ]
[ "at-rule", { "input" : "@media (example, all,), speech {}", "warnings" : [ "unknown media-feature: example", "discarding media list" ], "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "keyw" : "not" }, { "ident" : "all" } ] } ], "rule-list" : [  ], "at-keyw" : "media" } } } ]
[ "at-rule", { "input" : "@media &test, screen {}", "ast" : { "at-rule" : { "media-list" : [ { "media-query" : [ { "keyw" : "not" }, { "ident" : "all" } ] } ], "rule-list" : [  ], "at-keyw" : "media" } }, "warnings" : "discarding media list" } ]
//  we should also have extended the import at-rule
[ "import", { "input" : "@import url(example.css) screen and (color), projection and (color);", "ast" : { "at-rule" : { "at-keyw" : "import", "url" : "example.css", "media-list" : [ { "media-query" : [ { "ident" : "screen" }, { "keyw" : "and" }, { "property" : { "ident" : "color" } } ] }, { "media-query" : [ { "ident" : "projection" }, { "keyw" : "and" }, { "property" : { "ident" : "color" } } ] } ] } } } ]


