Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Varia: Center image block by default. #1463

Merged
merged 3 commits into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions varia/sass/blocks/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@import "code/editor";
@import "cover/editor";
@import "heading/editor";
@import "image/editor";
@import "gallery/editor";
@import "group/editor";
@import "latest-posts/editor";
Expand Down
13 changes: 13 additions & 0 deletions varia/sass/blocks/image/_editor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Center image block by default in the editor */

.wp-block-image {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this bit was supposed to be for the front of the site.

text-align: center;
}

.wp-block-image > div {
text-align: center;
}

[data-type="core/image"] .block-editor-block-list__block-edit figure.is-resized {
margin:0 auto;
}
13 changes: 13 additions & 0 deletions varia/style-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,19 @@ object {
line-height: 1.125;
}

/* Center image block by default in the editor */
.wp-block-image {
text-align: center;
}

.wp-block-image > div {
text-align: center;
}

[data-type="core/image"] .block-editor-block-list__block-edit figure.is-resized {
margin: 0 auto;
}

.wp-block-gallery figcaption {
margin-bottom: 0;
}
Expand Down