CMS Development

igcorreia
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.

Capturar.PNG

0 Upvotes
2 Replies 2
sharonlicari
Community Manager
Community Manager

Module HUBL Error - Custom variables in CSS - CLI

Hey @igcorreia    

 

Thank you for the information provided, I'll tag a few experts that can share their experience with you.  

 

Hey @Dennis-DWFB @stefen @alyssamwilie  any thoughts you would like to share with @igcorreia ?  

 

Thanks

Sharon


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes
igcorreia
Contributor

Module HUBL Error - Custom variables in CSS - CLI

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.