fix: linker handles :not() pseudo-class selectors and uses correct SelectorFlags#80
Merged
Brooooooklyn merged 1 commit intomainfrom Mar 5, 2026
Merged
Conversation
…lectorFlags Replace the linker's custom parse_selector/parse_single_selector with the pipeline's parse_selector_to_r3_selector which correctly handles :not() pseudo-class selectors, SelectorFlags.CLASS (8) instead of "class" string, and proper ordering of element → attributes → classes → :not() blocks. - Close #69 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Replace the linker's custom parse_selector/parse_single_selector with the
pipeline's parse_selector_to_r3_selector which correctly handles :not()
pseudo-class selectors, SelectorFlags.CLASS (8) instead of "class" string,
and proper ordering of element → attributes → classes → :not() blocks.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Note
Medium Risk
Touches selector codegen used in
ɵɵdefineDirective/ɵɵdefineComponentoutput, so incorrect serialization could break directive/component matching at runtime, but the change is narrowly scoped and well-covered by new tests.Overview
Updates the linker’s selector serialization to delegate to the shared
pipeline::selector::parse_selector_to_r3_selector, replacing the bespoke parsing logic.This changes generated selector arrays to use numeric
SelectorFlags(e.g. class as8) and adds correct support for:not(...)pseudo-class selectors (including multiple:not()blocks and comma-separated selector lists), with expanded unit tests covering these cases.Written by Cursor Bugbot for commit c050323. This will update automatically on new commits. Configure here.