-
-
Notifications
You must be signed in to change notification settings - Fork 102
Omit internal nth child tagnames when direct child #70
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
Omit internal nth child tagnames when direct child #70
Conversation
9d7ab7e to
9adae27
Compare
eoghanmurray
commented
May 4, 2023
Some test changes for discussion:
(github.com)
Actual:
L127 --.rounded-1·>·.home-hero-signup·>·div·>·:nth-child(1)
Expected:
L127 ++.rounded-1·div·>·div:nth-child(1)
I would have expected this to go to .rounded-1·div·>·:nth-child(1) but the code is peppered with other rounded-1 classes so the original was relying on a div being the child of another div.
I'd be quite happy ditching this type of 'accidental' structural selection, but likely you have a different opinion?
eoghanmurray
commented
May 4, 2023
I can't figure out how to automatically update the expected test output — I could do some more commits separating out the 'good' test result changes vs. the 'bad' ones
I'd be quite happy ditching this type of 'accidental' structural selection, but likely you have a different opinion?
Ok so it's possible to have the best of both worlds, i.e. only drop the tagName if it is redundant, but at the expense of checking both versions (with and without tagName). Would that be acceptable?
This is a more limited form of #68
I think this is an unambiguous win and something to build upon for #68 and related.
I'm not sure if I should check in the test result changes or if you prefer to review them as failures?