Last active
November 24, 2017 15:16
-
-
Save PhilippeVay/a7a9a8c62918db47f05bd75256baa439 to your computer and use it in GitHub Desktop.
::selection - custom colors for selection of text by the user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* User selecting text: custom colors | |
* Beware of white text on dark background: you must redefine ::selection for these cases | |
* | |
* MDN: https://developer.mozilla.org/fr/docs/Web/CSS/::selection | |
* Autoprefixer does take care of adding needed -moz- prefix | |
* | |
*/ | |
::selection { | |
color: white; | |
background-color: rgba(255, 32, 32, 0.995); // because of Chrome. Source: https://stackoverflow.com/a/43139296/137626 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment