Browse Source

gutenberg blocks too narrow

windhamdavid 6 years ago
parent
commit
9a4175eb29
2 changed files with 6 additions and 2 deletions
  1. 3 0
      css/editor.css
  2. 3 2
      functions.php

+ 3 - 0
css/editor.css

@@ -0,0 +1,3 @@
+.wp-block {
+  max-width: 90%;
+}

+ 3 - 2
functions.php

@@ -31,9 +31,10 @@ function dw_plugs() {
 endif; 
 
 function dw_editor() {
-    //add_editor_style( 'style.css' );
+	wp_enqueue_style( 'dw-gutenberg', get_theme_file_uri( '/css/editor.css' ), false, '@@pkg.version', 'all' );
 }
-add_action( 'init', 'dw_editor' );
+add_action( 'enqueue_block_editor_assets', 'dw_editor' );
+
 
 add_action( 'wp_enqueue_scripts', 'dw_scripts' );
 function dw_scripts() {