Class: Sass::Tree::ExtendNode
Overview
A static node representing an @extend
directive.
Instance Attribute Summary collapse
-
#resolved_selector ⇒ Selector::CommaSequence
The parsed selector after interpolation has been resolved.
-
#selector ⇒ Array<String, Sass::Script::Tree::Node>
The CSS selector to extend, interspersed with Script::Tree::Nodes representing
#{}
-interpolation. -
#selector_source_range ⇒ Sass::Source::Range
The extended selector source range.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options, #source_range
Instance Method Summary collapse
-
#initialize(selector, optional, selector_source_range) ⇒ 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?, #css, #css_with_sourcemap, #deep_copy, #each, #inspect, #invisible?, #style, #to_sass, #to_scss
Constructor Details
#initialize(selector, optional, selector_source_range) ⇒ ExtendNode
Returns a new instance of ExtendNode.
36 37 38 39 40 41 |
# File 'lib/sass/tree/extend_node.rb', line 36
def initialize(selector, optional, selector_source_range)
@selector = selector
@optional = optional
@selector_source_range = selector_source_range
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::Tree::Node>
The CSS selector to extend, interspersed with Script::Tree::Nodes
representing #{}
-interpolation.
18 19 20 |
# File 'lib/sass/tree/extend_node.rb', line 18
def selector
@selector
end
|
#selector_source_range ⇒ Sass::Source::Range
The extended selector source range.
23 24 25 |
# File 'lib/sass/tree/extend_node.rb', line 23
def selector_source_range
@selector_source_range
end
|
Instance Method Details
#optional? ⇒ Boolean
Whether the @extend
is allowed to match no selectors or not.
28 |
# File 'lib/sass/tree/extend_node.rb', line 28
def optional?; @optional; end
|