Skip to content

fix: linker handles :not() pseudo-class selectors and uses correct SelectorFlags#80

Merged
Brooooooklyn merged 1 commit intomainfrom
fix/linker-not-pseudo-class-selectors
Mar 5, 2026
Merged

fix: linker handles :not() pseudo-class selectors and uses correct SelectorFlags#80
Brooooooklyn merged 1 commit intomainfrom
fix/linker-not-pseudo-class-selectors

Conversation

@Brooooooklyn
Copy link
Member

@Brooooooklyn Brooooooklyn commented Mar 5, 2026

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/ɵɵdefineComponent output, 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 as 8) 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.

…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>
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Brooooooklyn Brooooooklyn merged commit b67c924 into main Mar 5, 2026
4 checks passed
@Brooooooklyn Brooooooklyn deleted the fix/linker-not-pseudo-class-selectors branch March 5, 2026 06:51
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

Successfully merging this pull request may close these issues.

Linker drops :not() pseudo-class selectors - negation is lost, selectors match incorrectly

1 participant