Open ccprog opened 4 months ago
See https://bugzilla.mozilla.org/show_bug.cgi?id=866655 It may well be too late to change now given the number of interoperable implementations and the likelihood of content that depends on that.
The pattern spec contains the explicit sentence for the case patternUnits="userSpaceOnUse"
Percentages represent values relative to the current SVG viewport.
For filters, a comparable sentence is missing.
patterns, filters and clipPaths should work the same though.
Consider a SVG
<filter>
element with the following attributes:It would be expanded according to the initial values defined in § 8 to
§ 7 defines the unit of the
x, y, width, height
values as <length-percentage> as defined in CSS Values and Units Level 4.This spec notes about percentages:
Such a reference is missing. The text currently only says
Current browser implementations seem to have filled the gap by falling back to the following rule in the SVG 1.1 spec:
To me that seems to be a bit arbitrary, since there is no mention of "the size of the viewport" in the context of filter units. Also, this fallback is no longer applicable from the CSS Filter Effects module.
And finally, if the viewport is used as reference, it can have unexpected results.