fix regression in mixin scoping

This commit is contained in:
ConnorSkees 2020-06-18 16:54:19 -04:00
parent 962549e31b
commit fe07c3d87e
3 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# 0.9.1
- fix issue in which `@at-root` would panic when placed after a ruleset
- fix regression in which `@at-root` would panic when placed after a ruleset
- fix regression related to `@mixin` scoping and outer, local variables
# 0.9.0

View File

@ -116,6 +116,8 @@ impl<'a> Parser<'a> {
}
.parse()?;
self.scopes.pop();
Ok(body)
}

View File

@ -242,3 +242,8 @@ test!(
"@mixin c {}\n\na {\n @include c()\n}\n",
""
);
test!(
local_variable_declared_before_mixin_is_still_in_scope,
"@mixin foo {}\n\na {\n $a: red;\n @include foo;\n color: $a;\n}\n",
"a {\n color: red;\n}\n"
);