Fix duotone rendering in site editor#37727
Conversation
|
Size Change: +444 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
|
@oandregal sorry it took me a while to get this up—it took me some time to understand how everything is wired up in the site editor. Because I don't feel hugely confident in how it all works, please read through it all thoroughly. Adding |
6bb1192 to
59ad6d2
Compare
6bef650 to
e386f95
Compare
e386f95 to
a493443
Compare
|
I have a user case using Twenty Twenty-two Swiss theme, where the images appeared colored in the site editor, but black and white on the live page. |
937973a to
a86ce38
Compare
|
@gwwar I'm not seeing any WSOD in my testing. I'm running wordpress-develop trunk and this branch after rebasing with gutenberg trunk. Maybe give it another try now? |
|
As a quick follow up note for other reviewers, the WSOD is visible when testing in Chrome but not FF. |
This reverts commit a493443.
This reverts commit b5a9098cf43d7927a4367eb201bd844a88a2dc0c.
eb446bd to
d75b3a5
Compare
|
🔥 👏 |
Co-authored-by: Alex Lende <ajlende@gmail.com> Co-authored-by: Ben Dwyer <ben@scruffian.com> Co-authored-by: André <583546+oandregal@users.noreply.github.com>
|
This was backported to wp/6.0 branch to be included in WordPress 6.0 Beta 3 tomorrow: |

Description
Fix the site editor part of #35331
For duotone to work on the site editor we need to port the same changes introduced in the server at #34667.
How has this been tested?
styles.blocks['core/image'].filter.duotoneasvar(--wp--preset--duotone--blue-red)or a theme's duotone preset variable.Screenshots
Using TwentyTwentyTwo with the following added to theme.json:
{ "styles": { "blocks": { "core/image": { "filter": { "duotone": "var(--wp--preset--duotone--foreground-and-secondary)" } } } } }Before:
After:
Types of changes
Bug fix
Checklist:
*.native.jsfiles for terms that need renaming or removal).