Classes not global?

Bricks Version: 1.5.4
Browser: Brave Latest
OS: macOS

I have a page that contains an h2 tag with the class page-lead__heading. It render as it should.
the class contains a font-size: var(–text-l) and a color: var(–accent) there is more but enough for this example.

I am now adding blog posts via the Gutenberg editor and am adding the same class to an h2 via the advanced tab (without the dot). When viewing the rendered page I can see the added class but the class definitions are not found at all in the attached style sheet.

They are however visible in the static page that uses the same class.

Is than an error or is there a setting that I changed/didn’t change that prevents classes from being global?

I have regenerated the CSS via the Bricks → Settings → General Tab under Custom Breakpoints (I added one for large iPad). And checked that the disable Global Classes is unchecked (grey).

At a loss, since all of my class stylings are basically useless for the blog template.
I also tried to turn off Gutenberg (after the fact), but that didn’t change the use of it at all.

Any help or advice is appreciated.

This could be the reason:

1 Like

Hi Dean, thank you. Yeah, this highlights one of two issues. The reuse of classes that are not on the same type of element. (Because they are chained). And the second is the interoperability of Bricks with the Gutenberg editor. “Simple” things like editor width and loading of Bricks styles into the Gutenberg editor.

I have tried adding the exact class as its output from a page from Bricks to inline styles to the element class as well. Without success. The class is there but the style declaration is missing.

Actually, this results in a third problem: the lack of global styles. Since the Bricks styles are only output inline on any page where that class is declared, it’s omitted on any page that tries to only use the class without declaring it. That’s useless IMHO. I’ll have to test and see if the CSS as an external file option could solve this, but only if it automatically updates the output on every save.

@thomas I know you added a ton of complicated features and are working on conditions API etc, How about the ‘simple’ save to stylesheet ability that isn’t experimental? I have seen that some of the related issues with chained classes or global classes aren’t new requests or bugs (IMHO, I think they are bugs because they are fundamental to web design).

Mind going into the details fo solving that issue, timelines etc? Thanks in advance.

Hi Sebastian,
Thank you very much for your report.

The problem arises, as Dean already correctly said, through the chaining of the classes. We have the issue on our radar and will address it as soon as possible, but it is not a “simple” task that can be solved on the fly.

Best regards,
timmse

Hallo Stefan,

Thanks. I read this. And I fully understand that this isn’t a quick and simple thing and affects a lot of areas. After reading the initial response, do you have any update from two months ago on where this might lie in your plans/roadmap?

Unfortunately, I can’t say more than the roadmap itself. The task that goes along with it is this one: Roadmap – Bricks

So it will still take a while. I understand this is an important point - but it is not the only one on the to-do list, and, compared to the other requests, it has fewer votes.

Hi Stefan,

Thanks for the link. I understand the voting system. But I would think ‘features’ (or rather fundamentals) that help simplify the overall system would be more beneficial to the software and its adoption, no? So the ability to manage external stylesheets (this is just because we happen to talk about it here) would easily allow outside developers to add new features that didn’t need to fully hook into Bricks and, therefore, make it easier to adopt on a larger scale.

I barely know Bricks much like the rest of you, but only working on features at the whim of its user base might not be such a good idea (my wishes included), especially when the user base grows and you really want to help that base succeed. It has the early Android approach to development, no? Either way, I’ll go vote on that ‘feature’ now.

Come to think of it, you don’t need a Manager, you already have it in WP. You just need to export to it. Bricks is a theme after all, no?