Status: PASS | Duration: 5ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-pseudo/svg-text-selection-shadow.html
<!DOCTYPE html> <title>CSS Pseudo-Elements Test: ::selection with shadows for SVG </title> <link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org"> <link rel="help" href="https://drafts.csswg.org/css-pseudo/#selectordef-selection"> <meta name="assert" content="Verify that ::selection with shadow paints behind originating shadow in SVG text."> <link rel="match" href="reference/svg-text-selection-shadow-ref.html"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <script src="support/selections.js"></script> <style> div { font: 16px Ahem; } text { text-shadow: 5px 5px 0px green; } ::selection { background-color: transparent; text-shadow: 3px 3px 0px blue; } </style> <div> <svg width="100" height="60"> <text x="20" y="20">Text to select</text> </svg> </div> <script>selectNodeContents(document.querySelector("div"));</script>
/css/css-pseudo/reference/svg-text-selection-shadow-ref.html
<!DOCTYPE html> <title>CSS Pseudo-Elements Test: ::selection transparent background for SVG ref</title> <link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> div { font: 16px Ahem; } text { text-shadow: 5px 5px 0px green, 3px 3px 0px blue; } </style> <div> <svg width="100" height="60"> <text x="20" y="20">Text</text> </svg> </div>