W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

Re: [csswg-drafts] [css-transforms-2] Is it necessary to serialize all 3 parameters of translate given the 3rd component is 0px (#3305)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Tue, 08 Oct 2019 20:38:54 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-539694490-1570567133-sysbot+gh@w3.org>
Bug or not (it at least partially is), it's been part of WK/Chrome's transform implementation since it first shipped, and the web depends on that behavior as a "promote to a layer" perf hack. (It also has implications on text anti-aliasing, iirc.)  We don't simplify `translate3d()` into a `translate()` if it has a 0 z argument, or vice versa.

The distinction is even maintained in TypedOM, which distinguishes between an unpassed `z` argument to CSSTranslate and a passed `0` value, and similar for the other 2d-and-3d constructors: <https://drafts.css-houdini.org/css-typed-om/#dom-csstranslate-csstranslate>

So far, I've carefully kept the various transform things consistent in this quirk, and I'd like to maintain that. I don't think we should drop it from some syntax forms and not others, because that makes it confusing to predict which behavior you're going to get in WK/Chrome browsers.

If we want to remove it, I'd like to remove it from *all* transform syntaxes.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3305#issuecomment-539694490 using your GitHub account
Received on Tuesday, 8 October 2019 20:38:55 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:54 UTC