Skip to content

modifiers: keep the prefix in a group/peer arbitrary variant anchor#173

Open
samoht wants to merge 1 commit into
mainfrom
group-arbitrary-prefix
Open

modifiers: keep the prefix in a group/peer arbitrary variant anchor#173
samoht wants to merge 1 commit into
mainfrom
group-arbitrary-prefix

Conversation

@samoht

@samoht samoht commented Jul 26, 2026

Copy link
Copy Markdown
Owner

A group/peer arbitrary variant whose & anchor is preceded by a context, like group-[:nth-of-type(3)_&], dropped the prefix: parse_arbitrary_selector_content only handled content starting with &, so the anchor-at-end form fell to a fallback and emitted :is(:where(.group) *) instead of :is(:nth-of-type(3) :where(.group) *). It now handles the <prefix> & form, keeping the ancestor context ahead of the anchor.

parse_arbitrary_selector_content only handled content that starts with the &
anchor, so group-[:nth-of-type(3)_&] hit the fallback and dropped the prefix,
emitting :is(:where(.group) *) instead of :is(:nth-of-type(3) :where(.group)
*). Handle the "<prefix> &" form so the context ahead of the anchor survives.
@samoht
samoht force-pushed the group-arbitrary-prefix branch from b2cebd7 to 0c9933e Compare July 26, 2026 20:49
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.

1 participant