Class | Sass::Environment |
In: |
lib/sass/environment.rb
|
Parent: | Object |
The lexical environment for SassScript. This keeps track of variable and mixin definitions.
A new environment is created for each level of Sass nesting. This allows variables to be lexically scoped. The new environment refers to the environment in the upper scope, so it has access to variables defined in enclosing scopes, but new variables are defined locally.
Environment also keeps track of the {Engine} options so that they can be made available to {Sass::Script::Functions}.
options | [W] | |
parent | [R] |
The enclosing environment, or nil if this is the global environment.
@return [Environment] |
A set of names of mixins currently present in the stack.
@return [Set<String>] The mixin names.
Push a new stack frame onto the mixin/include stack.
@param frame_info [{Symbol => Object}]
Frame information has the following keys: `:filename` : The name of the file in which the lexical scope changed. `:mixin` : The name of the mixin in which the lexical scope changed, or `nil` if it wasn't within in a mixin. `:line` : The line of the file on which the lexical scope changed. Never nil.