-
Notifications
You must be signed in to change notification settings - Fork 513
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
fix(pseudo class empty): removed whitespace example #2582
fix(pseudo class empty): removed whitespace example #2582
Conversation
It looks like this is your first pull request. 🎉 Thank you for your contribution! One of the project maintainers will triage and assign the pull request for review. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct. |
Thanks for opening this one. It looks like no browser supports this yet: https://developer.mozilla.org/en-US/docs/Web/CSS/:empty#browser_compatibility I would remove it in this case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments outstanding to remove the whitespace-only example
I would argument towards leaving it in there, especially as it's not a "new feature", but just changing the "matching-rule" for an existing one:
Plus this is probably a wider discussion, and this PR would just ensure that it's in the same state as it was previous to the – to my interpretation – unintended space removal through the prettification. Merging this would only recover that previous state and the discussion that you've mentioned could get handled in a separate issue. What do you think? |
Thanks for putting time into sharing the rationale for keeping it. In general, we need at least one browser to implement something before we document it and even though this is more of a sub-feature than a feature, I think it will be confusing for some to see an interactive example for something that won't work. I still think it's best to leave it out here and have the compatibility table be the source of truth. This logic is defined in the Browser Compatibility Data repository, FYI, see https://github.com/mdn/browser-compat-data/blob/60bef76e807ed45d354620d8725a3c7202cafc4b/css/selectors/empty.json#L46-L78. Let me know if that makes sense :) |
Hello @mfranzke, thanks for this PR. I agree with @bsmth here. Because no current browser supports this feature yet, including an example that doesn't work in any browser could lead to confusion for those who are trying to learn from these interactive examples. (Probably should not have been added in the first place). I believe it would be best to remove the "Element with whitespace" example for now and we can consider adding it back once there is some browser support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Description
Added a whitespace again to the code example that has been removed by accident with some code beautification out of #2566Removed whitespace example in total as discussed in this PR.
Motivation
That whitespace actually makes the difference within this code example, as it's currently being displayed incorrectly without the whitespace being included (first and third example displayed the same as they are actually the same code).As discussed within this PR, this example might lead to confusion and we would probably bring it in again as soon as browser vendors have implemented the changed behaviour.
Additional details
Resulting live-example page on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/:empty
Related issues and pull requests
Fixes #2581