Disable Primary Hs_Default_Custom_Style.css from blog/system pages

Highlighted
Occasional Contributor

I noticed you can disable the Primary CSS File option for Website Pages, but cannot do so for system/error pages.

 

We have all sorts of default styling messing up our template coming from:
Coded_files/Custom/system/default/Hs_Default_Custom_Style.css

 

There is also not an option to do this for the Blog. However, our blog was designed a while back before Hubspot reworked their backend/editing structure, so I'm guessing these options have been lost since then.

 

In fact all our old archived blog and system templates from 2015-2017 have the Primary CSS file disabled but we can't find the option now.

 

Any solution? Thanks

Reply
0 Upvotes
3 Replies 3
Highlighted
Top Contributor | Partner

On your templates you can choose EXCLUDE for the Domain stylesheets.

 

Then link a different one.

 

Or for global, in settings / blog / templates you can see towards the bottom where css is selected.

Reply
0 Upvotes
Highlighted
Esteemed Contributor | Gold Partner

I also ran into this problem just now..

 

I'm creating another blog for a client, using custom coded template.

 

I have no idea where I can disable Hs_Default_Custom_Style.css - does anyone know?

 

There is actually an option in the templates

 

<!--
templateType: blog
isAvailableForNewContent: true
enableDomainStylesheets: false
label: Homepage
-->

 

but setting enableDomainStylesheets doesn't seem to do much..

Reply
0 Upvotes
Highlighted
Esteemed Contributor | Gold Partner

Alright.

 

So was just in contact with support & they confirmed there isn't a way to remove this.

 

The only way is via javascript, sure not so neat, but better than nothing right?

 

(make sure jquery is loaded also)

 

      $( document ).ready(function() {
          document.querySelector('link[href$="Hs_Default_Custom_Style.css"]').remove(); 
document.querySelector('link[href$="Hs_Default_Custom_Style.min.css"]').remove(); });

added both min.css & css as min.css only gets created after a while I believe.

 

also please upvote the "idea" as otherwise this doesn't get looked at by development:

https://community.hubspot.com/t5/HubSpot-Ideas/Ability-to-remove-legacy-Hs-Default-Custom-Style-from...