Class: Sass::Tree::ExtendNode
- Inherits:
- Node
- Object
- Node
- Sass::Tree::ExtendNode
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/extend_node.rb
Overview
A static node representing an @extend
directive.
Instance Attribute Summary (collapse)
- - (Selector::CommaSequence) resolved_selector
The parsed selector after interpolation has been resolved.
- - (Array<String, Sass::Script::Tree::Node>) selector
The CSS selector to extend, interspersed with Script::Tree::Nodes representing
#{}
-interpolation. - - (Sass::Source::Range) selector_source_range
The extended selector source range.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options, #source_range
Instance Method Summary (collapse)
- - (ExtendNode) initialize(selector, optional, selector_source_range) constructor
A new instance of ExtendNode.
- - (Boolean) optional?
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
- (ExtendNode) initialize(selector, optional, selector_source_range)
Returns a new instance of ExtendNode
36 37 38 39 40 41 | # File '/Users/ceppstei/Projects/sass-lang/.sass/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
- (Selector::CommaSequence) resolved_selector
The parsed selector after interpolation has been resolved. Only set once Visitors::Perform has been run.
12 13 14 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/extend_node.rb', line 12
def resolved_selector
@resolved_selector
end |
- (Array<String, Sass::Script::Tree::Node>) selector
The CSS selector to extend, interspersed with Script::Tree::Nodes representing #{}
-interpolation.
18 19 20 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/extend_node.rb', line 18
def selector
@selector
end |
- (Sass::Source::Range) selector_source_range
The extended selector source range.
23 24 25 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/extend_node.rb', line 23
def selector_source_range
@selector_source_range
end |
Instance Method Details
- (Boolean) optional?
Whether the @extend
is allowed to match no selectors or not.
28 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/extend_node.rb', line 28
def optional?; @optional; end |