-
Notifications
You must be signed in to change notification settings - Fork 72
Description
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.