Skip to content

Commit

Permalink
Add centering style also to the theme style output
Browse files Browse the repository at this point in the history
Fixes comment in #5209 (comment).

Previous implementation assumed the theme would handle centering, just like it's traditionally handled alignleft and alignright classes, but since the aligncenter is now applied to the `figure` element, any theme that uses code like `img.aligncenter` won't work. Hence this PR.
  • Loading branch information
Joen Asmussen committed Mar 20, 2018
1 parent bf81a76 commit cd55d3a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions blocks/library/image/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
.wp-block-image figcaption {
margin-top: 0.5em;
color: $dark-gray-300;
text-align: center;
font-size: $default-font-size;
.wp-block-image {
figcaption {
margin-top: 0.5em;
color: $dark-gray-300;
text-align: center;
font-size: $default-font-size;
}

&.aligncenter {
text-align: center;
}
}

0 comments on commit cd55d3a

Please sign in to comment.