Re: [csswg-drafts] [css-transforms-1] Browsers do not implement transform attribute syntax as described by w3c

Here a more detailed test: https://codepen.io/krit/pen/rvdOQX

It confirms that **all** browsers support `number comma-wsp? number` for all transform functions with more than one number value on the `transform` attribute.

However, there are a couple of items from SVG 1.1 that are not supported by all browsers. According to SVG 1.1 the following is valid:
* `translate(1. 1.)` only supported by Edge and not compatible to CSS
* `translate(1 1) ,,, translate(1 1)` only supported by Firefox and not compatible to CSS

The error handling is not consistent across browsers either.
`translate(1 1) error translate(1 1)`
* Edge applies the first transform function but nothing after a syntax error.
* All other browsers ignore the entire transform.

Edge probably tries to follow [SVG 1.1 Error processing](https://www.w3.org/TR/SVG/implnote.html#ErrorProcessing):
> When an element has an attribute or property value which is not permissible according to this specification

* **No browser** supports new CSS Transform functions on the `transform` attribute
* **No browser** supports units for `<length>` or `<angle>` values on the `transform` attribute.

As much as I liked to have the property and attribute to get aligned: I'd suggest that we follow one of @AmeliaBR's proposals in https://github.com/w3c/csswg-drafts/issues/2623#issuecomment-385208372 and leave the `transform` attribute as a legacy feature. At the same time, we align the specification to the implementation behavior of browsers. There would still be open questions where browsers do not align:
* `digital-sequence "."` as defined by SVG 1.1 - _suggest to follow SVG 1.1_
* `transform comma-wsp+ transforms` as defined by SVG 1.1 - _suggest to follow SVG 1.1_
* Error handling on syntax errors. - _suggest to ignore the `transform` attribute on syntax errors_

-- 
GitHub Notification of comment by dirkschulze
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2623#issuecomment-388005994 using your GitHub account

Received on Thursday, 10 May 2018 09:41:51 UTC