Having an issue where by adding whitespace I get the following highlighting offset weirdness. Is this really expected behaviour?
This seems to affect Chrome/Safari
Issue is reproduced here: https://jsfiddle.net/qsa99cc6/
CSS:
p:first-letter {
text-transform: uppercase;
}
HTML:
<p>
highlight me! this won't work because there's whitespace in the <p>
</p>
<p>highlight me! This should work because there isn't</p>
It's behaviour is different on various browsers. So it could also be some sort of bug in the browser. Maybe those browsers identify the pseudo-element :first-letter
the same way as the pseudo-elements :before
and :after
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With