You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Percentage values are always relative to another quantity, for example a length. Each property that allows percentages also defines the quantity to which the percentage refers.
Such a reference is missing. The text currently only says
If filterUnits is equal to userSpaceOnUse, x, y, width, height represent values in the current user coordinate system in place at the time when the filter element is referenced (i.e., the user coordinate system for the element referencing the filter element via a filter property).
Current browser implementations seem to have filled the gap by falling back to the following rule in the SVG 1.1 spec:
For percentage values that are defined to be relative to the size of viewport:
For any x-coordinate value or width value expressed as a percentage of the viewport, the value to use is the specified percentage of the actual-width in user units for the nearest containing viewport, where actual-width is the width dimension of the viewport element within the user coordinate system for the viewport element.
For any y-coordinate value or height value expressed as a percentage of the viewport, the value to use is the specified percentage of the actual-height in user units for the nearest containing viewport, where actual-height is the height dimension of the viewport element within the user coordinate system for the viewport element.
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: