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

🔷 [Epic] Support CSS Nesting #253

Closed
2 tasks done
calebjacob opened this issue Feb 5, 2024 · 1 comment
Closed
2 tasks done

🔷 [Epic] Support CSS Nesting #253

calebjacob opened this issue Feb 5, 2024 · 1 comment

Comments

@calebjacob
Copy link
Contributor

calebjacob commented Feb 5, 2024

CSS recently added native support for nesting styles:

.foo {
  button {
    &:hover { ... }
  }
}

The only catch is that browsers have only recently started to support it: https://caniuse.com/css-nesting

For the next year or two, it's still considered best practice to use something like Post CSS to convert the nested syntax for full browser support: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting#readme

We also need to somehow update the Monaco CSS language parser to support nesting. We could possibly cheat and switch it to SCSS under the hood to support nesting syntax. Otherwise, Monaco shows a bunch of red squigglies when using nested syntax.

Tasks

  1. calebjacob
  2. P1 - Dev Expectations
    andy-haynes
@mpeterdev
Copy link
Collaborator

may be related to #22 since a solution there would likely cover transforms a la Post CSS

@mpeterdev mpeterdev added the Epic label Feb 6, 2024
@mpeterdev mpeterdev changed the title Support CSS Nesting 🔷 [Epic] Support CSS Nesting Feb 6, 2024
@andy-haynes andy-haynes removed their assignment Feb 9, 2024
@mpeterdev mpeterdev changed the title 🔷 [Epic] Support CSS Nesting 🔷 [Epic] Support CSS Nesting Syntax Lowering Mar 13, 2024
@mpeterdev mpeterdev changed the title 🔷 [Epic] Support CSS Nesting Syntax Lowering 🔷 [Epic] Support CSS Nesting Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Status: Done
Status: Done
Development

No branches or pull requests

3 participants