Skip to content

Commit 78735f7

Browse files
author
Aaron Leung
committed
Merge pull request #373 from wonja/interpolants_in_css_imports
Correctly interpret variable interpolants in @import css statements. Fix...
2 parents 3a52592 + 1d39b78 commit 78735f7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

expand.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,13 @@ namespace Sass {
141141
return 0;
142142
}
143143

144-
Statement* Expand::operator()(Import* i)
144+
Statement* Expand::operator()(Import* imp)
145145
{
146-
return i; // TODO: eval i->urls()
146+
Import* result = new (ctx.mem) Import(imp->path(), imp->position());
147+
for ( size_t i = 0, S = imp->urls().size(); i < S; ++i) {
148+
result->urls().push_back(imp->urls()[i]->perform(eval->with(env, backtrace)));
149+
}
150+
return result;
147151
}
148152

149153
Statement* Expand::operator()(Import_Stub* i)

0 commit comments

Comments
 (0)