Skip to content

Commit

Permalink
Remove the documentation for dark-editor-style
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Jan 28, 2021
1 parent 28e851a commit e037fcd
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions docs/designers-developers/developers/themes/theme-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ There are a few new concepts to consider when building themes:
- **Editor Text Size Palette** - A default set of sizes is provided, but themes can register their own and optionally lock users into picking from preselected sizes.
- **Responsive Embeds** - Themes must opt-in to responsive embeds.
- **Frontend & Editor Styles** - To get the most out of blocks, theme authors will want to make sure Core styles look good and opt-in, or write their own styles to best fit their theme.
- **Dark Mode** - If a Theme is a Dark Theme with a dark background containing light text, the theme author can opt-in to the Dark Mode.
- **Block Tools** - Themes can opt-in to several block tools like line height, custom units.
- **Core Block Patterns** - Themes can opt-out of the default block patterns.

Expand Down Expand Up @@ -316,17 +315,6 @@ add_theme_support( 'editor-styles' );

You shouldn't need to change your editor styles too much; most themes can add the snippet above and get similar results in the classic editor and inside the block editor.

### Dark backgrounds

If your editor style relies on a dark background, you can add the following to adjust the color of the UI to work on dark backgrounds:

```php
add_theme_support( 'editor-styles' );
add_theme_support( 'dark-editor-style' );
```

Note you don't need to add `add_theme_support( 'editor-styles' );` twice, but that rule does need to be present for the `dark-editor-style` rule to work.

### Enqueuing the editor style

Use the `add_editor_style` function to enqueue and load CSS on the editor screen. For the classic editor, this was the only function needed to add style to the editor. For the new block editor, you first need to `add_theme_support( 'editor-styles');` mentioned above.
Expand Down

0 comments on commit e037fcd

Please sign in to comment.