We have a link that is often copied to the users email tool, including color and background color. Since there is a Whitelabel solution, this can cause a problem when the text is white.
- text is white
- user selects the text to copy it
- text is white again (and in the worst case, the background color is lost)
I know the ::selection pseudo class, but it doesn't help for the copy process. See this fiddle: https://jsfiddle.net/vvfL2516/
.background { background: #222; }
.link { color: #fff; }
.link::-moz-selection {
background: #f00;
color: #0f0;
}
.link::selection {
background: #f00;
color: #0f0;
}
Thunderbird shows a blue link (=nice), but it's invisible in Libre Office and Google Docs, ... (not nice)
Update 2015-09-24:
The link form Andrew Lyndem contains the answer: https://stackoverflow.com/a/7454048/461754