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

Full coverage for "nth-of-type" optimization #8

Open
autarc opened this issue Apr 16, 2016 · 0 comments
Open

Full coverage for "nth-of-type" optimization #8

autarc opened this issue Apr 16, 2016 · 0 comments

Comments

@autarc
Copy link
Owner

autarc commented Apr 16, 2016

The current optimization which checks if nth-child(n) selectors can be replaced with the less conditional nth-of-type(n) pseudo selectors covers only specific use cases for complex and nested selections which keep the same matching order n. This simple implementation works well for most cases but can be error prone towards some scenarios. A more advanced solution should instead handle all matches.

Furthermore the same optimization doesn't provide the best results at the server. Since the adapt module implements the necessary functions to be compatible with the browser, it can be recognized that the nth-of-type(n) pseudo selector won't be matched reliable. Although the traversal follows the description it doesn't return the same matches as DOM based clients.

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

No branches or pull requests

1 participant