\SassPropertyNode
SassPropertyNode class.
Represents a CSS property.
Synopsis
class SassPropertyNode
extends SassNode
{
- // constants
- const MATCH_PROPERTY_NEW = '/^([^\s=:"]+)\s*(?:(= )|:)([^\:].*?)?$/';
- const MATCH_PROPERTY_OLD = '/^:([^\s=:]+)(?:\s*(=)\s*|\s+|$)(.*)/';
- const MATCH_PSUEDO_SELECTOR = '/^:*\w[-\w]+\(?/i';
- const MATCH_INTERPOLATION = '/^#\{(.*?)\}/i';
- const MATCH_PROPRIETARY_SELECTOR = '/^:?-(moz|webkit|o|ms)-/';
- const NAME = 1;
- const SCRIPT = 2;
- const VALUE = 3;
- const IS_SCRIPT = '= ';
- // members
- public static array $psuedoSelectors = ;
- public $name;
- public $value;
- // Inherited members from SassNode
- public SassNode $parent;
- public SassNode $root;
- public array $children;
- public $token;
- // methods
- public SassPropertyNode __construct()
- public array parse()
- public string render()
- public boolean inNamespace()
- public string getNamespace()
- public string getName()
- public string getValue()
- public static boolean isa()
- public static array match()
- public static bool isPseudoSelector()
- // 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_PROPERTY_NEW | '/^([^\s=:"]+)\s*(?:(= )|:)([^\:].*?)?$/' |
MATCH_PROPERTY_OLD | '/^:([^\s=:]+)(?:\s*(=)\s*|\s+|$)(.*)/' |
MATCH_PSUEDO_SELECTOR | '/^:*\w[-\w]+\(?/i' |
MATCH_INTERPOLATION | '/^#\{(.*?)\}/i' |
MATCH_PROPRIETARY_SELECTOR | '/^:?-(moz|webkit|o|ms)-/' |
NAME | 1 |
SCRIPT | 2 |
VALUE | 3 |
IS_SCRIPT | '= ' |
Members
public
Methods
public
- __construct() — SassPropertyNode constructor.
- getName() — Returns the name of this property.
- getNamespace() — Returns the namespace for this node
- getValue() — Returns the parsed value of this property.
- inNamespace() — Returns a value indicating if this node is in a namespace
- isPseudoSelector() — Returns a value indicating if the string starts with a pseudo selector.
- isa() — Returns a value indicating if the token represents this type of node.
- match() — Returns the matches for this type of node.
- parse() — Parse this node.
- render() — Render this node.
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.