@@ -205,16 +205,24 @@ test('Increase the saturation of a color in the HSL color space by an absolute a
205205 saturate: saturate(hsl(90, 80%, 50%), 20%);
206206 saturate: saturate(@color, 20%);
207207 saturate: saturate(@color, @p);
208+
209+ saturatea: saturate(hsla(90, 80%, 50%, 0.5), 20%);
210+ saturatea: saturate(@colora, 20%);
211+ saturatea: saturate(@colora, @p);
208212 ` ;
209- expect ( renderer . create ( < Div color = "hsl(90, 80%, 50%)" p = "20%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
213+ expect ( renderer . create ( < Div color = "hsl(90, 80%, 50%)" colora = "hsla(90, 80%, 50%, 0.5)" p = "20%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
210214} ) ;
211215test ( 'Decrease the saturation of a color in the HSL color space by an absolute amount.' , ( ) => {
212216 const Div = styled . div `
213217 desaturate: desaturate(hsl(90, 80%, 50%), 20%);
214218 desaturate: desaturate(@color, 20%);
215219 desaturate: desaturate(@color, @p);
220+
221+ desaturatea: desaturate(hsla(90, 80%, 50%, 0.5), 20%);
222+ desaturatea: desaturate(@colora, 20%);
223+ desaturatea: desaturate(@colora, @p);
216224 ` ;
217- expect ( renderer . create ( < Div color = "hsl(90, 80%, 50%)" p = "20%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
225+ expect ( renderer . create ( < Div color = "hsl(90, 80%, 50%)" colora = "hsla(90, 80%, 50%, 0.5)" p = "20%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
218226} ) ;
219227
220228
@@ -223,16 +231,24 @@ test('Increase the lightness of a color in the HSL color space by an absolute am
223231 lighten: lighten(hsl(90, 80%, 50%), 20%);
224232 lighten: lighten(@color, 20%);
225233 lighten: lighten(@color, @p);
234+
235+ lightena: lighten(hsla(90, 80%, 50%, 0.5), 20%);
236+ lightena: lighten(@colora, 20%);
237+ lightena: lighten(@colora, @p);
226238 ` ;
227- expect ( renderer . create ( < Div color = "hsl(90, 80%, 50%)" p = "20%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
239+ expect ( renderer . create ( < Div color = "hsl(90, 80%, 50%)" colora = "hsla(90, 80%, 50%, 0.5)" p = "20%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
228240} ) ;
229241test ( 'Decrease the lightness of a color in the HSL color space by an absolute amount.' , ( ) => {
230242 const Div = styled . div `
231243 darken: darken(hsl(90, 80%, 50%), 20%);
232244 darken: darken(@color, 20%);
233245 darken: darken(@color, @p);
246+
247+ darkena: darken(hsla(90, 80%, 50%, 0.5), 20%);
248+ darkena: darken(@colora, 20%);
249+ darkena: darken(@colora, @p);
234250 ` ;
235- expect ( renderer . create ( < Div color = "hsl(90, 80%, 50%)" p = "20%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
251+ expect ( renderer . create ( < Div color = "hsl(90, 80%, 50%)" colora = "hsla(90, 80%, 50%, 0.5)" p = "20%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
236252} ) ;
237253
238254
@@ -293,8 +309,12 @@ test('Rotate the hue angle of a color in either direction.', () => {
293309 spin: spin(@color, @v);
294310
295311 spin: spin(@color, @zero);
312+
313+ spina: spin(hsla(10, 90%, 50%, 0.5), @v2);
314+ spina: spin(hsla(10, 90%, 50%, 0.5), -@v2);
315+ spina: spin(@colora, @v);
296316 ` ;
297- expect ( renderer . create ( < Div color = "hsl(10, 90%, 50%)" v = "30" v2 = "30%" zero = { 0 } /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
317+ expect ( renderer . create ( < Div color = "hsl(10, 90%, 50%)" colora = "hsla(10, 90%, 50%, 0.5)" v = "30" v2 = "30%" zero = { 0 } /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
298318} ) ;
299319
300320
@@ -303,8 +323,12 @@ test('Mix two colors together in variable proportion. Opacity is included in the
303323 mix: mix(#ff0000, #0000ff, 50%);
304324 mix: mix(@a, @b, @p);
305325 mix: mix(rgba(100, 0, 0, 1.0), rgba(0, 100, 0, 1.0));
326+
327+ mixa: mix(#ff000080, #0000ff80, 50%);
328+ mixa: mix(@aa, @ba, @p);
329+ mixa: mix(rgba(100, 0, 0, 0.5), rgba(0, 100, 0, 0.5));
306330 ` ;
307- expect ( renderer . create ( < Div a = "#ff0000" b = "#0000ff" p = "50%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
331+ expect ( renderer . create ( < Div a = "#ff0000" b = "#0000ff" aa = "#ff000080" ba = "#0000ff80" p = "50%" /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
308332} ) ;
309333test ( 'Mix color with white in variable proportion.' , ( ) => {
310334 const Div = styled . div `
0 commit comments