-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Varia: Bold/non-bold option for heading works inconsistently #1852
Comments
This is a tricky one to solve because heading tags are set to The “$heading--font-weight” variable in Varia is meant to give theme designers a way to globally change the weight of all headings (both inside and outside of Gutenberg). Since there’s no way to change the font weight of post-titles, widget-titles, and site-title, etc. we probably can’t simply change the variable to something like Instead, it might make sense to add a new variable for headings that deals with Something like this might do it:
|
This is tricky. A heading that doesn't use the block isn't an issue, but for those in content, the option doesn't make any visual difference.
That could work if the font has bolder weight, but if not, should we make it lighter? It feels counter-intuitive though. This is probably something we should change in Varya. Since heading block won't default to bold, the default weight for heading should be |
Circling back to this issue as I've been having a hard time with not being able to use non-bold headings in block patterns. I feel like themes should not force bold for the heading block as the block's default is non-bold. @kjellr What's your opinion this? Would this issue be addressed in Varya? |
Using bold text for headings is a fairly common pattern (it's even the browser default), so I don't see us avoiding that in the future. The difficulty here is that we're currently unable to let Gutenberg know that we've used a bold weight, and so we can't activate the "Bold" setting for the block. Hopefully this is something that we'll be able to change when Global Styles comes along, but in the meantime, I think we're more or less stuck this way. The only potential options I can see to get out of this would be:
Neither one is a great solution. |
Thanks for your input, @kjellr. Much appreciated. As you said, neither of these workarounds don't seem to make the option in the way the user expects :/
Yes, it is a common pattern, but I still feel that decision should be left to the user in the end, and a theme should avoid styling the block in the way that contradicts the block settings.
With this, I understand that we won't be able to fix this issue in the themes that have already launched, but it wouldn't be a blocker for new themes, would it? That's why I was hoping non-bold heading is the default in Varya and new themes going forward.
I hope so too. Otherwise, the users will be kept locked in with the weight while the tool provides them with flexibility. Also, it will save users from a rough transition with their old contents. |
This was something I commented on in when I was experimenting with my own block-based theme and trying to resolve it at the theme level. My thoughts at the time were something like:
For the first thought, I agree with Takashi, I think. I think it'd be good to have styled going forward. For the second … is there an issue yet for Gutenberg for this? We should make one! |
I've added one here: WordPress/gutenberg#22641 |
User report here: 23863501-hc |
See also #2744 |
Is this still happening? |
Yes, this is still happening @MaggieCabrera, but it is a bit more complicated. Varia itself DOES show different weights in the published post: But the weights are actually reversed in the editor (the bold one looks in fact thinner than the regular one): In the case of Maywood, the published post shows the same weight regardless of the setting added in the editor. |
In most of the Varia based themes, the font-weight option for heading doesn't work. (Except the themes that don't use bold weight for headings)
This is probably because bold is hardcoded as default in the theme. cc @allancole
The text was updated successfully, but these errors were encountered: