Skip to content

Commit b32d458

Browse files
committed
[css-transforms-2] Better specify the computed values of the translate/rotate/scale. Relates to w3c/fxtf-drafts#313
1 parent 2fb82ad commit b32d458

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

css-transforms-2/Overview.bs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -554,36 +554,41 @@ Initial: none
554554
Applies to: <a>transformable elements</a>
555555
Inherited: no
556556
Percentages: relative to the width of the containing block (for the first value) or the height (for the second value)
557-
Computed Value: as specified, with lengths made absolute
558-
Animatable: as <<length>> or <<percentage>> list
557+
Computed Value: the keyword ''translate/none'', or a list of 2 or 3 <<length-percentage>>s, with lengths made absolute
558+
Animatable: as <<length>> or <<percentage>> list, but see below for ''translate/none''
559559
</pre>
560560

561561
The 'translate' property accepts 1-3 values,
562562
each specifying a translation against one axis,
563563
in the order X, Y, then Z.
564-
Unspecified translations default to ''0px''.
565564

566565
If only one or two values are given,
567566
this specifies a 2d translation,
568567
equivalent to the ''translate()'' function.
568+
If the second value is missing,
569+
it defaults to ''0px''.
570+
569571
If three values are given,
570572
this specifies a 3d translation,
571573
equivalent to the ''translate3d()'' function.
572574

573575
<pre class="propdef">
574576
Name: rotate
575-
Value: none | [ x | y | z | <<number>>{3} ]? && <<angle>>
577+
Value: none | <<angle>> | [ x | y | z | <<number>>{3} ] && <<angle>>
576578
Initial: none
577579
Applies to: <a>transformable elements</a>
578580
Inherited: no
579-
Animatable: as SLERP
581+
Computed value: the keyword ''rotate/none'', or else see prose
582+
Animatable: as SLERP, but see below for ''rotate/none''
580583
</pre>
581584

582585
The 'rotate' property accepts an angle to rotate an element,
583586
and optionally an axis to rotate it around.
584587

585588
If the axis is omitted, this specifies a 2d rotation,
586589
equivalent to the ''rotate()'' function.
590+
In this case, the [=computed value=] of the property
591+
is a single <<angle>> value.
587592

588593
Otherwise, it specifies a 3d rotation:
589594
if <dfn value for=rotate>x</dfn>,
@@ -595,6 +600,9 @@ Alternately, the axis can be specified explicitly
595600
by giving three numbers
596601
representing the x, y, and z components of an origin-centered vector,
597602
equivalent to the ''rotate3d()'' function.
603+
In this case, the [=computed value=] of the property
604+
is an <<angle>> and an axis,
605+
the latter consisting of a [=list=] of three <<number>>s.
598606

599607
Note: While ''rotate: 30deg;'' and ''rotate: z 30deg;'' technically specify the same rotation,
600608
the first declaration is a 2d transform equivalent to ''transform: rotate(30deg);'',
@@ -607,7 +615,8 @@ Value: none | <<number>>{1,3}
607615
Initial: none
608616
Applies to: <a>transformable elements</a>
609617
Inherited: no
610-
Animatable: as <<number>> list
618+
Computed value: the keyword ''scale/none'', or a list of 2 or 3 <<number>>s
619+
Animatable: as <<number>> list, but see below for ''scale/none''
611620
</pre>
612621

613622
The 'scale' property accepts 1-3 values,
@@ -633,7 +642,7 @@ which produces no transform at all.
633642
In particular,
634643
this value does <em>not</em> trigger the creation of a stacking context or [=containing block for all descendants=],
635644
while all other values
636-
(including identity transforms like ''translate: 0px'')
645+
(including identity transforms like ''translate: 0px'')
637646
create a stacking context and [=containing block for all descendants=],
638647
per usual for transforms.
639648

0 commit comments

Comments
 (0)