Skip to content

Syntax Error on @container Queries #26

@bdkjones

Description

@bdkjones

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions