Ver código fonte

Varia: Center image block by default in the editor.

Allan Cole 5 anos atrás
pai
commit
282213a273

+ 1 - 0
varia/sass/blocks/_editor.scss

@@ -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";

+ 13 - 0
varia/sass/blocks/image/_editor.scss

@@ -0,0 +1,13 @@
+/* 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;
+}

+ 13 - 0
varia/style-editor.css

@@ -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;
 }