-
Notifications
You must be signed in to change notification settings - Fork 64
Add caption styles in theme.json #219
Comments
Hi Nick!
You may also be interested in WordPress/gutenberg#44094 |
I am an idiot 😆 I mistook this for being in the Gutenberg repo, not TT3. |
Not sure the best path forward here, as image captions currently have center text align per this, in theme.css:
But theme.json does not support text align for captions (in elements), which means visual parody is not possible. (Unless I'm missing something.) |
Good call @bgardner. @mikachan I just realized what the main issue is. We are not opting into WP block styles, i.e. |
Ahh I see, thanks for looking into this further. I've actually just opened an issue for something similar to this here: WordPress/gutenberg#44510 I noticed that the block styles stylesheet is included in the editor, even when the theme doesn't opt into |
@aristath and I discussed this earlier this week, but did not start working on a solution: |
Ugh sorry @carolinan, I completely forgot about that issue and I haven't kept up with the conversation there. The comment you've linked to is particularly interesting, I'll let you know if I manage to take a longer look into this. |
I wonder if the inclusion of the theme.css file in the Editor when support for block styles is not added is simply a mistake or maybe there are backward compatibility reasons for non-block themes? 🤔 |
WordPress/gutenberg#44640 may fix this issue 🎉 |
Fixed with WordPress/gutenberg#44640 🙏 |
I think it would be worthwhile to add caption styles in theme.json. In doing a bit of testing, there is a good amount of visual inconsistency between the Editor and Frontend. This is due to Editor specific styles that do not get loaded on the Frontend, which is a separate issue in my opinion. But until that is address/discussed in Gutenberg, simply adding theme-specific caption styles in theme.json would solve this.
Editor:
Frontend:
The text was updated successfully, but these errors were encountered: