-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duotone render in non-fse themes #37954
Conversation
Is there a way to force a repaint in safari (since it seems that fixes the issue according to the link PR) |
It's going to get messy if we do. We'd have to do a user agent check and add a script for each duotone filter to hide and show the filtered content in Safari according to a blog post that I found. |
My main concern with Anyway, my comments shouldn't block you here but as part of the discussion here #37495 I think ultimately enqueue this kind of styles should be consistent. |
@youknowriad, I gave the repaint a go in Safari. It's a little messy, and I sometimes see the images flash, but it seems to work.
It would be nice to have a better system for adding things like this—I keep thinking about other SVG filter opportunities because there's a lot of things that they can do, but it's kind of clunky to add them right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like the best fix I can think of. Thanks
I can't backport this PR as it depends on #36236 which was not backported into 5.9. Ordinarily I would backport both PRs but #36236 contains quite a bit of new PHP code and we are very late into the RC period. I've put the Backport to WP Minor Release on both PRs so that both fixes are included in 5.9.1 which should follow 5.9 very quickly. |
This changeset is a backport for the following Gutenberg PRs: - Fix duotone theme cache: WordPress/gutenberg#36236 - Fix duotone render in non-fse themes gutenberg: WordPress/gutenberg#37954 - Duotone: Allow users to specify custom filters gutenberg: WordPress/gutenberg#38442 Props oandregal, scruffian, Mamaduka. Merges [52757] to the 5.9 branch. See #55179. git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52759 602fd350-edb4-49c9-b593-d223f7449a82
This changeset is a backport for the following Gutenberg PRs: - Fix duotone theme cache: WordPress/gutenberg#36236 - Fix duotone render in non-fse themes gutenberg: WordPress/gutenberg#37954 - Duotone: Allow users to specify custom filters gutenberg: WordPress/gutenberg#38442 Props oandregal, scruffian, Mamaduka. Merges [52757] to the 5.9 branch. See #55179. Built from https://develop.svn.wordpress.org/branches/5.9@52759 git-svn-id: http://core.svn.wordpress.org/branches/5.9@52348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset is a backport for the following Gutenberg PRs: - Fix duotone theme cache: WordPress/gutenberg#36236 - Fix duotone render in non-fse themes gutenberg: WordPress/gutenberg#37954 - Duotone: Allow users to specify custom filters gutenberg: WordPress/gutenberg#38442 Props oandregal, scruffian, Mamaduka. Merges [52757] to the 5.9 branch. See #55179. Built from https://develop.svn.wordpress.org/branches/5.9@52759 git-svn-id: https://core.svn.wordpress.org/branches/5.9@52348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset is a backport for the following Gutenberg PRs: - Fix duotone theme cache: WordPress/gutenberg#36236 - Fix duotone render in non-fse themes gutenberg: WordPress/gutenberg#37954 - Duotone: Allow users to specify custom filters gutenberg: WordPress/gutenberg#38442 Props oandregal, scruffian, Mamaduka. Merges [52757] to the 5.9 branch. See #55179. Built from https://develop.svn.wordpress.org/branches/5.9@52759
This changeset is a backport for the following Gutenberg PRs: - Fix duotone theme cache: WordPress/gutenberg#36236 - Fix duotone render in non-fse themes gutenberg: WordPress/gutenberg#37954 - Duotone: Allow users to specify custom filters gutenberg: WordPress/gutenberg#38442 Props oandregal, scruffian, Mamaduka. Merges [52757] to the 5.9 branch. See #55179. Built from https://develop.svn.wordpress.org/branches/5.9@52759 git-svn-id: http://core.svn.wordpress.org/branches/5.9@52348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Description
Fixes #37598
It seems that the
render_block
filter is being called after thewp_body_open
hook in non-fse themes, so this change will fall back onwp_footer
if it has already been called.We switched from
wp_footer
towp_body_open
in #36754 because Safari renders blocks incorrectly when the SVG filter comes after the content that it is filtering. Switching back unfortunately means that duotone rendering will be incorrect for non-fse themes when viewed from Safari.How has this been tested?
Screenshots
Using the Blank Canvas theme using the one of the default duotone filters applied to the block
Before:
After:
Types of changes
Bug Fix
Checklist:
*.native.js
files for terms that need renaming or removal).