# first.items[].content
Length values in a filter (dx, dy, stdDeviation) are either all in px or relative to box dimensions (if primitiveUnits='objectBoundingBox')

https://drafts.fxtf.org/filter-effects/#element-attrdef-filter-filterunits

This is something I find massively problematic - #SVG got left behind. https://mastodon.social/@anatudor/1115 96456117533541

While #CSS #filter functions like `drop-shadow()` allow us to specify the offsets and/ or standard deviation using font-relative units, SVG filters don't.

#svgFilter #code #coding #frontend #gotcha #web #dev #webDev #webDevelopment

# first.items[].contentMap.en
Length values in a filter (dx, dy, stdDeviation) are either all in px or relative to box dimensions (if primitiveUnits='objectBoundingBox')

https://drafts.fxtf.org/filter-effects/#element-attrdef-filter-filterunits

This is something I find massively problematic - #SVG got left behind. https://mastodon.social/@anatudor/1115 96456117533541

While #CSS #filter functions like `drop-shadow()` allow us to specify the offsets and/ or standard deviation using font-relative units, SVG filters don't.

#svgFilter #code #coding #frontend #gotcha #web #dev #webDev #webDevelopment

# first.items[].attachment[].name
Screenshot of the inset shadow SVG filter code, highlighting the length attributes of the filter primitives.

# first.items[].attachment[].name
From the spec:

primitiveUnits = "userSpaceOnUse | objectBoundingBox"
Specifies the coordinate system for the various length values within the filter primitives and for the attributes that define the filter primitive subregion.

If primitiveUnits is equal to userSpaceOnUse, any length values within the filter definitions represent values in the current local 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).

If primitiveUnits is equal to objectBoundingBox, then any length values within the filter definitions represent fractions or percentages of the bounding box on the referencing element (see object bounding box units). Note that if only one number was specified in a <number-optional-number> value this number is expanded out before the primitiveUnits computation takes place.

The initial value for primitiveUnits is userSpaceOnUse.