File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -361,12 +361,16 @@ namespace Sass {
361
361
{
362
362
// CSS3 filter function overload: pass literal through directly
363
363
Number* amount = Cast<Number>(env[" $color" ]);
364
+ double weight = DARG_U_PRCT (" $weight" );
364
365
if (amount) {
366
+ // TODO: does not throw on 100% manually passed as value
367
+ if (weight < 100.0 ) {
368
+ error (" Only one argument may be passed to the plain-CSS invert() function." , pstate, traces);
369
+ }
365
370
return SASS_MEMORY_NEW (String_Quoted, pstate, " invert(" + amount->to_string (ctx.c_options ) + " )" );
366
371
}
367
372
368
373
Color* col = ARG (" $color" , Color);
369
- double weight = DARG_U_PRCT (" $weight" );
370
374
Color_RGBA_Obj inv = col->copyAsRGBA ();
371
375
inv->r (clip (255.0 - inv->r (), 0.0 , 255.0 ));
372
376
inv->g (clip (255.0 - inv->g (), 0.0 , 255.0 ));
You can’t perform that action at this time.
0 commit comments