@@ -150,12 +150,16 @@ describe('#convert', function () {
150
150
convert ( 'hsl(34, 50%, 50%) hue(25)' , 'rgb(191, 117, 64)' ) ;
151
151
} ) ;
152
152
153
+ it ( 'should set hue with explicit positive' , function ( ) {
154
+ convert ( 'hsl(34, 50%, 50%) hue(+25)' , 'rgb(191, 117, 64)' ) ;
155
+ } ) ;
156
+
153
157
it ( 'should set hue greater than 360' , function ( ) {
154
158
convert ( 'hsl(34, 50%, 50%) hue(385)' , 'rgb(191, 117, 64)' ) ;
155
159
} ) ;
156
160
157
161
it ( 'should set hue less than 360' , function ( ) {
158
- convert ( 'hsl(34, 50%, 50%) hue(-369)' , 'rgb(191, 117, 64)' ) ;
162
+ convert ( 'hsl(34, 50%, 50%) hue(- 369)' , 'rgb(191, 117, 64)' ) ;
159
163
} ) ;
160
164
161
165
it ( 'should add hue' , function ( ) {
@@ -188,7 +192,7 @@ describe('#convert', function () {
188
192
convert ( 'hsl(25, 25%, 50%) saturation(+ 25%)' , 'rgb(191, 117, 64)' ) ;
189
193
} ) ;
190
194
191
- it ( 'should substract saturation' , function ( ) {
195
+ it ( 'should subtract saturation' , function ( ) {
192
196
convert ( 'hsl(25, 60%, 50%) saturation(- 10%)' , 'rgb(191, 117, 64)' ) ;
193
197
} ) ;
194
198
@@ -206,7 +210,7 @@ describe('#convert', function () {
206
210
convert ( 'hsl(25, 50%, 25%) lightness(+ 25%)' , 'rgb(191, 117, 64)' ) ;
207
211
} ) ;
208
212
209
- it ( 'should substract lightness' , function ( ) {
213
+ it ( 'should subtract lightness' , function ( ) {
210
214
convert ( 'hsl(25, 50%, 60%) lightness(- 10%)' , 'rgb(191, 117, 64)' ) ;
211
215
} ) ;
212
216
@@ -220,12 +224,16 @@ describe('#convert', function () {
220
224
convert ( 'hwb(0, 0%, 0%) whiteness(20%)' , 'rgb(255, 51, 51)' ) ; // hwb(0, 20%, 0%)
221
225
} ) ;
222
226
227
+ it ( 'should set whiteness with explicit positive' , function ( ) {
228
+ convert ( 'hwb(0, 0%, 0%) whiteness(+20%)' , 'rgb(255, 51, 51)' ) ; // hwb(0, 20%, 0%)
229
+ } ) ;
230
+
223
231
it ( 'should add whiteness' , function ( ) {
224
- convert ( 'hwb(0, 75%, 0%) whiteness(+25%)' , 'rgb(255, 255, 255)' ) ; // hwb(0, 100%, 0%)
232
+ convert ( 'hwb(0, 75%, 0%) whiteness(+ 25%)' , 'rgb(255, 255, 255)' ) ; // hwb(0, 100%, 0%)
225
233
} ) ;
226
234
227
- it ( 'should substract whiteness' , function ( ) {
228
- convert ( 'hwb(0, 30%, 0%) whiteness(-10%)' , 'rgb(255, 51, 51)' ) ; // hwb(0, 20%, 0%)
235
+ it ( 'should subtract whiteness' , function ( ) {
236
+ convert ( 'hwb(0, 30%, 0%) whiteness(- 10%)' , 'rgb(255, 51, 51)' ) ; // hwb(0, 20%, 0%)
229
237
} ) ;
230
238
231
239
it ( 'should multiply whiteness' , function ( ) {
@@ -238,12 +246,16 @@ describe('#convert', function () {
238
246
convert ( 'hwb(0, 0%, 0%) blackness(20%)' , 'rgb(204, 0, 0)' ) ; // hwb(0, 0%, 20%)
239
247
} ) ;
240
248
249
+ it ( 'should set blackness with explicit positive' , function ( ) {
250
+ convert ( 'hwb(0, 0%, 0%) blackness(+20%)' , 'rgb(204, 0, 0)' ) ; // hwb(0, 0%, 20%)
251
+ } ) ;
252
+
241
253
it ( 'should add blackness' , function ( ) {
242
- convert ( 'hwb(0, 0%, 75%) blackness(+25%)' , 'rgb(0, 0, 0)' ) ; // hwb(0, 0%, 100%)
254
+ convert ( 'hwb(0, 0%, 75%) blackness(+ 25%)' , 'rgb(0, 0, 0)' ) ; // hwb(0, 0%, 100%)
243
255
} ) ;
244
256
245
- it ( 'should substract blackness' , function ( ) {
246
- convert ( 'hwb(0, 0%, 30%) blackness(-10%)' , 'rgb(204, 0, 0)' ) ; // hwb(0, 0%, 20%)
257
+ it ( 'should subtract blackness' , function ( ) {
258
+ convert ( 'hwb(0, 0%, 30%) blackness(- 10%)' , 'rgb(204, 0, 0)' ) ; // hwb(0, 0%, 20%)
247
259
} ) ;
248
260
249
261
it ( 'should multiply blackness' , function ( ) {
@@ -289,7 +301,7 @@ describe('#convert', function () {
289
301
290
302
describe ( 'nested color functions' , function ( ) {
291
303
it ( 'should convert nested color functions' , function ( ) {
292
- convert ( 'color(rebeccapurple a(-10%)) a(-10%)' , 'rgba(102, 51, 153, 0.81)' ) ;
304
+ convert ( 'color(rebeccapurple a(- 10%)) a(- 10%)' , 'rgba(102, 51, 153, 0.81)' ) ;
293
305
convert ( 'color(#4C5859 shade(25%)) blend(color(#4C5859 shade(40%)) 20%)' , 'rgb(55, 63, 64)' ) ;
294
306
} ) ;
295
307
} ) ;
0 commit comments