Browse Source

Button 2: Added basic Gutenberg support stylesheets

Chris Runnells 6 years ago
parent
commit
798cd931f1
3 changed files with 50 additions and 0 deletions
  1. 39 0
      button-2/blocks.css
  2. 0 0
      button-2/editor-blocks.css
  3. 11 0
      button-2/functions.php

+ 39 - 0
button-2/blocks.css

@@ -0,0 +1,39 @@
+/*
+Theme Name: Button 2
+Description: Used to style Gutenberg blocks
+*/
+
+/*--------------------------------------------------------------
+>>> TABLE OF CONTENTS:
+----------------------------------------------------------------
+1.0 General Block Styles
+2.0 Blocks - Common Blocks
+3.0 Blocks - Formatting
+4.0 Blocks - Layout Elements
+5.0 Blocks - Widgets
+6.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+1.0 General Block Styles
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+2.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+3.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+4.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+5.0 Blocks - Widges
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+6.0 Blocks - Colors
+--------------------------------------------------------------*/

+ 0 - 0
button-2/editor-blocks.css


+ 11 - 0
button-2/functions.php

@@ -160,6 +160,8 @@ function button_2_scripts() {
 
 	wp_enqueue_style( 'button-2-fonts', button_2_fonts_url(), array(), null );
 
+	wp_enqueue_style( 'button-2-blocks', get_template_directory_uri() . '/blocks.css' );
+
 	wp_enqueue_script( 'button-2-scripts', get_template_directory_uri() . '/assets/js/main.js', array(), '20170303', true );
 
 	wp_enqueue_script( 'button-2-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '20151215', true );
@@ -213,6 +215,15 @@ function button_2_fonts_url() {
 
 }
 
+/**
+ * Gutenberg Editor Styles
+ */
+function button_2_editor_styles() {
+	wp_enqueue_style( 'button-2-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
+	wp_enqueue_style( 'button-2-fonts', button_2_fonts_url() );
+}
+add_action( 'enqueue_block_editor_assets', 'button_2_editor_styles' );
+
 /**
  * Implement the Custom Header feature.
  */