4 ms·
So, to style the 235th word in a text, I'd have to do #main { -letter-size: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
by DieBuche 15y ago
So, to style the 235th word in a text, I'd have to do
#main {
-letter-size: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .... 0.5em;
}
Why wouldn't I simply wrap it in a span, then it even works on browser with JS switched off. Uh, and once I have to edit the copy and add a single word somewhere, everything breaks.
- bmelton 15y agoIs there some reason you wouldn't just put it in a span and style that? Just because you CAN specifically target the 235th word in a text doesn't mean that you have to, or that you necessarily should. I can think of a few instances where I could have used the ability to target a specific letter in the past, specifically as it relates to logotypes or branding, but none that involved targeting the 235th letter.