Skip to content
Closed
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
22 changes: 22 additions & 0 deletions css-typed-om/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,28 @@ interface CSSAngleValue : CSSStyleValue {
CSSAngleValue provides attributes that reflect the size of the angle in each of the
CSS angle units represented by the {{CSSAngleUnit}} enum.

{{CSSColorValue}} objects {#colorvalue-objects}
---------------------------------------------
<pre class='idl'>

[Constructor(double r, double g, double b),
Constructor(double r, double g, double b, double a)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether we should allow constructing ColorValue with supported color keywords. Or is there any existing function to do so?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shans would have a better answer to that?

interface CSSColorValue : CSSStyleValue{
readonly attribute double r;
readonly attribute double g;
readonly attribute double b;
readonly attribute double a;
};

</pre>

{{CSSColorValue}} objects represent values of the 'color' CSS data type. {{CSSColorValue}}s are
initialised using the RGB cubic-coordinate system, which specifies a red, green and blue
component. These are specified as doubleegers between 0 and 255. An alpha component may also be
specified in the constructor as a double between 0 and 1.

Issue: Do we want to support other color systems, e.g. HSL?


{{CSSTransformValue}} objects {#transformvalue-objects}
-----------------------------------------------------------
Expand Down