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 8cd9434 commit 9dc9a89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/eval.cpp
Original file line number Diff line number Diff line change
@@ -759,7 +759,10 @@ 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) {
u->operand(operand);
}
String_Constant* result = SASS_MEMORY_NEW(ctx.mem, String_Quoted,
u->pstate(),
u->inspect());

0 comments on commit 9dc9a89

Please sign in to comment.