| OLD | NEW |
| (Empty) |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <style> | |
| 5 body { | |
| 6 font-family: monospace; | |
| 7 } | |
| 8 p { | |
| 9 margin: 0; | |
| 10 } | |
| 11 | |
| 12 .container { | |
| 13 width: 13em; | |
| 14 height: 10em; | |
| 15 background-color: lightgray; | |
| 16 } | |
| 17 | |
| 18 #f1 { | |
| 19 -webkit-flow-into: flow1; | |
| 20 } | |
| 21 #r1 { | |
| 22 -webkit-flow-from: flow1; | |
| 23 } | |
| 24 @-webkit-region #r1 { | |
| 25 .c1 { | |
| 26 background-color: lime; | |
| 27 } | |
| 28 #p1 { | |
| 29 background-color: green; | |
| 30 } | |
| 31 } | |
| 32 | |
| 33 #f2 { | |
| 34 -webkit-flow-into: flow2; | |
| 35 } | |
| 36 #r2 { | |
| 37 -webkit-flow-from: flow2; | |
| 38 } | |
| 39 @-webkit-region #r2 { | |
| 40 p { | |
| 41 background-color: lightgreen; | |
| 42 } | |
| 43 } | |
| 44 | |
| 45 #f3 { | |
| 46 -webkit-flow-into: flow3; | |
| 47 } | |
| 48 #r3 { | |
| 49 -webkit-flow-from: flow3; | |
| 50 } | |
| 51 @-webkit-region #r3 { | |
| 52 p { | |
| 53 background-color: yellow; | |
| 54 } | |
| 55 .c3 { | |
| 56 background-color: orange; | |
| 57 } | |
| 58 #p3 { | |
| 59 background-color: red; | |
| 60 } | |
| 61 } | |
| 62 </style> | |
| 63 </head> | |
| 64 <body> | |
| 65 <div id='f1'> | |
| 66 <style scoped='true'> | |
| 67 p { | |
| 68 background-color: lightgreen; | |
| 69 } | |
| 70 </style> | |
| 71 <p>Styled line of text</p> | |
| 72 <p class='c1'>Styled line of text</p> | |
| 73 <p id='p1'>Styled line of text</p> | |
| 74 </div> | |
| 75 <div id='f2'> | |
| 76 <style scoped='true'> | |
| 77 .c2 { | |
| 78 background-color: lime; | |
| 79 } | |
| 80 #p2 { | |
| 81 background-color: green; | |
| 82 } | |
| 83 </style> | |
| 84 <p>Styled line of text</p> | |
| 85 <p class='c2'>Styled line of text</p> | |
| 86 <p id='p2'>Styled line of text</p> | |
| 87 </div> | |
| 88 <div id='f3'> | |
| 89 <style scoped='true'> | |
| 90 p { | |
| 91 background-color: lightgreen; | |
| 92 } | |
| 93 .c3 { | |
| 94 background-color: lime; | |
| 95 } | |
| 96 #p3 { | |
| 97 background-color: green; | |
| 98 } | |
| 99 </style> | |
| 100 <p>Styled line of text</p> | |
| 101 <p class='c3'>Styled line of text</p> | |
| 102 <p id='p3'>Styled line of text</p> | |
| 103 </div> | |
| 104 | |
| 105 Partial overlap, @region more specific than <style scoped> (@regio
n style has rules for class and id, scoped style has rule for <p>) | |
| 106 <div class='container' id='r1'></div> | |
| 107 Partial overlap, <style scoped> more specific than @region (@regio
n style has rule for <p>, scoped style has rules for class and id) | |
| 108 <div class='container' id='r2'></div> | |
| 109 Overlap, @region and <style scoped>using the same selectors (both
@region and scoped style have rules for <p>, class and id) | |
| 110 <div class='container' id='r3'></div> | |
| 111 </body> | |
| 112 </html> | |
| OLD | NEW |