Status: FAIL | Duration: 10ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-pseudo/selection-background-color-transparent.html
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Pseudo-Elements Test: transparent ::selection background-color</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-cascade"> <link rel="mismatch" href="selection-background-color-transparent-notref.html"> <meta name="assert" content="An author-specified transparent ::selection background-color wins over the UA origin, so the selection is not painted using the default highlight background."> <script src="support/selections.js"></script> <style> div { font-size: 300%; } div::selection { background-color: transparent; } </style> <p>Test passes if "Selected Text" does <strong>not</strong> appear selected using the OS selection background color. <div id="test">Selected Text</div> <script>selectNodeContents(document.getElementById("test"));</script>
/css/css-pseudo/selection-background-color-transparent-notref.html
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Test Reference</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <script src="support/selections.js"></script> <style> div { font-size: 300%; } </style> <p>Test passes if "Selected Text" does <strong>not</strong> appear selected using the OS selection background color. <div id="test">Selected Text</div> <script>selectNodeContents(document.getElementById("test"));</script>