- From: Claus Colloseus via GitHub <sysbot+gh@w3.org>
- Date: Wed, 13 May 2020 23:23:28 +0000
- To: public-css-archive@w3.org
ccprog has just created a new issue for https://github.com/w3c/csswg-drafts: == [web-animations-1] Describe property name mappings for XML attributes == While I haven't seen any implementation attempt yet, the whole point of the spec is including [SVG/SMIL animations](https://www.w3.org/TR/SVG11/animate.html) in the common Web Animations API. Therefore, it should be possible to also animate XML attributes, not only CSS properties. One stumbling block for this lies in [section 6.6.2](https://drafts.csswg.org/web-animations-1/#property-name-conversion). It only describes the relation between IDL names and properties in terms of CSSOM algorithms and makes no mention of XML attributes. There should be explicit rules for those, too. It should also be made explicit if the aim is only to provide a model for the SVG namespace, or for XML in general, as the original SMIL spec did. The main conversion algorithm (dash <-> camel case) seems to be applicable, as the example of a [comparable implementation](https://reactjs.org/docs/dom-elements.html#all-supported-html-attributes) by React shows. As for special cases, besides the need to handle the `class` attribute, there is not only a CSS `offset` property, but also a SVG attribute of that name: - for [`<stop>`](https://www.w3.org/TR/SVG2/pservers.html#StopElementOffsetAttribute) in gradients - and for filter effects [transfer functions](https://www.w3.org/TR/filter-effects-1/#element-attrdef-fecomponenttransfer-offset) It would seem a bit unintuitive to call that IDL name `cssOffset`, as the current text seems to imply. `xmlOffset` would be a better choice. Finally, there is the case of `transform`. As CSS Transforms [notes correctly](https://www.w3.org/TR/css-transforms-1/#svg-syntax), the syntax of the SVG attribute differs from that of the CSS property. There must be a way to discern between them (like the SMIL [`attributeType`](https://www.w3.org/TR/SVG11/animate.html#AttributeTypeAttribute) attribute) to avoid parsing errors. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5067 using your GitHub account
Received on Wednesday, 13 May 2020 23:23:30 UTC