Skip to content

Container query syntax support #1232

Description

@woody-li

CSS has defined container query.
https://www.w3.org/TR/css-contain-3/#container-queries

But it seems clean-css doesn't support it.

Is is possible to support it or any plugin / workaround for it?

Input CSS

@container (width<1024px) {
    .test {
        color: #fff;
    }
}

Actual output CSS

  • Nothing by default options.

  • Disable remove empty rules and nested blocks :

@container (width<700px){}
  • Only enable level 0 (end bracket missing):
@container (width<700px){.test {color:#fff}

Expected output CSS

@container (width<700px){.test{color:#fff;}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions