Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>CSS 2.1 Test Suite: generated content</title> |
michael@0 | 5 | <link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" /> |
michael@0 | 6 | <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> |
michael@0 | 7 | <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#before-after-content"/> |
michael@0 | 8 | <meta name="flags" content="" /> |
michael@0 | 9 | <style> |
michael@0 | 10 | div { counter-reset:ctr; quotes:"\0022" "\0022" "\0022" "\0022"; } |
michael@0 | 11 | |
michael@0 | 12 | .gen::before { |
michael@0 | 13 | content:counter(ctr) url(square-outline-32x32.png) open-quote "Before " attr(class); |
michael@0 | 14 | counter-increment:ctr; |
michael@0 | 15 | } |
michael@0 | 16 | .gen::after { |
michael@0 | 17 | content:counter(ctr) url(square-outline-32x32.png) "After " attr(class) close-quote; |
michael@0 | 18 | counter-increment:ctr; |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | .abs::before { |
michael@0 | 22 | position:absolute; |
michael@0 | 23 | left:0; |
michael@0 | 24 | } |
michael@0 | 25 | .abs::after { |
michael@0 | 26 | position:absolute; |
michael@0 | 27 | right:0; |
michael@0 | 28 | } |
michael@0 | 29 | |
michael@0 | 30 | .rel::before { |
michael@0 | 31 | position:relative; |
michael@0 | 32 | top:-10px; |
michael@0 | 33 | } |
michael@0 | 34 | .rel::after { |
michael@0 | 35 | position:relative; |
michael@0 | 36 | top:10px; |
michael@0 | 37 | } |
michael@0 | 38 | |
michael@0 | 39 | div { border:1px solid green; margin:5px; height:100px; } |
michael@0 | 40 | </style> |
michael@0 | 41 | </head> |
michael@0 | 42 | <div class="gen abs">Inner</div> |
michael@0 | 43 | <!-- an element should be the containing block for its positioned content --> |
michael@0 | 44 | <div style="position:relative;" class="gen abs">Inner</div> |
michael@0 | 45 | <div class="gen rel">Inner</div> |
michael@0 | 46 | <div>Begin <span class="gen rel">Inner</span> End</div> |
michael@0 | 47 | </body> |
michael@0 | 48 | </html> |