postcss-csso: Syntax Error on @container Queries
Consider this snippet of CSS:
@container (min-width: 700px) {
color: blue;
}
If you attempt to run postcss-csso 6.0.1 on a file containing this snippet, you’ll get the following error:
CssSyntaxError: postcss-csso: /main.css:1:11: ")" is expected
> 1 | @container (min-width: 700px) {
| ^
2 | color: blue;
3 | }
Other PostCSS-based tools such as Autoprefixer and PurgeCSS don’t have a problem with @container. I’m unsure if the issue lies in the conversion to the csso-compatible AST that postcss-csso performs or if the issue is with CSSO itself. As a first step, I’m filing the report here.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 12
- Comments: 19
Same here, with codekit 3.29
I was also getting the same error but strangely there’s no issue when I run it through the web interface https://css.github.io/csso/csso.html
FWIW my project already uses Gulp so I switched to https://github.com/ben-eb/gulp-csso and that seems to work fine.