Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Consolidate editor styles #262

Merged
merged 9 commits into from
Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,17 @@ function twentynineteen_scripts() {
/**
* Enqueue supplemental block editor styles
*/
function twentynineteen_editor_frame_styles() {
function twentynineteen_editor_customizer_styles() {

wp_enqueue_style( 'twentynineteen-editor-frame-styles', get_theme_file_uri( '/style-editor-frame.css' ), false, '1.0', 'all' );
wp_enqueue_style( 'twentynineteen-editor-customizer-styles', get_theme_file_uri( '/style-editor-customizer.css' ), false, '1.0', 'all' );

if ( 'custom' === get_theme_mod( 'colorscheme' ) ) {
// Include color patterns
require_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) );
wp_add_inline_style( 'twentynineteen-editor-frame-styles', twentynineteen_custom_colors_css() );
wp_add_inline_style( 'twentynineteen-editor-customizer-styles', twentynineteen_custom_colors_css() );
}
}
add_action( 'enqueue_block_editor_assets', 'twentynineteen_editor_frame_styles' );
add_action( 'enqueue_block_editor_assets', 'twentynineteen_editor_customizer_styles' );

/**
* Display custom color CSS in customizer and on frontend.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"scripts": {
"build:style": "node-sass style.scss style.css --output-style expanded && postcss -r style.css",
"build:style-editor": "node-sass style-editor.scss style-editor.css --output-style expanded && postcss -r style-editor.css",
"build:style-editor-frame": "node-sass style-editor-frame.scss style-editor-frame.css --output-style expanded && postcss -r style-editor-frame.css",
"build:style-editor-customizer": "node-sass style-editor-customizer.scss style-editor-customizer.css --output-style expanded && postcss -r style-editor-customizer.css",
"build:rtl": "rtlcss style.css style-rtl.css",
"build:print": "node-sass print.scss print.css --output-style expanded && postcss -r print.css",
"build": "run-p \"build:*\"",
Expand Down
5 changes: 5 additions & 0 deletions style-editor-customizer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*!
Twenty Nineteen Customizer Styles

NOTE: This file is empty by default. It is automatically populated with styles if the user selects a custom primary color in the customzier.
*/
5 changes: 5 additions & 0 deletions style-editor-customizer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*!
Twenty Nineteen Customizer Styles

NOTE: This file is empty by default. It is automatically populated with styles if the user selects a custom primary color in the customzier.
*/
61 changes: 0 additions & 61 deletions style-editor-frame.css

This file was deleted.

67 changes: 0 additions & 67 deletions style-editor-frame.scss

This file was deleted.

Loading