Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eoghanmurray
Copy link

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?

@eoghanmurray
Copy link
Author

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
Copy link
Author

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

@eoghanmurray
Copy link
Author

eoghanmurray commented May 4, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant