Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@at-root scoping #2273

Closed
meefox opened this issue Apr 14, 2017 · 1 comment
Closed

@at-root scoping #2273

meefox opened this issue Apr 14, 2017 · 1 comment

Comments

@meefox
Copy link

meefox commented Apr 14, 2017

When you define functions in mixin.scss and wrapped it by @at-root rule.
Like:

@at-root {
  	@import 'mixin.scss';
}

// functions from mixin.scss will not be available here

Is it right behavior?

@nex3
Copy link
Contributor

nex3 commented May 18, 2017

Being able to write an @import within an @at-root is pretty weird, but otherwise this is intended. Mixins and functions are lexically scoped: they're only visible within the enclosing brackets. This is as true for @at-root as it is for any other construct.

@nex3 nex3 closed this as completed May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants