Duotone: User defined filters are ignored if the name matches theme origin filters. #35650
Labels
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Type] Enhancement
A suggestion for improvement.
Description
If a user creates a setting in the
user
origin in theme.json, we override the value in thecore
andtheme
origins.However with duotone filters, the filter SVG itself is created using
value_func
which callsgutenberg_render_duotone_filter_preset
, which hooks the SVG to thewp_footer
action. When a user has the same duotone filter defined in both the theme and user origins, both SVGs are output.Because the theme origin one is output first, the CSS filter users that one, so the user origin one is ignored.
I'm not sure how to solve this. Ideally only one SVG would be output per filter.
To see this in action you can try this PR:
Automattic/themes#4740
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: