\SassContext
SassContext class.
Defines the context that the parser is operating in and so allows variables
to be scoped.
A new context is created for Mixins and imported files.
Synopsis
class SassContext
{
- // members
- public SassContext $parent;
- public array $mixins = ;
- public array $functions = ;
- public array $variables = ;
- public tree $content = ;
- public SassNode $node;
- // methods
- public SassContext __construct()
- public void getContent()
- public SassMixinDefinitionNode addMixin()
- public SassMixinDefinitionNode getMixin()
- public SassFunctionDefinitionNode addFunction()
- public SassFunctionDefinitionNode getFunction()
- public boolean hasFunction()
- public string getVariable()
- public boolean hasVariable()
- public void setVariable()
- public void setVariables()
- public void merge()
Members
public
- $content — tree
- $functions — array
- $mixins — array
- $node — SassNode
- $parent — SassContext
- $variables — array
Methods
public
- __construct() — SassContext constructor.
- addFunction() — Adds a function
- addMixin() — Adds a mixin
- getContent()
- getFunction() — Returns a function
- getMixin() — Returns a mixin
- getVariable() — Returns a variable defined in this context
- hasFunction() — Returns a boolean wether this function exists
- hasVariable() — Returns a value indicating if the variable exists in this context
- merge() — Makes variables and mixins from this context available in the parent context.
- setVariable() — Sets a variable to the given value
- setVariables()