Get the style that this style inherits from, if any.
This walks down the declared styles of the parent's inheritance chain, and attempts to find a matching directly declared style on each.
The result is cached because it never changes and is decidable as soon as the style is instantiated.
The block
property is an alias for root
. This isn't the dryest place to put
this line, but every extension re-declared this interface itself and I wanted it
in one place.
The base node in this tree.
This Attribute's parent BlockClass
If this Attribute contains anything but the "presence" AttrValue.
If this Attribute only contains the "presence" AttrValue.
The parent node in this tree.
The "presence" Value, or undefined
.
The root node in this tree.
The token object used to create this node.
The unique name of this node.
Return array self and all children.
Array of Styles.
Retrieve this Attribute's selector as it appears in the Block source code.
Optional scope to resolve this name relative to. If true
, return the Block name instead of :scope
. If a Block object, return with the local name instead of :scope
.
The Attribute's attribute selector.
Emit analysis attributes for the AttrValue
s this
Attribute
represents in their authored source format.
Returns an array of all children nodes in the order they were added for Self.
The children array.
Returns a hash of all children nodes at the keys they are stored.. TODO: Cache this maybe? Convert entire model to only use hash?...
The children hash.
Returns a map of all children nodes at the keys they are stored..
The children map.
Export as new class name.
Option hash configuring output mode.
String representing output class.
Ensure a child node exists on this object at key
. If it does not, create it.
If key
is not provided, use the child name as the key.
string The key at which this child object should be (optional)
The child node.
Ensures that a AttrValue of name name
exists in this Attribute. If no
AttrValue
exists, one is created. If no name is passed, it ensures the
"presence" AttrValue.
string The AttrValue
name to ensure.
The AttrValue
Retrieve a child node from this object at key
.
The child node.
Every Block tree maintains its own local cache of parsed selectors. From any sub-inheritable, or from the root inheritable itself, given a PostCSS Rule, ensure it is present in the root Block's parsed rule selectors cache, and return the ParsedSelector array.
PostCSS Rule
ParsedSelector array
Get am Attribute's own (read: non-inherited) AttrValue
of name
name
from this Attribute
. If no name is passed, it tries
to retrieve the "presence" AttrValue.
string The name of the AttrValue
to retrieve.
The AttrValue
or undefined
.
whether this Attribute has any Values defined, directly or inherited.
The new child object's Token
identifier.
The new child object created from token
Resolves the child with the given name from this node's inheritance chain. Returns null if the child is not found.
The child node, or null
Returns an array of all children nodes in the order they were added for self and all inherited children.
The children array.
Returns a map of all children nodes at the keys they are stored..
The children map.
Returns a map of all children nodes at the keys they are stored..
The children map.
Compute all block objects that are implied by this block object through inheritance. Does not include this object or the styles it implies through other relationships to this object.
The values are returned in inheritance order, with the first value returned (if any) having no base, and the the last value returned (if any) being the base of this object.
If nothing is inherited, this returns an empty array.
The array of nodes this node inherits from.
Get am Attribute's own or inherited AttrValue
of name name
from this
Attribute
or its base. If no name is passed, it tries to retrieve
the "presence" AttrValue.
string The name of the AttrValue
to retrieve.
The AttrValue
or undefined
.
Resolves all AttrValues from this Attribute's inheritance chain.
All AttrValues this Attribute contains.
An array of all AttrValue
s contained in this Attribute
.
A hash of all Value
s contained in this Attribute
.
An Map of all Value
s contained in this Attribute
.
Generated using TypeDoc