I have a peace of css styled like this:
ol li:before {
content: counter(item) ". ";
counter-increment: item;
background: #afafaf;
user-select: none;
}
Now, user-select: none;
prevents selection, but if one selects the list, content of :before marks as selected. I would like to prevent that by setting background-color: transparent
. But where? ol li:before::selection
won't work.
Picture related:
Lorem ipsum text is selected (painted red), I'd like the list selection to appear transparent.
- Blah blah
`, only thing 'special' is :before pseudo element. – nenadg Mar 10 '16 at 10:15with a series of- s (and the CSS alone is enough to convey that). It doesn't take more than 30 seconds to write by hand in an answer (or a minute if you need to insert filler content). If you're not going to put half the effort that the OP did into answering the question then don't answer. Don't go telling people off saying "stackoverflow is not coding service", especially when they're not outright treating the site as such.
– BoltClock Mar 10 '16 at 10:31