@@ -271,6 +271,13 @@ namespace Sass {
271271 }
272272 }
273273
274+ void expand_list (Node list, Node prefix, Environment& env, map<string, Function>& f_env, Node_Factory& new_Node, Context& ctx) {
275+ for (size_t i = 0 , S = list.size (); i < S; ++i) {
276+ list[i].should_eval () = true ;
277+ list[i] = eval (list[i], prefix, env, f_env, new_Node, ctx);
278+ }
279+ }
280+
274281 // Evaluation function for nodes in a value context.
275282 Node eval (Node expr, Node prefix, Environment& env, map<string, Function>& f_env, Node_Factory& new_Node, Context& ctx, bool function_name)
276283 {
@@ -302,10 +309,6 @@ namespace Sass {
302309 } break ;
303310
304311 case Node::relation: {
305- // Node lhs(eval(expr[0], prefix, env, f_env, new_Node, ctx));
306- // Node op(expr[1]);
307- // Node rhs(eval(expr[2], prefix, env, f_env, new_Node, ctx));
308-
309312 Node lhs (new_Node (Node::arguments, expr[0 ].path (), expr[0 ].line (), 1 ));
310313 Node rhs (new_Node (Node::arguments, expr[2 ].path (), expr[2 ].line (), 1 ));
311314 Node rel (expr[1 ]);
@@ -316,6 +319,8 @@ namespace Sass {
316319 rhs = eval_arguments (rhs, prefix, env, f_env, new_Node, ctx);
317320 lhs = lhs[0 ];
318321 rhs = rhs[0 ];
322+ if (lhs.type () == Node::list) expand_list (lhs, prefix, env, f_env, new_Node, ctx);
323+ if (rhs.type () == Node::list) expand_list (rhs, prefix, env, f_env, new_Node, ctx);
319324
320325 Node T (new_Node (Node::boolean, lhs.path (), lhs.line (), true ));
321326 Node F (new_Node (Node::boolean, lhs.path (), lhs.line (), false ));
0 commit comments