Skip to content

CSS container queries compile incorrectly #688

@mynetx

Description

@mynetx

This is my source code:

.some-layout {
    container-type: inline-size;

    > .cms-section-default {
        @container (min-width: 20rem) {
            background: #ffff00;
        }
    }
}

Expected result:

.some-layout {
    container-type: inline-size;
}

.some-layout > .cms-section-default {
    @container (min-width: 20rem) {
        background: #ffff00;
    }
}

Actual result:

.some-layout {
    container-type: inline-size;
}

@container (min-width: 20rem) {
    background: #ff0;
}

It seems that the compiler treats @container like @media, moving this up to the root level, instead of leaving the nesting intact.


CSS Container Queries spec: https://www.w3.org/TR/css-contain-3/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingspec complianceIssues with compliance to the Sass spec

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions