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

**URL:** <https://community.hubspot.com/t/bug-css-minification-blocked-by-css-variables/107968>\
**Category:** CMS Development\
**Tags:** design-manager, css\
**Created:** [May 24, 2024, 6:35pm UTC](https://community.hubspot.com/t/bug-css-minification-blocked-by-css-variables/107968 "2024-05-24T18:35:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasha-A8](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sasha-a8/32/5385_2.png) [@Sasha-A8](https://community.hubspot.com/u/Sasha-A8)\
**Post date:** [May 24, 2024, 6:35pm UTC](https://community.hubspot.com/t/bug-css-minification-blocked-by-css-variables/107968/1 "2024-05-24T18:35:22Z")

</div>

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](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/1/5191ed4e0077a374e34e456956ac74365b306652.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.

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [May 27, 2024, 2:18pm UTC](https://community.hubspot.com/t/bug-css-minification-blocked-by-css-variables/107968/2 "2024-05-27T14:18:28Z")

</div>

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](https://community.hubspot.com/t5/CMS-Development/Variables-not-applying-to-other-attached-CSS/m-p/189453)  
- [Using theme variables in template hubl code not working for padding](https://community.hubspot.com/t5/CMS-Development/Using-theme-variables-in-template-hubl-code-not-working-for/m-p/920198)  
- [Stylesheets Not Compiling Properly](https://community.hubspot.com/t5/CMS-Development/Stylesheets-Not-Compiling-Properly/m-p/634289)  
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
