Load global CSS classes which are not used

Hey there,

I am often facing an issue with the global CSS-Classes inside bricks. Whenever I want to output something using custom code I would find it quite handy to use the classes I’ve assigned and designed visually using the global CSS-Classes feature inside bricks.

Bricks seems to only output the styles for those classes which are used within bricks-element on that specific page. So my custom code won’t pick up any styles unless I have an element on that page with the same class.

I’ve found a temporary workaround to place a container-element, assign it that class and set it to display: none, which will then load the styles for that class again. It is not a very good solution, but it works…

So, my question is if there are any plans/possibilities to add a hook/filter so I can, for example, define classes which should also get loaded on that specific page for usage in custom code. Or maybe there exist any other methods to make a class available for custom code?!

1 Like