Skip to content

Commit 58f0b0f

Browse files
authored
Merge pull request w3c#270 from rjwright/SkewAngles
[css-typed-om] Add constructor for CSSSkew with CSSAngleValues
2 parents ef2cc61 + 71c1481 commit 58f0b0f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

css-typed-om/Overview.bs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ interface CSSScale : CSSTransformComponent {
478478
readonly attribute double z;
479479
};
480480

481-
[Constructor(double ax, double ay)]
481+
[Constructor(double dx, double dy),
482+
Constructor(CSSAngleValue ax, CSSAngleValue ay)]
482483
interface CSSSkew : CSSTransformComponent {
483484
readonly attribute double ax;
484485
readonly attribute double ay;
@@ -518,14 +519,21 @@ and y & z values of 0 could be:
518519
</div>
519520

520521
When a {{CSSRotation}} is constructed with a double (as opposed to a
521-
{{CSSAngleValue}}), the angle is taken to be in degrees.
522+
{{CSSAngleValue}}), the angle is taken to be in degrees. Likewise, when
523+
{{CSSSkew}} is constructed with doubles, both arguments are taken to be angles
524+
in degrees.
522525

523526
<div class=note>
524527
The following two CSSRotations are equivalent:
525528
<pre class='lang-javascript'>
526529
CSSRotation(angle);
527530
CSSRotation(CSSAngleValue(angle, "deg"));
528531
</pre>
532+
Likewise, the following two CSSSkews are equivalent:
533+
<pre class='lang-javascript'>
534+
CSSSkew(ax, ay);
535+
CSSSkew(CSSAngleValue(ax, "deg"), CSSAngleValue(ay, "deg"));
536+
</pre>
529537
</div>
530538

531539
When a {{CSSTransformValue}} is read from a {{StylePropertyMap}}, each

0 commit comments

Comments
 (0)