Status: FAIL | Duration: 10ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-highlight-api/painting/custom-highlight-container-metrics-001.html
<!DOCTYPE html> <meta charset="UTF-8"> <title>CSS Highlight API Test: Highlights using container sizes</title> <link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> <link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> <link rel="help" href="https://drafts.csswg.org/css-conditional-5/#container-lengths"> <link rel="match" href="custom-highlight-container-metrics-001-ref.html"> <meta name="assert" value="lengths depending on containers take the correct values in a universal highlight with no container"> <head> <style> div { width: 200px; height: 100px; } ::highlight(highlight1) { text-underline-offset: 1cqw; text-decoration-line: underline; text-decoration-color: green; text-decoration-thickness: 2cqh; } </style> </head> <body> <div id="h1">With container size</div> <script> let r1 = new Range(); r1.setStart(h1, 0); r1.setEnd(h1, 1); CSS.highlights.set("highlight1", new Highlight(r1)); </script> </body>
/css/css-highlight-api/painting/custom-highlight-container-metrics-001-ref.html
<!DOCTYPE html> <meta charset="UTF-8"> <title>CSS Highlight API Test Reference</title> <head> <style> div { width: 200px; height: 100px; } #h1 { text-underline-offset: 1svw; text-decoration-line: underline; text-decoration-color: green; text-decoration-thickness: 2svh; } </style> </head> <body> <div id="h1">With container size</div> </body>