Browse Source

Merge pull request #467 from Automattic/torres126-patch-3

Libre 2: Fix image block centring
Laurel 6 years ago
parent
commit
2b7be9d36e
3 changed files with 7 additions and 11 deletions
  1. 5 9
      libre-2/css/blocks.css
  2. 1 1
      libre-2/editor-style.css
  3. 1 1
      libre-2/style.css

+ 5 - 9
libre-2/css/blocks.css

@@ -73,15 +73,6 @@ Description: Used to style Gutenberg Blocks.
 2.0 General Block Styles
 --------------------------------------------------------------*/
 
-/* Figures */
-
-figure[class^="wp-block-"]:not(.aligncenter):not(.alignleft):not(.alignright):not(.alignwide):not(.alignfull),
-[class^="wp-block-"]:not(.aligncenter):not(.alignleft):not(.alignright):not(.alignwide):not(.alignfull) figure,
-[class^="wp-block-"] figure:not(.aligncenter):not(.alignleft):not(.alignright):not(.alignwide):not(.alignfull) {
-	margin-left: 0;
-	margin-right: 0;
-}
-
 /* Captions */
 
 [class^="wp-block-"] figcaption {
@@ -234,6 +225,11 @@ p.has-drop-cap:not(:focus)::first-letter {
 	width: 100%;
 }
 
+/* Image */
+.wp-block-image .aligncenter {
+        text-align: center;
+}
+
 /*--------------------------------------------------------------
 4.0 Blocks - Formatting
 --------------------------------------------------------------*/

+ 1 - 1
libre-2/editor-style.css

@@ -63,7 +63,7 @@ svg:not(:root) {
 }
 
 figure {
-	margin: 1em 40px;
+	margin: 1em 0;
 }
 
 hr {

+ 1 - 1
libre-2/style.css

@@ -152,7 +152,7 @@ svg:not(:root) {
 }
 
 figure {
-	margin: 1em 40px;
+	margin: 1em 0;
 }
 
 hr {