Skip to content
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

Tracking: SVG Filter Support #47302

Open
2 of 8 tasks
ajlende opened this issue Jan 20, 2023 · 0 comments
Open
2 of 8 tasks

Tracking: SVG Filter Support #47302

ajlende opened this issue Jan 20, 2023 · 0 comments
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@ajlende
Copy link
Contributor

ajlende commented Jan 20, 2023

SVG filter support was initially added in the form of Duotone filters in block supports and global styles quite a while ago. The end goal was to enable more creative designs for WordPress websites by leveraging SVG filters. Duotone support was added into core because it isn't too opinionated in design, but the true potential is enabling plugin/theme authors to create their own opinionated filters.

This tracking issue is focusing on issues that are not unique to duotone and would need to be solved for plugin-based SVG filters. Duotone specific issues are tracked in #47304.

Experimental APIs

Bugs

Performance Issues

Theme switching

Extensibility (filter plugins)

Block support plugin hooks

This can more-or-less already be achieved. Duotone was initially implemented this way in Automattic/block-experiments using the following filters.

As the plugin has to define which blocks support should be added too, it's rather difficult to support non-core blocks with this approach.

Global styles plugin hooks

There is currently no way to extend global styles definitions using WP_Theme_JSON, but in #49103 we experimented with rolling our own global styles through block supports. The last missing piece is merging default, theme, and user origins which is still configured in PRESETS_METADATA in WP_Theme_JSON.

Safari Bugs

Safari has many more SVG filer related bugs than other major browsers. These are some to be aware of when working on SVG filters in WordPress.

  • Bug 6022 - SVG Filters do not support source images besides "sourceGraphic" and "sourceAlpha"
  • Bug 99996 - SVG Filter Updates do not trigger repaint
  • Bug 127102 - External SVG filter references don't work as expected
  • Bug 131085 - SVG-filtered anonymous renderers not updated when filter is loaded
  • Bug 184601 - CSS filter property with feColorMatrix on moving elements does not work
  • Bug 211617 - CSS filter property does not work with inlined SVG (data URLs)
  • Bug 258225 - External SVG with filter does not render correctly
@ajlende ajlende added [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
None yet
Development

No branches or pull requests

1 participant