@@ -320,8 +320,8 @@ namespace Sass {
320
320
321
321
inline bool special_number (String_Constant_Ptr s) {
322
322
if (s) {
323
- std::string calc (" calc" );
324
- std::string var (" var" );
323
+ std::string calc (" calc( " );
324
+ std::string var (" var( " );
325
325
std::string ss (s->value ());
326
326
return std::equal (calc.begin (), calc.end (), ss.begin ()) ||
327
327
std::equal (var.begin (), var.end (), ss.begin ());
@@ -386,6 +386,17 @@ namespace Sass {
386
386
Signature rgba_2_sig = " rgba($color, $alpha)" ;
387
387
BUILT_IN (rgba_2)
388
388
{
389
+ if (
390
+ special_number (Cast<String_Constant>(env[" $color" ]))
391
+ ) {
392
+ return SASS_MEMORY_NEW (String_Constant, pstate, " rgba("
393
+ + env[" $color" ]->to_string ()
394
+ + " , "
395
+ + env[" $alpha" ]->to_string ()
396
+ + " )"
397
+ );
398
+ }
399
+
389
400
Color_Ptr c_arg = ARG (" $color" , Color);
390
401
391
402
if (
@@ -1738,7 +1749,7 @@ namespace Sass {
1738
1749
1739
1750
Signature unit_sig = " unit($number)" ;
1740
1751
BUILT_IN (unit)
1741
- {
1752
+ {
1742
1753
Number_Obj arg = ARGN (" $number" );
1743
1754
std::string str (quote (arg->unit (), ' "' ));
1744
1755
return SASS_MEMORY_NEW (String_Quoted, pstate, str);
0 commit comments