Class: Sass::Tree::ExtendNode
Overview
A static node reprenting an @extend
directive.
Instance Attribute Summary collapse
-
#resolved_selector ⇒ Selector::CommaSequence
The parsed selector after interpolation has been resolved.
-
#selector ⇒ Array<String, Sass::Script::Node>
The CSS selector to extend, interspersed with Script::Nodes representing
#{}
-interpolation.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options
Instance Method Summary collapse
-
#initialize(selector, optional) ⇒ ExtendNode
constructor
A new instance of ExtendNode.
-
#optional? ⇒ Boolean
Whether the
@extend
is allowed to match no selectors or not.
Methods inherited from Node
#<<, #==, #balance, #bubbles?, #deep_copy, #each, #inspect, #invisible?, #style, #to_s, #to_sass, #to_scss
Constructor Details
#initialize(selector, optional) ⇒ ExtendNode
Returns a new instance of ExtendNode.
30 31 32 33 34 |
# File 'lib/sass/tree/extend_node.rb', line 30
def initialize(selector, optional)
@selector = selector
@optional = optional
super()
end
|
Instance Attribute Details
#resolved_selector ⇒ Selector::CommaSequence
The parsed selector after interpolation has been resolved. Only set once Visitors::Perform has been run.
12 13 14 |
# File 'lib/sass/tree/extend_node.rb', line 12
def resolved_selector
@resolved_selector
end
|
#selector ⇒ Array<String, Sass::Script::Node>
The CSS selector to extend, interspersed with Script::Nodes
representing #{}
-interpolation.
18 19 20 |
# File 'lib/sass/tree/extend_node.rb', line 18
def selector
@selector
end
|
Instance Method Details
#optional? ⇒ Boolean
Whether the @extend
is allowed to match no selectors or not.
23 |
# File 'lib/sass/tree/extend_node.rb', line 23
def optional?; @optional; end
|