Hi all,
I am struggling to understand how I am supposed to access global theming variables (i.e. font family, styling, sizing, line-height, etc.) while I am developing custom modules. I have seen posts that suggest that you can’t actually do this and that to test, you must place your custom module into the Page editor. Yet, even while testing this way I am receiving incorrect styling.
Take this code for example:
My global theme is set to use the ‘Acumin Pro’ font. The intention of this particular module is to display a number using the same font style as the h1 font set in my global theme settings. I’ve tried this using css classes but find that I am repeating classes across modules, so am trying `require_css`. This is attempting to use variables from theme-overrides.css, though I have also tried directly {{theme.text.font}} or actually using the h1 tag instead of p, which I thought to try custom styling elsewhere. All of this is to no avail:
The failed attempt
The correct output
So, how can I access this global styling?
From a classic web development point of view, I could simply import a shared stylesheet. HubSpot seems to do away with this, much to my confusion.
Regards,
-b





