SOLVED: Basic Text > HTML Tag > Custom Tag

Hi!
It’s been a long time since my last report was made.

Today, I am going to share something about the custom tag of a container. While I’m recently updating my site to 1.3.7 from 1.3.3, I noticed that there is something Bricks can do better.

Currently, when I add a heading element, the heading tag will be wrapped by a div.


*the title-line is the global class I created to do something I want.

So, to prevent this extra div, I had to use a basic text element(I typed container in the screenshot) and choose h4 for the custom tag. So I get the clean h4 tag HTML output as below.

Then I noticed that the heading didn’t reflect the preset style I have styled for the h4 heading in the backend. So, I can’t visualise it in the backend when I edit the page. It’s working in the front end.

For the custom tag, it should work when “h4(or any heading tag)” is inserted into the custom tag. But it didn’t work as expected.

I have a suggestion, the heading element shouldn’t be wrapped by a div.

By the way, I have another issue, I will need to do a screencast when I have a little more time later.

Looking forward to hearing from you.
Thank you!

Regards,
Jornes

1 Like

Hi Jornes,

Thanks so much for reaching out again!
If you add the styles for your headings within your Theme Styles, they will apply to both bricks headings and, for example Gutenberg headings or your “custom” basic text headings that don’t have the .bricks-heading class attached.

Well, that doesn’t just apply to the heading element. We already have an idea on the Idea Board. Reducing the number of DOM elements makes many things much more accessible. In addition, it reduces sources of error (for example, styles that are applied to the wrapper but should apply to the element itself).

I am firmly convinced that this step will change a lot but requires a complete overhaul of each element and the builder. But we take this very seriously and implement it sooner rather than later.

Best regards,
timmse

Hi @timmse

it works well in the front end. It’s just not rendered in the builder.

True, if you inspect the builder code, you’ll see that the tag stays a div, no matter what is set.
So this is actually a bug :smiley:

I’ll add it to our bug tracker and move the thread to the bugs category.

Best regards,
timmse

2 Likes

Alright. Thanks! Looking forward to this fix.

Hello @jornes, the fix for this will be part of the coming Bricks release.

thank you.

1 Like

Alright. Thank you Luis! :+1:t3::+1:t3::+1:t3:

+1 this as well – not a fan that extra elements are being added.