clean-css-cli icon indicating copy to clipboard operation
clean-css-cli copied to clipboard

CSS nesting support

Open Pomax opened this issue 1 year ago • 0 comments

https://caniuse.com/css-nesting has been part of the official CSS spec, and available in all browsers for about a year now (half a year if you only consider "without turning on a feature flag"), but it looks like this tool has not been updated yet to deal with it so it dies when it encounters CSS like this:

html {
  --flag: ./img/us-en.png;

  &[lang="en-GB"] {
  --flag: ./img/en-gb.png;
  }

  body {
    & > h1 {
      &:before {
        content: " ";
        background-image: url(var(--flag));
      }
      font-size: 123%;
    }
}

Which might look like sass, but is in fact pure, plain CSS.

Pomax avatar Mar 02 '24 18:03 Pomax