public function SassRuleNode::render in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/tree/SassRuleNode.php \SassRuleNode::render()
* Render this node and its children to CSS. *
Return value
string the rendered node
File
- phamlp/
sass/ tree/ SassRuleNode.php, line 95
Class
- SassRuleNode
- SassRuleNode class. Represents a CSS rule. @package PHamlP @subpackage Sass.tree
Code
public function render() {
$this
->extend();
$rules = '';
$properties = array();
foreach ($this->children as $child) {
$child->parent = $this;
if ($child instanceof SassRuleNode) {
$rules .= $child
->render();
}
else {
$properties[] = $child
->render();
}
}
// foreach
return $this->renderer
->renderRule($this, $properties, $rules);
}