20 February 2018 11:30
CSS - TEXT - A Call for ::nth-everything | CSS-Tricks
(via)::nth-word() / ::first-word / ::last-word / ::nth-last-word()
We currently don't have any word-based pseudo elements. We do have word-spacing though, which is notable.
One use case is similar to using ::first-letter for drop caps, only doing a whole word.
article p::first-word {
float: left;
font-size: 300%;
margin: 0 10px 10px 0;
}
1
(1 marks)