- This topic has 22 replies, 10 voices, and was last updated 1 year, 8 months ago by Fernando.
-
AuthorPosts
-
March 25, 2020 at 6:07 am #1209430Natalie
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?
March 25, 2020 at 4:19 pm #1210164TomLead DeveloperLead DeveloperHi 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.
November 5, 2020 at 3:57 pm #1519805Tomany tutorial how to change default button look in generateblocks?
November 5, 2020 at 4:01 pm #1519808ElvinStaffCustomer SupportHi 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.
November 5, 2020 at 4:31 pm #1519824TomI’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)
November 6, 2020 at 9:11 am #1520801TomLead DeveloperLead DeveloperHi there,
You can filter the defaults like this: https://generatepress.com/forums/topic/add-custom-css-selector-to-the-button-selector/#post-1322768
March 9, 2021 at 9:03 am #1688437RachelleHi 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!
RMarch 9, 2021 at 10:01 am #1688518YingStaffCustomer SupportHi 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=GenerateBlocksFor future GB questions, please open topics in GB’s forum:
Free: https://community.generateblocks.com/
Pro: https://generateblocks.com/support/March 9, 2021 at 10:15 am #1688532RachelleHi 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.
March 9, 2021 at 11:14 am #1688599YingStaffCustomer SupportYes, 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!
March 9, 2021 at 11:17 am #1688603RachelleOkay, no worries. I’ll start a thread over there.
Thank you! 🙂
March 9, 2021 at 11:20 am #1688605RachelleP.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!
March 9, 2021 at 11:49 am #1688636YingStaffCustomer SupportThanks Rachelle, same to yourself too 🙂
May 14, 2021 at 3:20 am #1779715MattHi Elvin
That said, assuming you’re using GP premium, this default button color setting is found on Dashboard > Appearance > Customize > Colors > Buttons.
I am using GP Pro & GB Pro and GB buttons seem to simply ignore what is set in customizer button colors. The only way I can override them is by inserting ‘additional css’ on ‘gb-button’, or use standard button instead!
Matt
May 14, 2021 at 3:37 am #1779740DavidStaffCustomer SupportHi Matt,
currently the customizer settings in GP do not flow down to the GB – we’re working on something that will integrate the two.
You can however follow the info Tom provides here to set the default GB button styles:https://generatepress.com/forums/topic/generateblocks-button-block-default-gp-styling/#post-1520801
-
AuthorPosts
- You must be logged in to reply to this topic.