I have two themes for landing pages, one that HubSpot built, supposed to resemble our website, and another theme that I partially built from scratch. I would like to take the fonts that are uploaded in the HSpot theme and add them to my other one.
And here are the imports for the other theme's fonts:
/* @import url('http://example.com/example_style.css'); */
@import url(//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css);
@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700');
@import url('https://fonts.googleapis.com/css?family=Work+Sans:300,400,500,700,800');
/***********************************************/
/* CSS @imports must be at the top of the file */
/* Add them above this section */
/***********************************************/
/****************************************/
/* HubSpot Style Boilerplate */
/****************************************/
/* These includes are optional, but helpful. */
{% include "hubspot/styles/responsive/modules.css" %}
{% include "hubspot/styles/patches/recommended.css" %}
I tried swapping them and adding the "
{% include "EnSight_November2018_Theme/Coded_Files/EnSight_November2018-modules.css" %}
line, but it didn't do anything (not that I thought it would, since that's one stylesheet referencing another). If anyone has a good idea for adding these fonts, that would be greatly appreciated.
I have a few suggestions for you here. First, I'm happy to look at any specific files / templates that you're working on if you'd like; just link me to them here.
Second, since those font URLs live on use.typekit.net, it looks like you're using Adobe's font service. It was previously called Typekit although they've rebranded it to Adobe Fonts. Those font files will periodically get moved around to different URLs, meaning the fonts will stop working once that happens. Since you're loading them from specific URLs, once the fonts are moved, the fonts won't live at the URLs that in are in your stylesheet. So I'd suggest following Adobe's instructions for creating a "kit", and then one of their suggested methods for getting the fonts loaded onto your site. Their instructions are here: https://helpx.adobe.com/fonts/using/add-fonts-website.html . I'd suggest using the @import link, because you can add it directly into your stylesheet.
Once you've done that, you should be able to use the HubL include statement for "including" one stylesheet into another. If it doesn't work right away, it could just be that something is caching and you may need to wait a few minutes. Or you could also use the @import URL in both stylesheets and it should work fine. Whenever Adobe updates the URLs for their font files, the @import URL will also update them automatically and your fonts will continue to load properly.
I hope this helps. And again feel free to link me directly to what you're working on and I'll be happy to take a closer look.
Actually, do you have a link to the stylesheets in HubSpot? It's a little hard to say what's going wrong (aside from the suggestion of creating a "kit" in Adobe Fonts) from the jsfiddle links, since our tool isn't transpiling the code. So none of the HubL statements (like {% include %} for example) will work in jsfiddle. Or feel free to send me a direct message with the links if you'd prefer. I'm a HubSpotter so I'll be able to log in and see what's going on. For what it's worth, the code itself that I see in jsfiddle looks valid, but it might be helpful if I can see what's happening within HubSpot.