Skip to content

Commit

Permalink
Add editor styles entry point (#617)
Browse files Browse the repository at this point in the history
* Updates build and start scripts to use wp-scripts instead of WDS npm-scripts

* Adds entry point and imports for editor styles

* Enqueues editor styles

* Removes an extra enqueue we don’t need

* Removes all of the extraneous src/editor files

* Looks for our base index file for editor styles

* Reverts to our standard wds-build scripts, since we only need one entry point

* Adds admin/editor style overrides
  • Loading branch information
coreymcollins authored Apr 8, 2021
1 parent 6d98d54 commit 7efebac
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 19 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function _s_setup() {

// Gutenberg editor styles support.
add_theme_support( 'editor-styles' );
add_editor_style( 'style-editor.css' );
add_editor_style( 'build/index.css' );

// Gutenberg responsive embed support.
add_theme_support( 'responsive-embeds' );
Expand Down
49 changes: 31 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/scss/base/_globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ pre {
@apply overflow-auto;
}

//-----------------------------------------
// Admin Overrides
//-----------------------------------------
.block-editor-writing-flow {
@apply text-base leading-normal;
}

//-----------------------------------------
// Theme Elements
Expand Down

0 comments on commit 7efebac

Please sign in to comment.