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

Support for vanilla CSS nesting #33

Open
Scriptura opened this issue Jan 1, 2024 · 2 comments
Open

Support for vanilla CSS nesting #33

Scriptura opened this issue Jan 1, 2024 · 2 comments

Comments

@Scriptura
Copy link

Good morning,

Let's say I'm looking to transpile this valid CSS4 code:

.justify {
  hyphens: auto;

  @media (width > 35.01em) {
    text-align: justify;
  }
}

postcss-csso won't process it because of nesting:

CssSyntaxError: postcss-csso: /var/www/scriptura.github.io/styles/development/typography.css:108:10: Colon is expected

  106 |   hyphens: auto;
  107 | 
> 108 |   @media (width > 35.01em) {
      |          ^
  109 |     text-align: justify;
  110 |   }

In the meantime, I'm using another transpiler which does the bare minimum (removal of white spaces) but which doesn't cause me any problems...

@mrkeithy
Copy link

similar issues with the & selector.

@Scriptura
Copy link
Author

Scriptura commented Apr 29, 2024

I abandoned the matter and moved on to something else... or rather I stayed with postcss-minify, with it I'm sure I never encountered a problem of this type.

I did not understand why the industrial world didn't massively move from SASS to PostCSS, since I moved to PostCSS I know: on paper the solution looks great, but in practice many PostCSS plugins don't work, are not maintained, the ecosystem is extremely fragile. Many essential plugins are only maintained by a single developer, if he decides to stop... (example: css-next)

I'm an amateur geek, so I use PostCSS for my personal projects, but if I were a professional I think I would accept the frustration of having to use SASS...

... Or rather more certainly in vanilla CSS. Indeed, in a context where native CSS allows variables (but not yet everywhere) and now nested, the air of pre/post processors is coming to an end.

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

No branches or pull requests

2 participants