浏览代码

Blockbase: Add more styles to .aligncenter (#4675)

* Blockbae: add more styles to .aligncenter

This now supports image alignment as well as the site-logo block alignment

* Blockbase: replace spaces with tabs
Sarah Norris 3 年之前
父节点
当前提交
9b09573d60
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 3 0
      blockbase/assets/ponyfill.css
  2. 4 0
      blockbase/sass/base/_alignment.scss

+ 3 - 0
blockbase/assets/ponyfill.css

@@ -102,6 +102,9 @@ pre {
 
 
 .aligncenter {
 .aligncenter {
 	text-align: center;
 	text-align: center;
+	display: block;
+	margin-right: auto;
+	margin-left: auto;
 }
 }
 
 
 .container-404 {
 .container-404 {

+ 4 - 0
blockbase/sass/base/_alignment.scss

@@ -47,8 +47,12 @@
 // This was added for the 'site-logo' block which centers with an 'align:center' attribute
 // This was added for the 'site-logo' block which centers with an 'align:center' attribute
 // instead of 'textAlign' center which sets an .aligncenter class instead of a has-text-align-center
 // instead of 'textAlign' center which sets an .aligncenter class instead of a has-text-align-center
 // class which would do this for us.  I'm not sure why but this centers things appropriately.
 // class which would do this for us.  I'm not sure why but this centers things appropriately.
+// Display and margin properties added to support image alignment from the classic editor.
 .aligncenter {
 .aligncenter {
 	text-align: center;
 	text-align: center;
+	display: block;
+	margin-right: auto;
+	margin-left: auto;
 }
 }
 
 
 // Mimick the Gutenberg-generated rules of the layout container on the 404 template
 // Mimick the Gutenberg-generated rules of the layout container on the 404 template