Latest CMS Developer Posts

HubSpot CMS Blog

Included CSS files no longer require publishing of the parent file

Written By Michele Herzog on Dec 17, 2018 3:31:42 PM

We’ve recently updated the way CSS files are processed after publish. This is specific to CSS files imported into each other using the Hubl .

How this used to work

Until recently, child CSS files required that the parent file be re-published in order for changes to take effect. Here's an example.

The first few lines of parent.css look like this:


Whenever changes were made to child.css, they wouldn’t be reflected until parent.css was published. This could become very tedious with many included files. Additionally, it required taking all changes in parent.css live.


How this works now

Now, whenever a CSS file is published, both the original and a minified copy of the file are uploaded to our cdn. The upload uses the last published state of the parent css file and will not publish any pending changes. From our example, any live content that uses the stylesheet parent.css will see style changes whenever child.css is republished. We have also sped up the minification and uploading to the cdn- the style changes should be reflected in only a few seconds.

If you update an included CSS file, it will immediately be live.


What about changes to parent.css?

No pending changes to the parent CSS file will be published. Only the new minified version of child.css will be pushed live.

This feature is now live to all Marketing Hub Professional and Enterprise users, as well as users of HubSpot CMS.

Topics: Product Updates, Website Development, CMS

Michele Herzog

Michele is a Product Expert for design and development tools at HubSpot. Tell your dog they say hello.

Stay Up To Date 👇

Learn how to code on HubSpot CMS
  • There are no suggestions because the search field is empty.
Join the HubSpot CMS Developer Slack

Ask questions in the CMS Developer Forum

Join the free CMS for Developers Course

View the HubSpot API Documentation

Recommended Posts