Skip to content
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

[WIP] feat(swc/parser): multiple nesting selector #6195

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexander-akait
Copy link
Collaborator

Description:

Allow to parse:

.foo {
  color: blue;
  && { padding: 2ch; }
}

Ref: https://www.w3.org/TR/css-nesting-1/#nesting

BREAKING CHANGE:

Maybe

Related issue (if exists):

@tabatkins Hello and sorry for ping, we need your advice and help here. In spec we have:

The nesting selector is allowed anywhere in a compound selector, even before a type selector, violating the normal restrictions on ordering within a compound selector.

But if you look at https://www.w3.org/TR/selectors-4/#grammar

Compound selector contains a lot of other selectors, so based on the condition above, we can get (and it looks weird):

.class {
   &div#id:pseudo-class&::pseudo-element& { }
}

So can you provide syntax of <compound-selector> with <nesting-selector> to fully undestand syntax and will be great to have it in spec too, thank you

@alexander-akait alexander-akait changed the title feat(swc/parser): multiple nesting selector [WIP] feat(swc/parser): multiple nesting selector Oct 18, 2022
@kdy1 kdy1 self-assigned this Oct 18, 2022
@kdy1 kdy1 added this to the Planned milestone Oct 18, 2022
@kdy1 kdy1 removed their assignment Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants