CMS Development

Jinnoy
Mitglied

Included CSS files not updating after changes

Hello everyone,,

first post here - I hope I'm posting in the right category. I've decided to split up css files into separate components to make everything a bit more modular and maintainable. So I'm including smaller portions of the css in a single main.css file like this:
Mobdro Lucky Patcher Kodi
{% include "custom/page/css/mobile-cta.css" %}

However, when i do changes in the included file (e.g. mobile-cta.css) the main,css file will not update its css unless i change something directly in the main.css file. Has anyone encountered similar problems? Right now for me the only way is to make the changes in the included file, then open up main.css and remove a semicolon there / add it back in and save. That way the included file will be reloaded and the changes will appear correctly on the live pages...

4 Antworten
Hubmate
Mitwirkender/Mitwirkende

Included CSS files not updating after changes

This would be a massive improvement. Does anyone know if Hubspot has plans to implement this improvement?

 

Thanks,

Steve

0 Upvotes
Kevin-C
Trendsetter/-in | Partner
Trendsetter/-in | Partner

Included CSS files not updating after changes

Hey @Jinnoy 

 

We share your pain!

To remedy this we had to ensure the entire team understood what and why this was happening and modified they're workflow accordingly to include that final step.

Not ideal by any means, but it is effective.

 

Has this been added to the feature/change request board?

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
0 Upvotes
alyssamwilie
Trendsetter/-in | Elite Partner
Trendsetter/-in | Elite Partner

Included CSS files not updating after changes

Yea, I've run into this problem before. Seems to be a bit of a bug in Hubspot, or just how it's supposed to work for some reason? We've gotten around it by coding externally with SASS and then using Gulp and SFTP to combine and upload to the Hubspot portal.

Alyssa Wilie

Web Developer
LyntonWeb

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
DanielSanchez
Autorität | Platinum Partner
Autorität | Platinum Partner

Included CSS files not updating after changes

Hi @Jinnoy ,

 

I understand about modular, but I can't understand what that would help me with. With an organized and commented style sheet to separate content, I believe maintenance is easier.

 

One tip that can help you a lot with maintenance is to use the variables in your CSS to change certain defaults and make maintenance much easier. Here's an example:

 

{% set AColor   = "#355E7E" %} /* Set  link color */
{% set BColor   = "#13212D" %} /* Set  link hover Color */

a{
    color:{{ AColor }};
}

a:hover{
    color:{{ BColor }}; 
}

With variables, u can chance all button colors in your CSS, just changing one value (variable).

 

 

Did this post help solve your problem? If so, please mark it as a solution.

Best regards!