Archived topic
Default Gutenberg styling w/ !important overrides Typography
3 replies · Started by Tyler on March 16, 2023
Hey GP Team,
I don't think this is a GP issue as much as it's a CORE WP issue, but wanted to bring it up.
See issue here: https://github.com/WordPress/gutenberg/issues/38252
Defaulted options and values in Gutenberg get dumped inline with !Important tags. EG adding "Custom Class" to Typography and using ".has-medium-font-size" does not work because they tack on !important declaration.
I realize I can edit the variable in my child theme or Additional CSS (--wp--preset--font-size--medium) to overcome this.
but mostly, i'd just love to have all my typography settings under one roof. Seems like Core has left theme devs holding the bag on this one!
Hi there,
yeah you have to love core with inline !important styles, they may as well as told any PHP theme developer to go do one lol
We'll take a look at how to get around that. Probably we will have to add theme.json soon.
In the meantime are you ok with your current fix?
Thanks David! Brutal the core team does you guys like that sometimes.
I found this problem which cures the solution for now: https://wordpress.org/plugins/global-styles-mods/
All good fun, it stops us from wasting our time doing things we like lol
Thanks for sharing that plugin.