Skip to content

Anchored container queries are not supported #1228

@uandco

Description

@uandco

This syntax is valid according to https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Anchor_positioning/Anchored_container_queries

@container anchored(fallback: flip-block flip-inline) {

Yet it's seen as a syntax error:

[lightningcss minify] Unexpected token Function("anchored")
1  |  ...:calc(var(--sp-l) + var(--sp-m) + var(--sp-xxs))}}@container anchored(fallback: flip-block flip-inline){...
   |                                      

Adding a space between anchored and ( eliminates the error (but also breaks the syntax and is ignored in the browser).
Still the argument with a double fallabck is causing issues:

[lightningcss minify] Unexpected token Ident("flip-inline")
1  |  ... + var(--sp-xxs))}}@container anchored(fallback: flip-block flip-inline){...
   |                                                                ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions