Node class
Base class for all tree nodes
- Implementers
- Anonymous
- Apply
- Assignment
- Attribute
- Call
- Color
- Combinator
- Comment
- Condition
- Declaration
- DetachedRuleset
- Dimension
- DirectiveBase
- Element
- Expression
- Extend
- Import
- JavaScript
- JsEvalNodeMixin
- Keyword
- MixinCall
- MixinDefinition
- NamespaceValue
- Negative
- Nodeset
- Operation
- Options
- Paren
- Property
- Quoted
- Ruleset
- Selector
- UnicodeDescriptor
- Unit
- URL
- Value
- Variable
- VariableCall
- VariableMixin
Constructors
Properties
-
allExtends
↔ List<
Extend> -
For extends visitor process
read / write
- allowRoot ↔ bool
-
The Node type could be used in the root ruleset
read / write
- cleanCss ↔ CleanCssContext
-
Info to optimize the node with cleanCss
read / write
- currentFileInfo ↔ FileInfo
-
get fileInfo from this node or their parent
read / write
- debugInfo ↔ DebugInfo
-
Filename and line coordinates for error debug
read / write
-
elements
↔ List<
Element> -
Selector elements
read / write
- evalFirst ↔ bool
-
DetachedRuleset and MixinDefinition must be evaluated before other nodes
in the Ruleset.eval() funciton
read / write
- evaluated ↔ bool
-
result from bool eval, used in condition
read / write
- id ↔ int
-
hashCode own or inherited for object comparation
read / write
- index ↔ int
-
index from this node or their parent, position in the less file
read / write
- isRuleset ↔ bool
-
True if is a Ruleset or MixinDefinition
read / write
- name → dynamic
-
Node name
read-only
- nodeVisible ↔ bool
-
Only output css code for nodeVisible = true
read / write
-
operands
↔ List<
Node> -
For operation node
read / write
- originalRuleset ↔ Node
-
for Rulesets and mixins process
read / write
- parens ↔ bool
-
The node has been parsed inside parenthesis
()
read / write - parensInOp ↔ bool
-
for expression evaluation
read / write
- parent ↔ Node
-
parent Node, used by index and fileInfo.
read / write
- parsed ↔ bool
-
Some anonymous nodes are lazy parsed
read / write
- rootNode ↔ bool
-
read / write
-
rules
↔ List<
Node> -
The ruleset rules
read / write
-
selectors
↔ List<
Selector> -
The ruleset selectors
read / write
-
treeField
→ Map<
String, dynamic> -
Fields to show with genTree
read-only
- type → String
-
Node generic name == class name
read-only
- value ↔ dynamic
-
the node value
read / write
- visibilityBlocks ↔ int
-
Node visibility control
read / write
- hashCode → int
-
The hash code for this object.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
accept(
VisitorBase visitor) → void -
addVisibilityBlock(
) → void -
blocksVisibility(
) → bool - Returns true if this node represents root of was imported by reference
-
copyVisibilityInfo(
VisibilityInfo info) → void -
This node get the visibility from
info
-
ensureInvisibility(
) → void - Turns off node visibility - if called node will NOT be shown in output regardless of whether it comes from import by reference or not
-
ensureVisibility(
) → void - Turns on node visibility, that is, if called node will be shown in output regardless of whether it comes from import by reference or not
-
eval(
Contexts context) → Node - Default evaluation - returns the node
-
fileInfo(
) → FileInfo - returns fileInfo from this node or their parent
-
fround(
Contexts context, num value, [ int precision ]) → num -
Adjust the precision of
value
according tocontext
.numPrecision. 8 By default. [...] -
genCSS(
Contexts context, Output output) → void -
Writes in
output
the node transformed to CSS. -
genTree(
Contexts env, Output output, [ String prefix = '' ]) → void -
Writes in
output
the tree, for debug -
genTreeField(
Contexts env, Output output, String fieldName, dynamic fieldValue) → void -
Build the subtree for a
fieldName
,fieldValue
-
genTreeTitle(
Contexts env, Output output, String prefix String type String value) → void - Build the node tree title
-
getIndex(
) → int - returns index from this node or their parent
-
isCharset(
) → bool - Directive overrides it
-
isRulesetLike(
) → bool -
isVisible(
) → bool - return values: false - the node must not be visible true - the node must be visible null - the node has the same visibility as its parent
-
removeVisibilityBlock(
) → void -
setParent(
dynamic nodes, Node parent) → void -
Update
parent
property innodes
. [...] -
throwAwayComments(
) → void -
toCSS(
Contexts context) → String - Returns node transformed to css code
-
toTree(
LessOptions options) → StringBuffer - debug print the node tree
-
visibilityInfo(
) → VisibilityInfo -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator.
inherited
Static Methods
-
compareNodes(
Node a Node b) → int -
Compares two nodes
a
andb
[...] -
numericCompare(
num a num b) → int -
numeric comparision between two number
a
andb
[...]