Skip to content

[css-typed-om] Add constructor for CSSSkew with CSSAngleValues #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions css-typed-om/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ interface CSSScale : CSSTransformComponent {
readonly attribute double z;
};

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

When a {{CSSRotation}} is constructed with a double (as opposed to a
{{CSSAngleValue}}), the angle is taken to be in degrees.
{{CSSAngleValue}}), the angle is taken to be in degrees. Likewise, when
{{CSSSkew}} is constructed with doubles, both arguments are taken to be angles
in degrees.

<div class=note>
The following two CSSRotations are equivalent:
<pre class='lang-javascript'>
CSSRotation(angle);
CSSRotation(CSSAngleValue(angle, "deg"));
</pre>
Likewise, the following two CSSSkews are equivalent:
<pre class='lang-javascript'>
CSSSkew(ax, ay);
CSSSkew(CSSAngleValue(ax, "deg"), CSSAngleValue(ay, "deg"));
</pre>
</div>

When a {{CSSTransformValue}} is read from a {{StylePropertyMap}}, each
Expand Down