-
Notifications
You must be signed in to change notification settings - Fork 27
add nth child pseudo class #95
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
Conversation
bool Infix::operator==(Infix const& other) const = default; | ||
|
||
bool Nfix::operator==(Nfix const& other) const{ | ||
// FIXME: compile error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sleepy-monax I'll need ur eyes here, pls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaulting it works on my machine with 20.1.8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before merging, after the final review, ill switch to defaulting. its quicker than trying to set up the correct version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i agree with the concept, looks generally good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for nth-child CSS pseudo-class selectors, implementing the ability to select elements based on their position among siblings. The implementation includes parsing of "An+B" expressions (like 2n+1
, odd
, even
) and matching logic for various nth-child variants.
- Implements CSS nth-child pseudo-class selector parsing and matching
- Adds comprehensive AnB expression parsing for formulaic element selection
- Extends DOM tree functionality to support filtered element indexing
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
tests/css/selectors.xhtml | Comprehensive test cases for nth-child pseudo-class selectors |
src/vaev-engine/style/tests/test-select-spec.cpp | Unit tests for AnB expression matching logic |
src/vaev-engine/style/tests/test-parse-selectors.cpp | Parser tests for AnB expressions and nth-child selectors |
src/vaev-engine/style/selector.cpp | Core implementation of AnB parsing and nth-child selector support |
src/vaev-engine/style/selector-impl.cpp | Equality operator implementations for selector types |
src/vaev-engine/style/matcher.cpp | Matching logic for nth-child pseudo-class selectors |
src/vaev-engine/dom/tree.cpp | DOM tree index functions with filtering support |
a6635d3
to
0510a89
Compare
0510a89
to
882df79
Compare
Great work as always |
most of LOCs are testing