| 1 | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="50" height="50"> |
| 2 | <style type="text/css"> |
| 3 | g { |
| 4 | display: none; |
| 5 | } |
| 6 | svg:root g { |
| 7 | display: block; |
| 8 | } |
| 9 | rect { |
| 10 | display: none; |
| 11 | fill: red; |
| 12 | } |
| 13 | svg rect { |
| 14 | fill: red; |
| 15 | } |
| 16 | svg rect:not(:last-child) { |
| 17 | fill: red; |
| 18 | } |
| 19 | svg rect:last-child { |
| 20 | fill: black; |
| 21 | } |
| 22 | g path { |
| 23 | stroke: red; |
| 24 | } |
| 25 | g:only-of-type path:nth-child(2n+1) { |
| 26 | stroke: black; |
| 27 | } |
| 28 | svg:not(.missing-class) g > rect { |
| 29 | display: block; |
| 30 | } |
| 31 | circle:first-of-type:not(.evil-class) { |
| 32 | fill: yellow; |
| 33 | stroke: black; |
| 34 | stroke-width: 1px; |
| 35 | } |
| 36 | line { |
| 37 | stroke: red; |
| 38 | } |
| 39 | line:not(:root) { |
| 40 | stroke: black; |
| 41 | } |
| 42 | line:last-of-type { |
| 43 | stroke: blue; |
| 44 | stroke-width: 1px; |
| 45 | } |
| 46 | svg > path:empty { |
| 47 | stroke: blue; |
| 48 | stroke-width: 1px; |
| 49 | } |
| 50 | </style> |
| 51 | <circle class="present-class" cx="25" cy="25" r="25"/> |
| 52 | <g> |
| 53 | <path d="M 9,30 L 18,35"/> |
| 54 | <rect x="18" y="35" width="15" height="1"/> |
| 55 | </g> |
| 56 | <line x1="33" x2="42" y1="35" y2="30"/> |
| 57 | <line x1="18" x2="18" y1="9" y2="20"/> |
| 58 | <path d="M 32,9 L 32,20"/> |
| 59 | </svg> |