Skip to content

Commit a07befc

Browse files
committed
[css-typed-om][editorial] Rearrange the color subclasses so each IDL block is followed by its spec text.
1 parent 8682aeb commit a07befc

File tree

1 file changed

+77
-63
lines changed

1 file changed

+77
-63
lines changed

css-typed-om/Overview.bs

+77-63
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,9 @@ interface CSSColorValue : CSSStyleValue {
29612961
and return the result.
29622962
</div>
29632963

2964+
<hr>
29642965

2966+
Issue: TODO add stringifiers
29652967

29662968
<xmp class=idl>
29672969
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
@@ -2972,71 +2974,8 @@ interface CSSRGB : CSSColorValue {
29722974
attribute CSSNumberish b;
29732975
attribute CSSNumberish alpha;
29742976
};
2975-
2976-
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
2977-
interface CSSHSL : CSSColorValue {
2978-
constructor(CSSNumericValue h, CSSNumberish s, CSSNumberish l, optional CSSNumberish alpha = 1);
2979-
attribute CSSNumericValue h;
2980-
attribute CSSNumberish s;
2981-
attribute CSSNumberish l;
2982-
attribute CSSNumberish alpha;
2983-
};
2984-
2985-
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
2986-
interface CSSHWB : CSSColorValue {
2987-
constructor(CSSNumericValue h, CSSNumberish w, CSSNumberish b, optional CSSNumberish alpha = 1);
2988-
attribute CSSNumericValue h;
2989-
attribute CSSNumberish w;
2990-
attribute CSSNumberish b;
2991-
attribute CSSNumberish alpha;
2992-
};
2993-
2994-
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
2995-
interface CSSGray : CSSColorValue {
2996-
constructor(CSSNumberish gray, optional CSSNumberish alpha = 1);
2997-
attribute CSSNumberish gray;
2998-
attribute CSSNumberish alpha;
2999-
};
3000-
3001-
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3002-
interface CSSLCH : CSSColorValue {
3003-
constructor(CSSNumberish l, CSSNumberish c, CSSNumericValue h, optional CSSNumberish alpha = 1);
3004-
attribute CSSNumberish l;
3005-
attribute CSSNumberish c;
3006-
attribute CSSNumericValue h;
3007-
attribute CSSNumberish alpha;
3008-
};
3009-
3010-
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3011-
interface CSSLab : CSSColorValue {
3012-
constructor(CSSNumberish l, CSSNumberish a, CSSNumberish b, optional CSSNumberish alpha = 1);
3013-
attribute CSSNumberish l;
3014-
attribute CSSNumberish a;
3015-
attribute CSSNumberish b;
3016-
attribute CSSNumberish alpha;
3017-
};
3018-
3019-
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3020-
interface CSSColor : CSSColorValue {
3021-
constructor(CSSKeywordish colorspace, sequence<CSSNumberish> channels, optional CSSNumberish alpha = 1);
3022-
attribute CSSKeywordish colorspace;
3023-
attribute CSSPercentishArray channels;
3024-
attribute CSSNumberish alpha;
3025-
};
3026-
3027-
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3028-
interface CSSDeviceCMYK : CSSColorValue {
3029-
constructor(CSSNumberish c, CSSNumberish m, CSSNumberish y, CSSNumberish k, optional CSSNumberish alpha = 1);
3030-
attribute CSSNumberish c;
3031-
attribute CSSNumberish m;
3032-
attribute CSSNumberish y;
3033-
attribute CSSNumberish k;
3034-
attribute CSSNumberish alpha;
3035-
};
30362977
</xmp>
30372978

3038-
Issue: TODO add stringifiers
3039-
30402979
The {{CSSRGB}} class represents the CSS ''rgb()''/''rgba()'' functions.
30412980

30422981
<div algorithm="CSSRGB()">
@@ -3067,6 +3006,17 @@ The {{CSSRGB}} class represents the CSS ''rgb()''/''rgba()'' functions.
30673006
and set the corresponding internal slot to the result of that.
30683007
</div>
30693008

3009+
<xmp class=idl>
3010+
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3011+
interface CSSHSL : CSSColorValue {
3012+
constructor(CSSNumericValue h, CSSNumberish s, CSSNumberish l, optional CSSNumberish alpha = 1);
3013+
attribute CSSNumericValue h;
3014+
attribute CSSNumberish s;
3015+
attribute CSSNumberish l;
3016+
attribute CSSNumberish alpha;
3017+
};
3018+
</xmp>
3019+
30703020
The {{CSSHSL}} class represents the CSS ''hsl()''/''hsla()'' functions.
30713021

30723022
<div algorithm="CSSHSL()">
@@ -3096,6 +3046,17 @@ The {{CSSHSL}} class represents the CSS ''hsl()''/''hsla()'' functions.
30963046
and set the corresponding internal slot to the result of that.
30973047
</div>
30983048

3049+
<xmp class=idl>
3050+
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3051+
interface CSSHWB : CSSColorValue {
3052+
constructor(CSSNumericValue h, CSSNumberish w, CSSNumberish b, optional CSSNumberish alpha = 1);
3053+
attribute CSSNumericValue h;
3054+
attribute CSSNumberish w;
3055+
attribute CSSNumberish b;
3056+
attribute CSSNumberish alpha;
3057+
};
3058+
</xmp>
3059+
30993060
The {{CSSHWB}} class represents the CSS ''hwb()'' function.
31003061

31013062
<div algorithm="CSSHWB()">
@@ -3125,6 +3086,15 @@ The {{CSSHWB}} class represents the CSS ''hwb()'' function.
31253086
and set the corresponding internal slot to the result of that.
31263087
</div>
31273088

3089+
<xmp class=idl>
3090+
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3091+
interface CSSGray : CSSColorValue {
3092+
constructor(CSSNumberish gray, optional CSSNumberish alpha = 1);
3093+
attribute CSSNumberish gray;
3094+
attribute CSSNumberish alpha;
3095+
};
3096+
</xmp>
3097+
31283098
The {{CSSGray}} class represents the CSS ''gray()'' function.
31293099

31303100
<div algorithm="CSSGray()">
@@ -3150,6 +3120,17 @@ The {{CSSGray}} class represents the CSS ''gray()'' function.
31503120
and set the corresponding internal slot to the result of that.
31513121
</div>
31523122

3123+
<xmp class=idl>
3124+
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3125+
interface CSSLCH : CSSColorValue {
3126+
constructor(CSSNumberish l, CSSNumberish c, CSSNumericValue h, optional CSSNumberish alpha = 1);
3127+
attribute CSSNumberish l;
3128+
attribute CSSNumberish c;
3129+
attribute CSSNumericValue h;
3130+
attribute CSSNumberish alpha;
3131+
};
3132+
</xmp>
3133+
31533134
The {{CSSLCH}} class represents the CSS ''lch()'' function.
31543135

31553136
<div algorithm="CSSLCH()">
@@ -3179,6 +3160,17 @@ The {{CSSLCH}} class represents the CSS ''lch()'' function.
31793160
and set the corresponding internal slot to the result of that.
31803161
</div>
31813162

3163+
<xmp class=idl>
3164+
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3165+
interface CSSLab : CSSColorValue {
3166+
constructor(CSSNumberish l, CSSNumberish a, CSSNumberish b, optional CSSNumberish alpha = 1);
3167+
attribute CSSNumberish l;
3168+
attribute CSSNumberish a;
3169+
attribute CSSNumberish b;
3170+
attribute CSSNumberish alpha;
3171+
};
3172+
</xmp>
3173+
31823174
The {{CSSLab}} class represents the CSS ''lab()'' function.
31833175

31843176
<div algorithm="CSSLab()">
@@ -3207,6 +3199,16 @@ The {{CSSLab}} class represents the CSS ''lab()'' function.
32073199
and set the corresponding internal slot to the result of that.
32083200
</div>
32093201

3202+
<xmp class=idl>
3203+
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3204+
interface CSSColor : CSSColorValue {
3205+
constructor(CSSKeywordish colorspace, sequence<CSSNumberish> channels, optional CSSNumberish alpha = 1);
3206+
attribute CSSKeywordish colorspace;
3207+
attribute CSSPercentishArray channels;
3208+
attribute CSSNumberish alpha;
3209+
};
3210+
</xmp>
3211+
32103212
The {{CSSColor}} class represents the CSS ''color()'' function.
32113213

32123214
<div algorithm="CSSColor()">
@@ -3243,6 +3245,18 @@ The {{CSSColor}} class represents the CSS ''color()'' function.
32433245
and set the corresponding internal slot to the result of that.
32443246
</div>
32453247

3248+
<xmp class=idl>
3249+
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
3250+
interface CSSDeviceCMYK : CSSColorValue {
3251+
constructor(CSSNumberish c, CSSNumberish m, CSSNumberish y, CSSNumberish k, optional CSSNumberish alpha = 1);
3252+
attribute CSSNumberish c;
3253+
attribute CSSNumberish m;
3254+
attribute CSSNumberish y;
3255+
attribute CSSNumberish k;
3256+
attribute CSSNumberish alpha;
3257+
};
3258+
</xmp>
3259+
32463260
The {{CSSDeviceCMYK}} class represents the CSS ''device-cmyk()'' function.
32473261

32483262
<div algorithm="CSSDeviceCMYK()">

0 commit comments

Comments
 (0)