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

feat(css/ast): Add types for An+b syntax #2759

Merged
merged 4 commits into from
Nov 16, 2021
Merged

feat(css/ast): Add types for An+b syntax #2759

merged 4 commits into from
Nov 16, 2021

Conversation

alexander-akait
Copy link
Contributor

@alexander-akait alexander-akait commented Nov 15, 2021

An+B syntax (https://www.w3.org/TR/css-syntax-3/#anb-microsyntax):

  • new syntax supported
  • new AST nodes (you can see them in the PR)
  • recovery mode

It was not easy, the specification is complex and not clear in some places, but I have finished.

Also here we have new experimental syntax (not implemented in this PR):

:nth-child(2n+1 of li,.test) {}

But we need fix small problems in our selector parser before fix it, I will do it after we merge it and #2675, better to merge this PR firstly

@alexander-akait
Copy link
Contributor Author

@kdy1 Ready for review, should be merged before #2675 (to avoid big rebase)

@kdy1
Copy link
Member

kdy1 commented Nov 16, 2021

I have a question about the change.

@kdy1 kdy1 changed the title An+b syntax feat(css/ast): Add support for An+b syntax Nov 16, 2021
@kdy1 kdy1 changed the title feat(css/ast): Add support for An+b syntax feat(css/ast): Add types for An+b syntax Nov 16, 2021
@alexander-akait
Copy link
Contributor Author

@kdy1 Can we merge?

@kdy1
Copy link
Member

kdy1 commented Nov 16, 2021

I'll update base branch once #2764 is merged.

@kdy1 kdy1 enabled auto-merge (squash) November 16, 2021 14:40
@kdy1 kdy1 merged commit 6ce437d into swc-project:main Nov 16, 2021
@alexander-akait alexander-akait deleted the an+b-syntax branch November 16, 2021 15:06
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants