Status: FAIL | Duration: 11ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-pseudo/highlight-painting-currentcolor-004b.html
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Pseudo-Elements Test: ‘currentColor’ in ‘text-shadow’ (but not ‘color’) of overlapping highlights</title> <link rel="author" title="Delan Azabani" href="mailto:dazabani@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-painting"> <meta name="assert" content="This test checks that ::selection does not take the ‘color’ of the next active highlight below when resolving ‘currentColor’ in ‘text-shadow’ and ‘color’ is not ‘currentColor’."> <link rel="match" href="highlight-painting-currentcolor-004b-ref.html"> <meta name="fuzzy" content="0-120;0-10"> <link rel="stylesheet" href="support/highlights.css"> <script src="support/selections.js"></script> <style> ::highlight(a) { color: yellow; background-color: blue; } ::highlight(b) { color: lime; background-color: blue; } ::selection { color: green; background-color: black; text-shadow: 0 2em red, 0 4em currentColor; } </style> <div class="highlight_reftest" id="target">test test</div> <script> CSS.highlights.set("b", new Highlight(createRangeForTextOnly(target, 0, 4))); CSS.highlights.set("a", new Highlight(createRangeForTextOnly(target, 5, 9))); selectNodeContents(target); </script>
/css/css-pseudo/highlight-painting-currentcolor-004b-ref.html
<!DOCTYPE html> <meta charset="utf-8"> <link rel="author" title="Delan Azabani" href="mailto:dazabani@igalia.com"> <link rel="stylesheet" href="support/highlights.css"> <style> .a { color: yellow; background-color: blue; } .b { color: lime; background-color: blue; } .selection { color: green; background-color: black; text-shadow: 0 2em red, 0 4em currentColor; } </style> <div class="highlight_reftest" id="target"><span class="b"><span class="selection">test</span></span><span class="selection"> </span><span class="a"><span class="selection">test</span></span></div>