[Support request] GenerateBlocks Button block default GP styling

Home Forums Support GenerateBlocks Button block default GP styling

  • This topic has 12 replies, 6 voices, and was last updated 1 month ago by Ying.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1209430
    Natalie

    Thanks so much for GenerateBlocks!!!

    This post is mainly to help others but also to check I have done the right thing.

    I have created a button block.

    I wanted the buttons to get the default styling I have already set up in appearance / customize /colors /buttons and
    appearance / customize /typography / buttons (plus any default button styling from the GP theme)

    So for each button, in the block editor under ‘advanced’ I added ‘button’ as a CSS class

    Then in the ‘colors’ section I clicked on the ‘background color’, then clicked the ‘clear color’ button. You need to do this for the ‘Normal’ state and the ‘Hover’ state. (You may need to do this for text color as well, but my text color was the same so I left it)

    Then in the ‘spacing’ section, clear the values for ‘padding’

    Is there an actual ‘clear defaults’ option that would do all that automatically?

    #1210164
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Glad you’re enjoying it!

    Setting defaults is possible via a filter right now, but I wouldn’t suggest using it until we’re out of alpha, as filter names/structure may change between now and then.

    #1519805
    Tom

    any tutorial how to change default button look in generateblocks?

    #1519808
    Elvin
    Staff
    Customer Support

    Hi Tom,

    any tutorial how to change default button look in generateblocks?

    If it isn’t styled within the Gutenberg editor, GB buttons follow what the theme assigns as the button color.

    That said, assuming you’re using GP premium, this default button color setting is found on Dashboard > Appearance > Customize > Colors > Buttons.

    A wise man once said:
    "Have you cleared your cache?"

    #1519824
    Tom

    I’m actually talking about generateblocks… and customize doesn’t have rounded border etc… it’s completely different…

    What I need is to set default button look in generateblocks (typography, borders, colours, spacing)

    #1520801
    Tom
    Lead Developer
    Lead Developer
    #1688437
    Rachelle

    Hi Tom,

    I also wish to be able to set a default global button style for the GenerateBlocks buttons…because I really don’t want to have to change every single button and hover state individually. All the buttons on the website will look the same, so I just want to add it once via css etc.

    So, first I tried setting up my own css class to add. But even that wouldn’t override the color, background-color, and padding options.

    So, then I removed my custom css and added the filter you linked to (in my child theme functions file.) But it doesn’t seem to be working. The colors still don’t change.

    I would just love to have a global button style I can apply for background-color, color, and padding (I wish there was a way to clear the defaults…so I could just add it myself in my css stylesheet or the customizer. Seems strange the GenerateBlocks Button block doesn’t inherit the Button styling from the theme.)

    Any help would be greatly appreciated (if you have a new filter for example or a css class I can target.)

    Thanks in advance!
    R

    #1688518
    Ying
    Staff
    Customer Support

    Hi Rachelle,

    If you are using Generateblocks pro, there’s a function called Global style.

    You could have a look at this demo video to have a better understanding.
    https://www.youtube.com/watch?v=GjyYcr8ldHQ&ab_channel=GenerateBlocks

    For future GB questions, please open topics in GB’s forum:
    Free: https://community.generateblocks.com/
    Pro: https://generateblocks.com/support/

    #1688532
    Rachelle

    Hi Ying,

    Thank you for the fast reply…but I’m not using GenerateBlocks Pro. I’m looking for a solution without that.

    I usually do all my styling etc. through a child theme css file. But I’ve been trying out the GB and liked the ease of using it for certain things. But the button thing is not making things easier.

    I’m just wondering why the default styling for the GB buttons wasn’t applied to the gb-button class? That way anyone could simply change that class in their css. And, in theory, if other people used the customizer within GB it would apply to the more specific individual button class and override gb-button…no?

    Having a global button style is super important for a lot of reasons. Just looking for a solution for that with GB buttons.

    So, is this a question I should add to the other forum? I used this thread as it related exactly to my issue. And the fix in this thread did not work for me.

    Thank you!

    R.

    #1688599
    Ying
    Staff
    Customer Support

    Yes, it’s better post this question in GB’s support community, when this thread was started there was no GB support forum yet.

    I believe this thread should be helpful for other GB users as well, since a lot of them are not using GP as theme.

    Thanks for your understanding!

    #1688603
    Rachelle

    Okay, no worries. I’ll start a thread over there.

    Thank you! πŸ™‚

    #1688605
    Rachelle

    P.S. And thank you for the links. I didn’t know those forums existed. Haha. And looks like my question may have been answered last month. Going to try it out now.

    Cheers! Have an awesome day!

    #1688636
    Ying
    Staff
    Customer Support

    Thanks Rachelle, same to yourself too πŸ™‚

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.