-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[selectors-4] :empty
pseudo-selector (spec updated)
#594
Comments
Hi @brandonmcconnell, unfortunately it's too late to propose focus areas for Interop 2024, the proposal window closed on Oct 7. We're now in the middle of evaluating the 100+ proposals we got and can't take on additional work. Closing this, but that's not a reflection of the strength of |
@foolip That's understandable. Moving forward, I think it would be highly advantageous and convenient to automatically repropose features that were not accepted into the previous year's interop. This feature was already evaluated and essentially now has to skip a year. |
@brandonmcconnell thanks for the feedback! I've filed #611 and linked your comment there so it's not forgotten. |
This is a copy from last year's Interop 2023 proposal for this same feature: #180
Description
:empty
pseudo-selector (spec updated to also match elements with only whitespace)Quoting the spec:
Rationale
The
:empty
pseudo-class is already widely supported among most modern browsers, but the spec has since changed to include matching for elements that contain only whitespace and no non-whitespace nodes or text nodes.Quoting the amendment to this change from the spec:
In modern web development, we have bundlers that remove all non-whitespace characters from elements, so this is not normally an issue for a good number of us, but that limits the use of features like this to those of us running non-standard tools and further gate-keeps those without them, namely JAMstack devs who may have to ensure none of their elements are ever empty, so they can target in CSS them as expected.
It's the main reason for why we tend to see HTML like this in the wild, to ensure all elements contain no unexpected whitespace:
Related discussions:
Specification
https://w3c.github.io/csswg-drafts/selectors-4/#the-empty-pseudo
Tests
The text was updated successfully, but these errors were encountered: