Skip to content

Commit

Permalink
Expand on how block editor features should work
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed May 27, 2020
1 parent a28bd34 commit 816f31b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/designers-developers/developers/themes/theme-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,14 @@ The list of properties that are currently exposed via this method are:

### Features

So far, this function is only enabled for the `global` section in `experimental-theme.json`.
Via the features key we allow controlling some editor and block features according to the following rules:
- The features within `global` override the default editor settings, which plugins can modify by hooking into the `block_editor_settings` filter on the server.
- The features within the context of each block override the default block settings, which plugins can modify by hooking into the `blocks.registerBlockType` filter on the client.
- Block settings take precedence over global settings.

For example, if a feature is enabled for a block by default, although the theme disables it at the global level, the block keeps it enabled. If the theme wants to override a block's default, it has to target that particular block.

So far, this function is enabled only for the `global` section in `lib/experimental-default-theme.json`.

```
{
Expand Down Expand Up @@ -194,7 +201,7 @@ Then each block can decide to override how they handle block editor features dur
}
```

Moving forward, we plan to integrate overrides targeting individual blocks defined inside `experimental-theme.json` file that would be applied on top of features defined by block authors in `supports` property.
Moving forward, we plan to integrate overrides targeting individual blocks defined inside a theme specific file (`experimental-theme.json`) that would be applied on top of features defined by block authors in `supports` property.

The list of features that are currently supported are:
- Paragraph: drop cap.
Expand Down

0 comments on commit 816f31b

Please sign in to comment.