@w3c @w3cdevs CSS supports text nodes when working with flexbox and grid. Why isn't there some pseudo-class that allows us to target :first-node and :last-node. Sadly, all 3 of these elements (screenshot below) register as both :first-child and :last-child stackoverflow.com/questions/…
1
See github.com/w3c/csswg-drafts/… for a discussion on a selector for text nodes

Mar 31, 2021 · 4:54 PM UTC

1
1
Replying to @w3cdevs @w3c
I’m actually trying to select the element-node here, not the text, but only when the element is not preceded by any text nodes. :first-child seems to be targeting the span even if it the last node under the parent.
1