2 ms·
And :void would be a singularly terrible name anyway, because “void element” has a particular meaning in HTML (⅌ https://html.spec.whatwg.org/multipage/syntax.h
by chrismorgan 6y ago
And :void would be a singularly terrible name anyway, because “void element” has a particular meaning in HTML (⅌ https://html.spec.whatwg.org/multipage/syntax.html#void-elements https://html.spec.whatwg.org/multipage/syntax.html#void-elem...): an element that cannot have any children and accordingly has no end tag in the HTML serialisation, such as <img>, <hr> and <br>. Renaming :empty to :void would completely undermine this, since :empty matches any elements that have no text or element children (note: not “have no children”, because comments are allowed), regardless of whether or not they can.
The whole idea of allowing :empty to match elements containing only whitespace is fraught. Whitespace could be collapsed completely, to one space, or not at all, depending on both the surrounding markup and the values of such properties as display and white-space. If you decided the concept was worthwhile supporting, then :blank would be a decent name. But changing :empty to accept whitespace, well, that’d be a far worse design mistake.