-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Add selector-anb-no-unmatchable
rule
#6678
Conversation
🦋 Changeset detectedLatest commit: cc1e5cb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Was unsure how to do grid structural selectors; can't test syntax in browser!
fe4830a
to
3ae61b7
Compare
<!-- prettier-ignore --> | ||
```css | ||
a:nth-child(0n+0) {} | ||
/*↑ ↑ | ||
* This unmatchable An+B selector */ | ||
``` | ||
|
||
[An+B selectors](https://drafts.csswg.org/css-syntax/#anb) are one-indexed. Selectors that always evaluate to `0` will not match any elements. |
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.
Any suggestions on a better thing to highlight / extended description?
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.
@mattxwang Thanks for the pull request, great work! 👏🏼
I've left minor suggestions, so please check them.
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Thank you for the helpful feedback @ybiquitous! I need to get in the habit of adding I think I've addressed all the comments, let me know what you think! |
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.
@mattxwang Thanks, LGTM! 👍🏼
I would suggest waiting for @jeddy3's review.
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.
@mattxwang Thanks. It's looking great.
I've requested one significant change and some minor nits.
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Thanks for the feedback @jeddy3; I think I've addressed all of the comments! Two quick questions:
|
Thanks for making the changes:
Yeap, a single test case for that would be swell.
Let's leave them out for now. |
selector-anb-no-unmatchable
selector-anb-no-unmatchable
rule
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.
Thanks for making the changes. One minor request, then I think it LGTM.
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 for making the changes.
LGTM.
Closes #5907.
I've left a few comments in review.
In addition, I'm a bit confused about Grid-Structural Selectors. The spec itself doesn't have an example of
:nth-col()
or:nth-last-col()
, the MDN docs' code example doesn't render for me on either Chrome or Firefox and has no browser compat data, and I haven't found much online on correct use. I must be missing something - some guidance would be helpful!