- From: Karl Dubost via GitHub <noreply@w3.org>
- Date: Tue, 20 Jan 2026 06:44:43 +0000
- To: public-svg-issues@w3.org
karlcow has just labeled an issue for https://github.com/w3c/svgwg as "Agenda+":
== SVGAnimatedLength initial value for `fx` and `fy` ==
While looking into following WPT:
WPT Test Case: https://wpt.fyi/results/svg/types/scripted/SVGAnimatedLength-initial-values.html?label=master&label=experimental&aligned&q=initial
WPT Test Case (Source Code): https://github.com/web-platform-tests/wpt/blob/17ed18c17a/svg/types/scripted/SVGAnimatedLength-initial-values.html
^ It seems the following assumes that the default value for `fx` and `fy` is 50%.
```
{ interface: 'SVGRadialGradientElement', attributes: [ 'cx', 'cy', 'r', 'fx', 'fy', 'fr' ],
cx: { initial: '50%' }, cy: { initial: '50%' }, r: { initial: '50%' },
fx: { initial: '50%' }, fy: { initial: '50%' }, fr: { initial: '0%' } },
```
But if I read the specification:
https://svgwg.org/svg2-draft/pservers.html#RadialGradientElementFXAttribute
```
initial value - see below
```
Which tells:
If attribute ‘[fx](https://svgwg.org/svg2-draft/pservers.html#RadialGradientElementFXAttribute)’ is not specified, ‘[fx](https://svgwg.org/svg2-draft/pservers.html#RadialGradientElementFXAttribute)’ will coincide with the presentational value of ‘[cx](https://svgwg.org/svg2-draft/pservers.html#RadialGradientElementCXAttribute)’ for the element whether the value for 'cx' was inherited or not. If the element references an element that specifies a value for 'fx', then the value of 'fx' is inherited from the referenced element.
similarly for `fy`: https://svgwg.org/svg2-draft/pservers.html#RadialGradientElementFYAttribute
____
If I am interpretating it right - if `fx` value is missing or invalid then we should fallback to value of `cx` and `cy` and if even those are missing then we should fallback to `50%` (which is initial value of `cx` and `cy`).
Is my understanding correct? Should we clarify this in specification?
Just wanted to get clarification.
Thanks!
See https://github.com/w3c/svgwg/issues/1054
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 20 January 2026 06:44:43 UTC