November 12, 2019 01:15 am GMT
Original Link: https://css-tricks.com/a-super-weird-css-bug-that-affects-text-selection/
A Super Weird CSS Bug That Affects Text Selection
You know how you can style (to some degree) selected text with ::selection
? Well, Jeff Starr uncovered a heck of a weird CSS bug.
If you:
- Leave that selector empty
- Link it from an external stylesheet (rather than
<style>
block)
Selecting text will have no style at all. 😳😬😕
In other words, if you <link rel="stylesheet" ...>
up some CSS that includes these empty selectors:
::-moz-selection {}::selection {}
Then text appears to be un-selectable. You actually … Read article
The post A Super Weird CSS Bug That Affects Text Selection appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/a-super-weird-css-bug-that-affects-text-selection/
Share this article:
Tweet
View Full Article