at-rule-013.xht (2394B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <title>CSS Test: Ignoring at-rules inside @media blocks</title> 6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/media.html#at-media-rule"/> 9 <link rel="match" href="at-rule-013-ref.xht"/> 10 <meta name="flags" content="invalid"/> 11 <meta name="assert" content="At-rules inside @media blocks are ignored up to 12 up to the end of the block that contains the invalid at-keyword, or up 13 to and including the next semicolon (;) or up to and including the next 14 block ({...}), whichever comes first."/> 15 <style type="text/css"><![CDATA[ 16 p { 17 color: red; 18 background: red; 19 } 20 @media all { 21 #semicolon { background: transparent; } 22 @foo ] & | # $ % test-token \ 23 [; # { background: red; } ] 24 (; #semicolon { background: red; } } } } ) 25 '; #semicolon { background: red; } } } }', 26 "; #semicolon { background: red; }' } } }" 27 ; 28 #semicolon { color: green; } 29 } 30 @media all { 31 #block { background: transparent; } 32 @foo ] & | # $ % test-token \ 33 [; #block { background: red; } ] 34 (; #block { background: red; } ) 35 '; #block { background: red; }', 36 "; #block { background: red; }'" 37 {; #block { background: red; } 38 #block { background: red; } } 39 #block { color: green; } 40 } 41 @media all { 42 #eob { background: transparent; } 43 @import "support/import-red.css" 44 } 45 #eob { 46 color: green; 47 } 48 @media all { 49 #eob-complex { background: transparent; } 50 @import "support/import-red.css" 51 [; #eob-complex { background: red; } ] 52 (; #eob-complex { background: red; } ) 53 '; #eob-complex { background: red; }', 54 "; #eob-complex { background: red; }'" 55 } 56 #eob-complex { 57 color: green; 58 } 59 ]]></style> 60 </head> 61 <body> 62 <p id="semicolon">This sentence must be green.</p> 63 <p id="block">This sentence must be green.</p> 64 <p id="eob">This sentence must be green.</p> 65 <p id="eob-complex">This sentence must be green.</p> 66 </body> 67 </html>