Ver código fonte

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 anos atrás
pai
commit
9b09573d60

+ 3 - 0
blockbase/assets/ponyfill.css

@@ -102,6 +102,9 @@ pre {
 
 .aligncenter {
 	text-align: center;
+	display: block;
+	margin-right: auto;
+	margin-left: auto;
 }
 
 .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
 // 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.
+// Display and margin properties added to support image alignment from the classic editor.
 .aligncenter {
 	text-align: center;
+	display: block;
+	margin-right: auto;
+	margin-left: auto;
 }
 
 // Mimick the Gutenberg-generated rules of the layout container on the 404 template