protected function SassRuleNode::getParentSelectors in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/tree/SassRuleNode.php \SassRuleNode::getParentSelectors()
Returns the parent selector(s) for this node. This in an empty array if there is no parent selector.
Return value
array the parent selector for this node
2 calls to SassRuleNode::getParentSelectors()
- SassRuleNode::resolveParentReferences in phpsass/
tree/ SassRuleNode.php - Resolves parent references in the selector
- SassRuleNode::resolveSelectors in phpsass/
tree/ SassRuleNode.php - Resolves selectors. Interpolates SassScript in selectors and resolves any parent references or appends the parent selectors.
File
- phpsass/
tree/ SassRuleNode.php, line 240
Class
- SassRuleNode
- SassRuleNode class. Represents a CSS rule. @package PHamlP @subpackage Sass.tree
Code
protected function getParentSelectors($context) {
$ancestor = $this->parent;
while (!$ancestor instanceof SassRuleNode && $ancestor
->hasParent()) {
$ancestor = $ancestor->parent;
}
if ($ancestor instanceof SassRuleNode) {
return $ancestor
->resolveSelectors($context);
}
return array();
}