diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-pseudo/highlight-paired-cascade-004.html')
-rw-r--r-- | testing/web-platform/tests/css/css-pseudo/highlight-paired-cascade-004.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-pseudo/highlight-paired-cascade-004.html b/testing/web-platform/tests/css/css-pseudo/highlight-paired-cascade-004.html new file mode 100644 index 0000000000..61e2b7d7f0 --- /dev/null +++ b/testing/web-platform/tests/css/css-pseudo/highlight-paired-cascade-004.html @@ -0,0 +1,27 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Pseudo-Elements Test: paired cascade: rule includes highlight pseudos other than ::selection</title> +<link rel="author" name="Delan Azabani" href="mailto:dazabani@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-cascade"> +<link rel="mismatch" href="highlight-paired-cascade-004-notref.html"> +<meta name="assert" value="This test verifies that setting color on ::target-text suppresses any UA non-initial used value for background-color. ::target-text is a highlight pseudo with a recommended UA default background-color that is not initial (Mark), so paired cascade can be observed."> +<link rel="stylesheet" href="support/highlights.css"> +<style> + :link, :visited { + color: blue; + } + main { + font-size: 7em; + margin: 0.5em; + } + main::target-text { + /* + Used background-color should be initial (transparent). + https://www.w3.org/TR/CSS21/colors.html#propdef-background-color + */ + color: black; + } +</style> +<p>Test passes if the text below does not appear to be highlighted (<a href="">test again</a>). +<main class="highlight_reftest">quick</main> +<script>location.href = "#:~:text=quick";</script> |