Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSSO silently removes nested CSS #368

Closed
blopker opened this issue May 31, 2024 · 3 comments
Closed

CSSO silently removes nested CSS #368

blopker opened this issue May 31, 2024 · 3 comments
Assignees

Comments

@blopker
Copy link

blopker commented May 31, 2024

This was a weird one to track down because there was no error, just missing CSS rules in the output. It turns out CSSO doesn't support newer CSS features and just silently drops them: css/csso#474. Lightningcss does the right thing. Since CSSO seems to be generally abandoned anyway, should it be dropped in favor of lightningcss?

@blopker
Copy link
Author

blopker commented May 31, 2024

For reference, the config to disable csso and just use lightningcss:

    playformCompress({
      CSS: { lightningcss: {}, csso: null },
    })

@NikolaRHristov
Copy link
Member

csso provides structural optimizations which lightningcss doesn't.

@blopker
Copy link
Author

blopker commented Jun 1, 2024

Thanks for the reply! Is there a specific optimization you see that lightningcss doesn't do? I looked through all the documentation I could find and I don't see anything csso does better. When ran on my code, csso does make smaller css files, but that's only because it removes code it shouldn't be removing.

It looks like csso is just broken now and unlikely to get fixed. I don't understand why anyone would want to keep using it? Anyway, I've been able to disable it with the above config, so I'm all good.

@NikolaRHristov NikolaRHristov closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants