[css-transforms-2] computed values of 'translate', 'rotate', and 'scale'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[css-transforms-2] computed values of 'translate', 'rotate', and 'scale'

L. David Baron
The computed values of the properties in
https://drafts.csswg.org/css-transforms-2/#individual-transforms
seem simpler than they should be.  All three currently say:
  # Computed value:     as specified
(although 'translate' has a second computed value line too!)

However, the prose below contains a number of defaults:

  # Unspecified translations default to 0px.
  ...
  # If the axis is unspecified, it defaults to 0 0 1, causing a "2d
  # rotation" in the plane of the screen.
  ...
  # Unspecified scales default to 1.

I believe these defaults should be considered part of the computed
value.  This will make the computed values of 'scale' more reliably
animatable, by avoiding mismatches in the length of the list.  It
might also avoid other problems.

(Whether they should be serialized is another question.  Didn't we
agree to add a new line to propdef tables about serialization, maybe
called Canonical order?)

-David

--
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [css-transforms-2] computed values of 'translate', 'rotate', and 'scale'

Sebastian Zartner-3
On 24 September 2015 at 10:15, L. David Baron <[hidden email]> wrote:
> Didn't we agree to add a new line to propdef tables about serialization, maybe called Canonical order?

MDN already displays this information. It would be great if that data
would be backed by the specs.

Sebastian