|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | + |
| 4 | +<head> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <title>cascade layers demo</title> |
| 7 | + <link rel="stylesheet" href="../styles.css"> |
| 8 | + <style> |
| 9 | + |
| 10 | + </style> |
| 11 | + |
| 12 | + <style class="editable"> |
| 13 | +@layer firstLayer, secondLayer; |
| 14 | + |
| 15 | +p { /* 0-0-1 */ |
| 16 | + background-color: red; |
| 17 | + color: grey !important; |
| 18 | + border: 5px inset purple; |
| 19 | + margin: 15px; |
| 20 | +} |
| 21 | +p#addSpecificity { /* 1-0-1 */ |
| 22 | + border-style: solid !important; |
| 23 | +} |
| 24 | + |
| 25 | +@layer firstLayer { |
| 26 | + #addSpecificity { /* 1-0-0 */ |
| 27 | + background-color: blue; |
| 28 | + color: white !important; |
| 29 | + border-width: 5px; |
| 30 | + border-style: dashed !important; |
| 31 | + } |
| 32 | +} |
| 33 | + |
| 34 | +@layer secondLayer { |
| 35 | + p#addSpecificity { /* 1-0-1 */ |
| 36 | + background-color: green; |
| 37 | + color: orange !important; |
| 38 | + border-width: 10px; |
| 39 | + border-style: dotted !important; |
| 40 | + } |
| 41 | +} |
| 42 | + |
| 43 | + </style> |
| 44 | +</head> |
| 45 | + |
| 46 | +<body> |
| 47 | + <section class="preview"> |
| 48 | + <p id="addSpecificity"> |
| 49 | + A paragraph with a border and background |
| 50 | + </p> |
| 51 | + </section> |
| 52 | + |
| 53 | + <textarea class="playable playable-css" style="height: 280px;"> |
| 54 | +@layer firstLayer, secondLayer; |
| 55 | + |
| 56 | +p { /* 0-0-1 */ |
| 57 | + background-color: red; |
| 58 | + color: grey !important; |
| 59 | + border: 5px inset purple; |
| 60 | +} |
| 61 | +p#addSpecificity { /* 1-0-1 */ |
| 62 | + border-style: solid !important; |
| 63 | +} |
| 64 | + |
| 65 | +@layer firstLayer { |
| 66 | + #addSpecificity { /* 1-0-0 */ |
| 67 | + background-color: blue; |
| 68 | + color: white !important; |
| 69 | + border-width: 5px; |
| 70 | + border-style: dashed !important; |
| 71 | + } |
| 72 | +} |
| 73 | + |
| 74 | +@layer secondLayer { |
| 75 | + p#addSpecificity { /* 1-0-1 */ |
| 76 | + background-color: green; |
| 77 | + color: orange !important; |
| 78 | + border-width: 10px; |
| 79 | + border-style: dotted !important; |
| 80 | + } |
| 81 | +} |
| 82 | + </textarea> |
| 83 | + |
| 84 | + <textarea class="playable playable-html" style="height: 140px;"> |
| 85 | +<p id="addSpecificity"> |
| 86 | + A paragraph with a border and background |
| 87 | +</p> |
| 88 | + </textarea> |
| 89 | + |
| 90 | + <div class="playable-buttons"> |
| 91 | + <input id="reset" type="button" value="Reset"> |
| 92 | + </div> |
| 93 | +</body> |
| 94 | +<script src="../playable.js"></script> |
| 95 | + |
| 96 | +</html> |
0 commit comments