diff --git a/eval.cpp b/eval.cpp index cc7f4c139d..e514eb0529 100644 --- a/eval.cpp +++ b/eval.cpp @@ -793,6 +793,11 @@ namespace Sass { Expression* ex = operator()(var); return evacuate_quotes(interpolation(ex)); + } else if (Parent_Selector* var = dynamic_cast(s)) { + + Expression* ex = operator()(var); + return evacuate_quotes(interpolation(ex)); + } else { To_String to_string(&ctx); diff --git a/expand.cpp b/expand.cpp index 13d2aa17ab..4afa4ac086 100644 --- a/expand.cpp +++ b/expand.cpp @@ -218,12 +218,13 @@ namespace Sass { Statement* Expand::operator()(Assignment* a) { string var(a->variable()); + Selector* p = selector_stack.size() >= 1 ? 0 : selector_stack.back(); if (env->has(var)) { Expression* v = static_cast((*env)[var]); - if (!a->is_guarded() || v->concrete_type() == Expression::NULL_VAL) (*env)[var] = a->value()->perform(eval->with(selector_stack.back(), env, backtrace)); + if (!a->is_guarded() || v->concrete_type() == Expression::NULL_VAL) (*env)[var] = a->value()->perform(eval->with(p, env, backtrace)); } else { - env->current_frame()[var] = a->value()->perform(eval->with(selector_stack.back(), env, backtrace)); + env->current_frame()[var] = a->value()->perform(eval->with(p, env, backtrace)); } return 0; }