custom-highlight-painting-text-shadow.html (746B)
1 <!DOCTYPE html> 2 <meta charset="UTF-8"> 3 <title>CSS Highlight API Test: text-decoration</title> 4 <link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> 5 <link rel="match" href="custom-highlight-painting-text-shadow-ref.html"> 6 <meta name="assert" value="::highlight overlay paints text-shadow"> 7 <meta name="fuzzy" content="0-64;0-2"> 8 <style> 9 ::highlight(example-highlight) { 10 background-color: yellow; 11 color: blue; 12 text-shadow: 5px 10px rgba(0, 255, 0, 0.5); 13 } 14 </style> 15 <body> 16 <span>One </span><span>two </span><span>three…</span> 17 <script> 18 let r = new Range(); 19 r.setStart(document.body, 1); 20 r.setEnd(document.body, 3); 21 22 CSS.highlights.set("example-highlight", new Highlight(r)); 23 </script> 24 </body>