-
-
Notifications
You must be signed in to change notification settings - Fork 155
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 support for nth-child pseudo-selector #64
Comments
Thanks for the suggestion, @joshuataylor! I'm working in a refactor that will let this more easier to implement. |
I'm very interested in that feature too. Thanks! |
Hi @gbmoretti! Today I could finish the POC for this refactor. The result is in this diff. I will try to finish this until the end of this month. Please follow the issue #71 for more details. |
Thank you! I'll take a look on that :) |
Just for the record: the refactor was made in the PR #73 and I'm implementing this feature in this new branch: add-nth-child-pseudo-class. |
This implementation works only with integers and `odd/even` values for the nth-child pseudo-class selector. It closes #64.
* Tokenize pseudo-classes It generates tokens based on rules to capture the pseudo-class name and value. It is needed to generate the selector containing the pseudo-class. * Hide auxiliar function - we don't need it to be public * Be able to parse pseudo classes for Selector This is needed in order to add search for nodes using some structural pseudo classes. * Parsing pseudo-class expressions and odd/even It parses the special forms of pseudo-class values into Selector. * Searching for nodes with pseudo-class nth-child selector This implementation works only with integers and `odd/even` values for the nth-child pseudo-class selector. It closes #64. * Remove public doc from Floki.PseudoClass module * Fix comment position * Move "PseudoClass" module to the "namespace" of Selector Better organize code.
@joshuataylor @gbmoretti I'm sorry for the delay. This feature is now available in the version 0.12.0. cc @EmilieP @Ali-l @Lucasosf @andrelip @aphillipo @deini @justgage @mischov |
It's really nice to be able to queries like:
Support for floki would be awesome :)
The text was updated successfully, but these errors were encountered: