Forráskód Böngészése

Add full and wide block support; Minor tweaks to classic editor styles.

Caroline Moore 6 éve
szülő
commit
987cd3aded
3 módosított fájl, 19 hozzáadás és 2 törlés
  1. 2 2
      illustratr/blocks.css
  2. 12 0
      illustratr/editor-blocks.css
  3. 5 0
      illustratr/functions.php

+ 2 - 2
illustratr/blocks.css

@@ -55,8 +55,8 @@ figure.alignfull,
 .wp-block-cover.alignfull,
 .wp-block-gallery.alignfull,
 .wp-block-embed.is-type-video.alignfull {
-	width: 100vw;
-	max-width: 100vw;
+	width: calc(100vw - 40px); /* subtract 40px for body padding */
+	max-width: calc(100vw - 40px);
 	margin-left: 0;
 	margin-right: 0;
 	position: relative;

+ 12 - 0
illustratr/editor-blocks.css

@@ -459,6 +459,18 @@
 	margin-bottom: 20px;
 }
 
+.wp-block-freeform.block-library-rich-text__tinymce ol {
+	list-style: decimal;
+	margin-left: 0;
+	padding-left: 40px;
+}
+
+@media screen and (max-width: 767px) {
+	.wp-block-freeform.block-library-rich-text__tinymce ol {
+		padding-left: 20px;
+	}
+}
+
 .wp-block-freeform.block-library-rich-text__tinymce blockquote {
 	padding-left: 40px;
 	margin: 0;

+ 5 - 0
illustratr/functions.php

@@ -65,6 +65,11 @@ function illustratr_setup() {
 	 */
 	add_theme_support( 'responsive-embeds' );
 
+	/**
+	 * Gutenberg wide and full images support
+	 */
+	add_theme_support( 'align-wide' );
+
 	// Add custom colors to Gutenberg
 	add_theme_support(
 		'editor-color-palette', array(