gruntjs / grunt-contrib-cssmin

Compress CSS files.
http://gruntjs.com/
MIT License
793 stars 147 forks source link

CSS container queries throw errors #317

Open helgatheviking opened 1 year ago

helgatheviking commented 1 year ago

I am trying to add a container query to my stylesheet

@container (min-width: 320px) {
  #test {
    background: pink; } }

And I get unexpected and invalid character/property errors

Unexpected '}' at assets/css/frontend/style.css:36:24.,Invalid character(s) '} ' at assets/css/frontend/style.css:36:24. Ignoring.,Invalid property name '# { background' at assets/css/frontend/style.css.css:35:2. Ignoring. 4 files created. 5.6 kB → 4.38 kB

benjamindell commented 1 year ago

Hi. Did you ever resolve this? We're getting the same issue and not quite sure how to resolve it.

helgatheviking commented 1 year ago

I never did... I probably just stopped trying to use container queries. :(

KoenWouters commented 10 months ago

Just experienced same issue with version 3.0.0.

In an other project version 4.0.0 was installed. This version is not giving errors and works. Solution: upgrade to 4.0.0 (or higher).