-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Introduce explicit caption positioning #12997
Comments
Hey Mel I added on to this (closed) issue: #534 |
That style should be in the styles that are optional, not default. |
@melchoyce What do you think of adding the AlignmentToolbar to the InlineToolbar, like this exploration in #15554? Or this, with the AlignmentToolbar on the left, as it is in the toolbar of the Paragraph block? |
It would be great to add alignment directly to the captions area, as I have noticed that the caption can be off center on various images that I add. Adding the alignment inside the captions area would let the user decide where the caption should be seen. |
Yeah, exactly that @richtabor. |
Fun caption position from Snow Fall: |
Facing similar issues! |
Yeah, still not fixed. I've got around it with some CSS...
Paully |
The CSS you gave will cause all figcaptions of images to center. If the image is always centered on the website, then that is fine, but if you want to be specific to the page and not make it global, use the "Advanced" settings in the right column of the block editor for that image block and add a specific CSS class name (at the bottom of the column). This way, you can use that class name only when you want the caption to be centered, leaving the rest per the default of left align. For the Custom CSS, you do not need to add the tag name (figcaption) as part of the selector. It works fine with just the class name you assign it. Example:
Still not Fixed?? This figcaption text centering issue, is the kind of thing that is fundamental, basic and not something that is extra in any sense of the term. I am sure, if money depended on this, the bug would have been fixed within a month after it was first reported, that is what plugin and theme developers do. |
This could use an updated design with the latest set of tools for clarity :) cc @kellychoffman |
I am wondering if we should initially at Image Caption alignment into the Global Styles panel as suggested in this issue: |
That, is superb.
|
I wonder if we should be using the text alignment icons instead of the block alignment ones? Since the block alignments would have wide/full instead of left/right. |
Yes, I think it should be text alignment. I'm unsure if it should go on the right or the left, but if on the right it should be after the chevron (which indicates extra rich text formatting tools so it's tied to bold, italics, link). |
Just thought I would mention it.... |
Is your feature request related to a problem? Please describe.
Captions on images are shown centered in Gutenberg, but theme styles can override this. There's no way to explicitly set an alignment onto the caption, without writing additional CSS to override your theme.
Describe the solution you'd like
Introduce a text alignment setting to captions, and have any explicit change in alignment you make override theme styles.
Describe alternatives you've considered
More specific center styles on the Gutenberg block itself.
See also
The text was updated successfully, but these errors were encountered: