Hwaro::Assets::Sass::Environment
Inherits Reference / Object
Constructors
new(parent : Environment | Nil = nil, flow_control : Bool = false)
SourceInstance methods
assign_var(name : String, value : String, default : Bool, global : Bool) : Nil
Assignment semantics (dart-sass-flavored):
!globalwrites the root scope (skipped by!defaultwhen set).!defaultis a no-op when the name resolves anywhere in scope.- Otherwise the innermost non-root scope already declaring the name is updated; failing that, the name is declared here — which shadows a root/global variable rather than mutating it.
- Exception: when every frame between here and the root is a flow-control scope, a root declaration is assigned, not shadowed (dart-sass flow-control scoping).
declare_function(name : String, closure : SassFn) : Nil
Sourcedeclare_mixin(name : String, closure : MixinClosure) : Nil
Sourcedeclare_module(namespace : String, mod : SassModule) : Bool
Sourceflow_control?
Flow-control scopes (@if/@each/@for/@while bodies) don't shadow
outer variables — they assign through to them, global included
(dart-sass flow-control scoping). That is what makes
@while $i < 4 { $i: $i + 1; } terminate.
functions
Sourcelookup_function(name : String) : SassFn | Nil
Sourcelookup_mixin(name : String) : MixinClosure | Nil
Sourcelookup_var(name : String) : String | Nil
Sourcemixins
Sourcemodule?(namespace : String) : SassModule | Nil
Sourceparent
Sourceroot
Sourceroot?
Sourcevariables
Source