Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging the text selection color using CSS?
    primarykey
    data
    text
    <p>I'm currently working on a website, and I want to change the text selection color.</p> <p>I have it somewhat working. This is (part of) the code in my stylesheet:</p> <pre><code>::selection { background: #FF0099; color: black; text-shadow: none; } ::-moz-selection { background: #FF0099; color: black; text-shadow: none; } </code></pre> <p>It produces a mostly satisfying result. However, in some cases, the highlighting seems to lose its given color (of #FF099), as shown in this picture:</p> <p><img src="https://i.stack.imgur.com/eS5Qe.png" alt="picture of website"></p> <p>As you can see in the picture above, the text is entirely highlighted using the correct color (#FF099); however, the area between the body text and the title, as well as to the left of the body text, is highlighted with the default color (of blue). How can I keep parts of the highlighting from going back to the default?</p> <p>edit: larger picture available at <a href="https://i.imgur.com/NmZIf.png" rel="nofollow noreferrer">http://i.imgur.com/NmZIf.png</a></p> <p>a snippet:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>::selection { background: #FF0099; color: black; text-shadow: none; } ::-moz-selection { background: #FF0099; color: #EEE; text-shadow: none; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt;sample&lt;/p&gt; &lt;br /&gt; &lt;p&gt;sample2&lt;/p&gt;</code></pre> </div> </div> </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload