Skip to content

Commit

Permalink
Don't apply unary operations on colors
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Sep 25, 2016
1 parent a782f52 commit 970aa1e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,13 @@ namespace Sass {
if (operand->concrete_type() == Expression::NULL_VAL && dynamic_cast<Variable*>(u->operand())) {
u->operand(SASS_MEMORY_NEW(ctx.mem, String_Quoted, u->pstate(), ""));
}
else u->operand(operand);
// Never apply unary opertions on colors @see #2140
else if (operand->concrete_type() == Expression::COLOR) {
operand = u->operand();
}
else {
u->operand(operand);
}
String_Constant* result = SASS_MEMORY_NEW(ctx.mem, String_Quoted,
u->pstate(),
u->inspect());
Expand Down

0 comments on commit 970aa1e

Please # to comment.