romainmenke / todo

0 stars 0 forks source link

bug in PostCSS with `@layer` #1

Closed romainmenke closed 1 year ago

romainmenke commented 1 year ago

This fails :

@layer extensions {
    @layer one, two;

    @custom-media --mobile (min-width:320px) and (debug-layer: extensions);
    @custom-media --tablet (min-width:768px) and (debug-layer: extensions);
    @custom-media --desktop (min-width:1280px) and (debug-layer: extensions);

    @layer two {
        @custom-media --light (prefers-color-scheme: light) and (debug-layer: extensions-two);
    }

    @layer {
        @custom-media --mobile (min-width:320px) and (debug-layer: extensions.anon-1);
    }
 }
romainmenke commented 1 year ago

CSS above is transformed by a plugin into :

@layer extensions {
    @layer one, two
}

This bit fails.

has been filed : https://github.com/postcss/postcss/issues/1802