5

text-shadow in ::selection, still not great

 3 years ago
source link: https://miketaylr.com/posts/2017/05/please-kill-text-shadow-in-selection.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
text-shadow in ::selection, still not great

text-shadow in ::selection, still not great

15 May 2017

7 years ago I tweeted my only good tweet:

please kill the text-shadow in ::selection. obsessive compulsive text highlighters like myself go blind

screenshot of text selection ugliness

(apologies for hideous screenshot, 2010 was a weird time for web design, I guess)

Some internet hipsters agreed, so they put a default text-shadow: none rule for ::selection in html5 boilerplate’s main.css.

Anyways, we recently got a bug about nearly same exact issue: if you have a white background and set a white text-shadow on the copy (wat), things can get weird when someone makes a selection:

#wrapper {
  background-color: #fff;
}
.post-meta {
  text-shadow: 2px 0px 1px #fff;
}

So don’t do that?

Anyways. The most important takeaway (for me) is that the devs over at thegunmag.com don’t follow me on twitter, which is super rude when you think about it.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK