themecolor class in block HEADING

I have a HEADING type block and although I put the .themecolor class in the block, it pays attention to the class it has for the H3 (in this case).

If I place the class in the code inspector directly in the H, I get the class without problems, but the HEADING block does not allow me to do that, it places it in the upper DIV.

So?

How do I apply a class to an H without it having to be a text column?

(yes, I can put the styles of the key by hand in BeBuilder but it is not feasible if I have many headings)

Thank you.

Comments

  • Hi,

    Are you familiar with a preset feature (released in version 23.0)?

    You can create a preset with the color of your choice, and add it with two clicks to any other heading on your website.

    It works even better than themecolor class because you do not have to write it in the Advanced tab. ?


    Best regards

  • Thanks so much for the explanation. It is to be thankful.

    I am familiar with "presets" although I have not used them yet.

    On the subject of the class is what I need, as I say in the announcement: Put a class in a Heading (for whatever reason, since the example that you have given me was about a color, but if I have a class for other functionalities or another one that is not just a color or something different is not possible).

    I guess the answer would be that if I need it for a JS I can use some ".className h2" type selector. Yes, I do take that into account.

    But the ticket, above all, is to know how (or if it will be possible) to put a class so that it affects the "H", not the general Heading block.

    Thanks!

  • You can add an asterisk symbol at the end of your class so it will affect the Heading tag without the need of pointing it out in the class declaration.

    Thanks

  • Yes, I understand that and as a "patch" it's fine (which is what I mentioned above).

    But what I need is that in the DOM it looks like this:


    <div>

    <div>

    <h2 class="myClass">My Header</h2>

    </div>

    </div>


    Not like this:


    <div class="myClass">

    <div>

    <h2>My Header</h2>

    </div>

    </div>


    I know that using a text column I can do it but from what I am programming I would like to know if it is possible from a HEADING block.

    Thanks.

  • Without modifying the theme files it will not be possible.

    The classes are assigned to the element's container, and there is no setting to change that.


    Best regards

  • I understand.

    Ok thank you very much for your time.

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.