Skip to content

Commit

Permalink
Merge pull request #769 from xzyfer/fix/dont-output-empty-declarations
Browse files Browse the repository at this point in the history
Don't output empty blocks
  • Loading branch information
xzyfer committed Dec 26, 2014
2 parents d8c08c6 + 3ed6e43 commit a912969
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion expand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,14 @@ namespace Sass {
{
String* old_p = d->property();
String* new_p = static_cast<String*>(old_p->perform(eval->with(env, backtrace)));
Expression* value = d->value()->perform(eval->with(env, backtrace));

if (value->is_invisible() && !d->is_important()) return 0;

return new (ctx.mem) Declaration(d->path(),
d->position(),
new_p,
d->value()->perform(eval->with(env, backtrace)),
value,
d->is_important());
}

Expand Down

0 comments on commit a912969

Please sign in to comment.