Why installation: a selector with the first letter with a space causes the highlighting of the mouse to be highlighted?

You have a problem with adding spaces, I get the following offset selection. Is this really the expected behavior?

It is like Chrome / Safari

Underlining strangeness

The problem reproduces here: https://jsfiddle.net/qsa99cc6/

CSS

p:first-letter { text-transform: uppercase; } 

HTML:

 <p> highlight me! this won't work because there whitespace in the &lt;p&gt; </p> <p>highlight me! This should work because there isn't</p> 
+5
source share
1 answer

In different browsers, the behavior is different. So it could be some kind of browser error. Perhaps these browsers identify the :first-letter pseudo-element in the same way as the :before and :after pseudo-elements.

+1
source

Source: https://habr.com/ru/post/1233139/


All Articles