Skip to content

Stop working when contains @layer declaration #1272

@otomad

Description

@otomad

IMPORTANT: clean-css is now in a maintenance mode. PRs are still welcome, and I will try do an occasional bugfix relase.

Precheck

  • Do a quick search and make sure a bug has not yet been reported;
  • do a quick check if the bug still exists in the latest patch version;
  • finally, be nice and have fun!

Environment

  • clean-css version - npm ls clean-css: 5.3.3
  • node.js version - node -v: v20.6.1
  • operating system: Windows 11 23H2 22631.2861

Configuration options

const CleanCSS = (await import("clean-css")).default;
new CleanCSS({});

Input CSS

@layer theme, layout, utilities;

Example from https://developer.mozilla.org/en-US/docs/Web/CSS/@layer

Actual output CSS

Nothing. And even ignore the following CSS rules.

Warning

Invalid character(s) 'utilities;' at 1:22. Ignoring.

Expected output CSS

@layer theme,layout,utilities;

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