tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

svg-text-selection-transparent-background.html (903B)


      1 <!DOCTYPE html>
      2 <title>CSS Pseudo-Elements Test: ::selection transparent background for SVG </title>
      3 <link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
      4 <link rel="help" href="https://drafts.csswg.org/css-pseudo/#selectordef-selection">
      5 <meta name="assert" content="Verify that ::selection with transparent background color does not modify the foreground in SVG text.">
      6 <link rel="match" href="reference/svg-text-selection-ref.html">
      7 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
      8 <script src="support/selections.js"></script>
      9 <style>
     10  div {
     11    font: 16px Ahem;
     12  }
     13  text {
     14    fill: lightgreen;
     15    stroke: darkgreen;
     16  }
     17  ::selection {
     18    background-color: transparent;
     19  }
     20 </style>
     21 <div>
     22  <svg width="100" height="60">
     23    <text x="20" y="20">Text to select</text>
     24  </svg>
     25 </div>
     26 <script>selectNodeContents(document.querySelector("div"));</script>