Opened 6 months ago
Last modified 6 months ago
#58539 new defect (bug)
Twenty Seventeen: Image block figcaption text alignment inconsistency
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.8 |
Component: | Bundled Theme | Keywords: | has-patch has-screenshots |
Focuses: | css | Cc: |
Description
Steps to reproduce:
- Activate Twenty Seventeen theme
- Add an image using the image block
- Notice center alignment of caption in the editor
- Save page and view, noticing left alignment of caption now
Attachments (7)
Change History (9)
#1
@
6 months ago
- Focuses css added
- Summary changed from Twenty Seventeen - figcaption text alignment inconsitency to Twenty Seventeen: Image block figcaption text alignment inconsistency
- Version changed from 6.2.2 to 5.8
The Image block's captions have been aligned left on the front end since the block editor was made public (r43800). The discrepancy began in WordPress 5.8 when the block class list started with block-editor-block-list__block
before wp-block-image
, which made the editor styles' selector meaningless (at least for this block).
One way to fix it in the editor is adding a selector that does not require a certain order:
[class^="wp-block-"]:not(.wp-block-gallery) figcaption, [class*=" wp-block-"]:not(.wp-block-gallery) figcaption
Related: #56747
#2
@
6 months ago
- Keywords has-patch has-screenshots added
I have Tested https://core.trac.wordpress.org/attachment/ticket/58539/58539.diff Patch & It's Working Fine for me.
Note: See
TracTickets for help on using
tickets.
Since the gallery block has the captions as centered, I've removed the left alignment causing this for consistency.