May 18, 20207:52 AM - edited May 18, 20208:01 AM
Contributor
Module HUBL Error - Custom variables in CSS - CLI
I wonder what I am doing wrong because the variables work in module preview but they don't work when I edit the theme.
The code is very simple: module.css
{%- set logosize= '200' %}
span.logo {
max-width:{{logosize+ 'px'}};
}
When I inspect the preview it works but in my theme it does not. The theme is a drag and drop theme, the module is coded via CLI and the module is a global module.
I think I found the problem. Theme CSS can have custom HUBL in it while MODULES CSS can't. Took me 4 hours to figure this out 😕 Because I am using the CLI I didn't notice that HUBL + HTML is the only place where we can add custom code.