| <!doctype html> |
| <html> |
| <head> |
| <style> |
| .target::before { |
| content: "Before "; |
| } |
| |
| target:is(.target::before, #target::before, #target) { |
| border: none; |
| } |
| |
| target:is(.target::before, #target::before, .target) { |
| color: white; |
| } |
| |
| target:is(.target::before, #target::before, target) { |
| background-color: green; |
| } |
| |
| target:is(.target::before, target::before, *) { |
| background-color: red; |
| color: blue; |
| border: 25px solid red; |
| } |
| </style> |
| </head> |
| <body> |
| <p>This test checks the dynamic specificity of rules mixing pseudo element and regular element matching. If the text succeed, the text should be "Before Target" in white over a green background and no borders.</p> |
| <target id="target" class="target">Target</target> |
| </body> |
| </html> |