I've been looking for this throughout the web and can't even find anyone else even asking this, let alone a solution...
Is there a way to change the color of the highlight area within a text input when text is selected? Not the highlight border or the background, but the portion that appears around the text when you have the text actually selected.
The colour of selected text can be easily changed by using the CSS | ::selection Selector. In the below code, we have used CSS ::selection on <h1> and <p> element and set its colour as yellow with green background.
To change the highlight text colour, click the first box beside “Selected Text” and choose your preferred colour in the resulting colour panel and then click “Done”. Use the second box to change the highlight background colour.
To change the color of the highlighted-text, simply target the ::selection selector and then define the color of the background property.
If you are looking for this:
Here is the link:
http://css-tricks.com/overriding-the-default-text-selection-color-with-css/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With