function lessc::merge in Less CSS Preprocessor 6.3
Same name and namespace in other branches
- 6 lessc.inc.php \lessc::merge()
1 call to lessc::merge()
- lessc::chunk in lessphp/
lessc.inc.php
File
- lessphp/
lessc.inc.php, line 1139
Class
Code
function merge($name, $value) {
// if the current block isn't there then just set
$top =& $this->env[count($this->env) - 1];
if (!isset($top[$name])) {
return $this
->set($name, $value);
}
// copy the block into the old one, including meta data
foreach ($value as $k => $v) {
// todo: merge property values instead of replacing
// have to check type for this
$top[$name][$k] = $v;
}
}