Skip to content

nesting editions #1305

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

Merged

Conversation

romainmenke
Copy link
Member

@romainmenke romainmenke commented Feb 28, 2024

This adds a plugin option edition to toggle between implementations.

The edition doesn't refer to a specification version, but rather our implementation.

Edition 2024-02 overview:

  • usage of :is() pseudo-class is no longer optional
  • at rules are not combined with the and keyword
  • @nest is removed from the specification
  • declarations and nested rules/at-rules are no longer re-ordered

I am choosing not to re-order declarations and nested rules in this new edition because we actually know that this is a major pain point and I want to give users hands on experience with what it could be if w3c/csswg-drafts#8738 is adopted.

@romainmenke romainmenke marked this pull request as ready for review March 5, 2024 19:01
Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome idea and great execution! Love this path forward!

);

if (options.noIsPseudoSelector) {
throw new Error('The `noIsPseudoSelector` option is no longer supported. Migrate your CSS to use the latest CSS nesting syntax.');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't throw here because postcss-preset-env sets this option when a user targets very old browsers.

That behavior already has a comment to remove it in a next major.

@romainmenke romainmenke merged commit a371720 into main Mar 6, 2024
@romainmenke romainmenke deleted the nesting-editions--diligent-alaskan-malamute-d9a22039d1 branch March 6, 2024 16:01
@romainmenke
Copy link
Member Author

Thank you reviewing @Antonio-Laguna 🚀

@romainmenke romainmenke mentioned this pull request Jul 13, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants