Editor: Fix bug where it was not possible to style custom block elements in theme.json.

This changeset resolves a bug where WordPress would only allow HTML elements within core's own blocks to be styled in `theme.json`. Prior to this change, any `theme.json` rules applying to elements in custom blocks were ignored. With this fix it is now possible to style third-party block elements in `theme.json`.

Props flixos90, azaozz, costdev, glendaviesnz, spacedmonkey, oandregal.
Fixes #57868.


git-svn-id: https://develop.svn.wordpress.org/trunk@56254 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz
2023-07-18 00:00:49 +00:00
parent 2e64ff87b8
commit 2b931da110
3 changed files with 134 additions and 14 deletions

View File

@@ -73,6 +73,13 @@
"my/third-party-block": {
"color": {
"background": "hotpink"
},
"elements": {
"cite": {
"color": {
"text": "white"
}
}
}
}
},