Status: FAIL | Duration: 9ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-highlight-api/painting/custom-highlight-painting-line-wrap-001.html
<!DOCTYPE html> <meta charset="UTF-8"> <title>CSS Highlight API Test: no trailing whitespace painted at line wrap</title> <link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> <link rel="match" href="custom-highlight-painting-line-wrap-001-ref.html"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> <meta name="assert" value="Highlight backgrounds must not extend over trailing whitespace at line breaks."> <style> div { font: 16px/1 Ahem; width: 100px; } ::highlight(test) { background-color: green; } </style> <body> <div id="d">one two three four five six seven eight nine ten</div> <script> const text = document.getElementById("d").firstChild; const r = new Range(); r.setStart(text, 0); r.setEnd(text, text.length); CSS.highlights.set("test", new Highlight(r)); </script>
/css/css-highlight-api/painting/custom-highlight-painting-line-wrap-001-ref.html
<!DOCTYPE html> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> <style> div { font: 16px/1 Ahem; width: 100px; } span { background-color: green; } </style> <body> <div><span>one two three four five six seven eight nine ten</span></div>