You are here

public function SassContext::merge in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/tree/SassContext.php \SassContext::merge()

Makes variables and mixins from this context available in the parent context. Note that if there are variables or mixins with the same name in the two contexts they will be set to that defined in this context.

File

phpsass/tree/SassContext.php, line 168

Class

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. @package PHamlP @subpackage Sass.tree

Code

public function merge() {
  $this->parent->variables = array_merge($this->parent->variables, $this->variables);
  $this->parent->mixins = array_merge($this->parent->mixins, $this->mixins);
}