You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Still reproducible in csso 5.0.5, and the blast radius has grown since this was filed: this silently deletes every responsive variant Tailwind CSS v4 emits (@media (width >= 40rem) and friends), so any pipeline that runs csso over Tailwind v4 output — e.g. @playform/compress's default CSS path on Astro sites — ships with the entire responsive layout removed. No error, no warning; the only symptom is a subtly broken site in production.
A datapoint that isolates the bug to csso (not css-tree):
constcsstree=require('css-tree');csstree.parse('@media (width >= 64rem){.a{color:red}}');// parses finerequire('csso').minify('@media (width >= 64rem){.a{color:red}}').css// → '' (empty string; also with { restructure: false } or { forceMediaMerge: true })
And a separate-but-related ask: whatever the fix for range syntax, csso should arguably never silently drop a rule it cannot handle — surfacing a parse error would turn this class of bug from a silent production regression into a five-minute fix.
Activity
monochromer commentedon Apr 12, 2023
Does CSSO support range syntax?
wolfcreative commentedon Jul 7, 2023
Confirm. There is a problem, I have just encountered it.
[CHANGE] Set media range notation to prefix
ppfeufer commentedon Aug 24, 2023
Yep, just ran into this one as well. Would be nice if range syntax would be supported.
stepanjakl commentedon May 9, 2024
+1
XingMXTeam commentedon Dec 19, 2024
+1
Smart624 commentedon Aug 28, 2026
Still reproducible in csso 5.0.5, and the blast radius has grown since this was filed: this silently deletes every responsive variant Tailwind CSS v4 emits (
@media (width >= 40rem)and friends), so any pipeline that runs csso over Tailwind v4 output — e.g.@playform/compress's default CSS path on Astro sites — ships with the entire responsive layout removed. No error, no warning; the only symptom is a subtly broken site in production.A datapoint that isolates the bug to csso (not css-tree):
And a separate-but-related ask: whatever the fix for range syntax, csso should arguably never silently drop a rule it cannot handle — surfacing a parse error would turn this class of bug from a silent production regression into a five-minute fix.