[BUG] CSS Minification blocked by CSS variables (--*)

CSS files are minified automatically in HS CMS unless they contain syntax errors.

Putting my code through a linter shows that my css variables are the problem.

Such as --clr-primary: green;

SashaA8_0-1716575399895.png

This seems to be an issue with outdated nature of CodeMirror that rejects css variables as valid strings.

Variables are a modern CSS feature that work across most browsers, so it seems like this should be fixed or an override could be implemented.

Hi @Sasha-A8,
Thank you for reaching out to the Community!
Thank you also for sharing this! I will pass it along internally for more visibility.
I’d like to share these similar threads that might help you:
- Variables not applying to other attached CSS
- Using theme variables in template hubl code not working for padding
- Stylesheets Not Compiling Properly
In the meantime, I’d be happy to put you in touch with some of our Top Experts and other Community Members: Hi @cwilbanks, @Jsum, @JohnLaprairie, @alyssamwilie, @dsmarion, @JMellish do you experience the same? If yes, do you have workarounds to share with @Sasha-A8, please?
Thank you very much and have a great day!
Best,
Bérangère