\SassRuleNode
SassRuleNode class.
Represents a CSS rule.
Synopsis
class SassRuleNode
extends SassNode
{
- // constants
- const MATCH = '/^(.+?)(?:\s*\{)?$/';
- const SELECTOR = 1;
- const CONTINUED = ',';
- const PARENT_REFERENCE = '&';
- // members
- private array $selectors = ;
- private array $parentSelectors = ;
- private array $resolvedSelectors = ;
- private $isContinued;
- // Inherited members from SassNode
- public SassNode $parent;
- public SassNode $root;
- public array $children;
- public $token;
- // methods
- public SassRuleNode __construct()
- public void addSelectors()
- public void getIsContinued()
- public array parse()
- public string render()
- public void extend()
- private boolean isPsuedo()
- private boolean isSequence()
- public void isPlaceholder()
- private array mergeSequence()
- public array getSelectors()
- public void resolveSelectors()
- protected array getParentSelectors()
- private mixed parentReferencePos()
- private boolean hasParentReference()
- private string resolveParentReferences()
- private array explode()
- // Inherited methods from SassNode
- public SassNode __construct()
- public mixed __get()
- public SassNode __set()
- public void __clone()
- public array hasParent()
- public array getParent()
- public SassNode addChild()
- public boolean hasChildren()
- public array getChildren()
- public boolean isChildOf()
- public SassNode getLastChild()
- public integer getLevel()
- public string getSource()
- public boolean getDebug_info()
- public string getLine()
- public boolean getLine_numbers()
- public string getFilename()
- public SassParser getParser()
- public string getPropertySyntax()
- public SassScriptParser getScript()
- public SassRenderer getRenderer()
- public string getStyle()
- public void inDirective()
- public void inSassScriptDirective()
- public SassLiteral evaluate()
- public string interpolate()
- public void addWarning()
- public array parseChildren()
- public static boolean isa()
Hierarchy
Extends
Constants
Name | Value |
---|---|
MATCH | '/^(.+?)(?:\s*\{)?$/' |
SELECTOR | 1 |
CONTINUED | ',' |
PARENT_REFERENCE | '&' |
Members
private
- $isContinued — boolean
- $parentSelectors — array
- $resolvedSelectors — array
- $selectors — array
public
Methods
private
- explode() — Explodes a string of selectors into an array.
- hasParentReference() — Determines if there is a parent reference in the selector
- isPsuedo() — Tests whether the selector is a psuedo selector
- isSequence() — Tests whether the selector is a sequence selector
- mergeSequence() — Merges selector sequences
- parentReferencePos() — Returns the position of the first parent reference in the selector.
- resolveParentReferences() — Resolves parent references in the selector
protected
- getParentSelectors() — Returns the parent selector(s) for this node.
public
- __construct() — SassRuleNode constructor.
- addSelectors() — Adds selector(s) to the rule.
- extend() — Extend this nodes selectors $extendee is the subject of the @extend directive $extender is the selector that contains the @extend directive $selector a selector or selector sequence that is to be extended
- getIsContinued() — Returns a value indicating if the selectors for this rule are to be continued.
- getSelectors() — Returns the selectors
- isPlaceholder()
- parse() — Parse this node and its children into static nodes.
- render() — Render this node and its children to CSS.
- resolveSelectors() — Resolves selectors.
Inherited from SassNode
public
- __clone() — Resets children when cloned
- __get() — Getter.
- __set() — Setter.
- addChild() — Adds a child to this node.
- addWarning() — Adds a warning to the node.
- evaluate() — Evaluates a SassScript expression.
- getChildren() — Returns the node's children
- getDebug_info() — Returns the debug_info option setting for this node
- getFilename() — Returns the filename for this node
- getLastChild() — Returns the last child node of this node.
- getLevel() — Returns the level of this node.
- getLine() — Returns the line number for this node
- getLine_numbers() — Returns the line_numbers option setting for this node
- getParent() — Returns the node's parent
- getParser() — Returns the Sass parser.
- getPropertySyntax() — Returns the property syntax being used.
- getRenderer() — Returns the renderer.
- getScript() — Returns the SassScript parser.
- getSource() — Returns the source for this node
- getStyle() — Returns the render style of the document tree.
- hasChildren() — Returns a value indicating if this node has children
- hasParent() — Return a value indicating if this node has a parent
- inDirective() — Returns a value indicating whether this node is in a directive
- inSassScriptDirective() — Returns a value indicating whether this node is in a SassScript directive
- interpolate() — Replace interpolated SassScript contained in '#{}' with the parsed value.
- isChildOf() — Returns a value indicating if this node is a child of the passed node.
- isa() — Returns a value indicating if the token represents this type of node.
- parseChildren() — Parse the children of the node.