File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
src/vendor/wordpress/styles Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @cloudfour/patterns ' : patch
3+ ---
4+
5+ Allow captions for centered WordPress Image Blocks to fill their container
Original file line number Diff line number Diff line change @@ -158,6 +158,17 @@ $wp-button-gap: size.$spacing-gap-button-group-default;
158158 max-inline-size : calc (50% - 0.5em ); // 2
159159 }
160160
161+ /// By default, WordPress uses table styles to constrain captions to the size
162+ /// of the image. This makes sense for left- and right-aligned image blocks,
163+ /// but for consistency with our non-block `figure` elements, we allow
164+ /// captions to go as wide as they need for centered elements.
165+ .aligncenter {
166+ & ,
167+ > figcaption {
168+ display : block ;
169+ }
170+ }
171+
161172 /// Apply border only to image
162173 ///
163174 /// 1. We're using 1px borders here rather than size.$edge-small because it
You can’t perform that action at this time.
0 commit comments