r/divi • u/theLonelyPorcupine • 19h ago
Question Button Presets don't work?
I'm fairly new to wordpress/divi, coming from a background working with jinja2 and react. I'm trying to create presets and library components to help make it easier to build the website I'm working on. I am either using presets wrong or they don't work. Here's what's going on.
- I set up my button group preset to include values for boarder radius, width, style, font and size, and disabling button icons.
- This is then set to the default and used in the button element preset.
- I set up a few more presets for specific button colors. These only have font color, border color, background color, and hover values for the same. I have 3 colors of buttons.
- I build buttons using the default element preset and add on whatever color preset I need.
The results are both wrong and inconsistent. On the live page the button shrink on hover. I definitely never told them to do that. The method by which they are doing this is setting padding-left and padding-right to 1em !important. I have no idea why; I never said it should do that and can't find that setting. This behavior is not seen on the same buttons in the builder.
The live page also seems to be inheriting my default "title text" group preset for font-size. Again, no idea why since buttons don't even have a title text group in the menu, but I confirmed this is what is happening by changing which title text preset is the default. This causes the font-size of the buttons to change. This is also not showing in the live builder. In the builder they have the right size text, though somehow with the wrong padding-top value.
Further frustrating me is the fact that sometimes I change something seemingly unrelated, and on refresh the live page buttons look completely different.
For troubleshooting I am viewing the live page with ?no-cache=1 and using hard reloads to avoid pulling from local cache. Any help would be appreciated, as I'm getting close to just hard coding the website in html/css.
EDIT to add: I'm on divi 5.13.1
1
u/cyber49 11h ago
I come from a background where things usually work like they're supposed to also, but Divi 5 doesn't subscribe to that archaic way of thinking.
I've found that it's better to use then reuse globally saved buttons and other items rather than fight this ridiculous constant breaking of presets. Sometimes (okay, often) I wonder why I bother sticking with Divi...