Skip to content

[filter-effects-1] Should mix-blend-mode or filter apply to non-renderable SVG containers? #309

Open
@progers

Description

Filters apply to: All elements. In SVG, it applies to container elements without the defs element, all graphics elements and the use element.
https://drafts.fxtf.org/filter-effects/#FilterProperty

Mix-blend-mode applies to: All elements. In SVG, it applies to container elements, graphics elements and graphics referencing elements.
https://drafts.fxtf.org/compositing-1/#mix-blend-mode

SVG container elements are: ‘a’, ‘clipPath’, ‘defs’, ‘g’, ‘marker’, ‘mask’, ‘pattern’, ‘svg’, ‘switch’, ‘symbol’ and ‘unknown’.
https://svgwg.org/svg2-draft/single-page.html#struct-TermContainerElement

Some of these container elements are not rendered (see: https://svgwg.org/svg2-draft/single-page.html#render-TermNeverRenderedElement). For example, <pattern>. I think it makes sense to restrict filter and mix-blend-mode to renderable elements (see: https://svgwg.org/svg2-draft/single-page.html#render-TermRenderableElement).

Firefox, Chromium, Edge, and Safari do not support these properties on <pattern>:
https://output.jsbin.com/gumusuq/2/quiet

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions