Class: Sass::Tree::SupportsNode
- Inherits:
-  DirectiveNode - Object
- Node
- DirectiveNode
- Sass::Tree::SupportsNode
 
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/supports_node.rb
Overview
A static node representing a @supports rule.
Instance Attribute Summary (collapse)
-   - (Sass::Supports::Condition) condition   The supports condition. 
-   - (String) name   The name, which may include a browser prefix. 
Attributes inherited from DirectiveNode
Attributes inherited from Node
#children, #filename, #has_children, #line, #options, #source_range
Instance Method Summary (collapse)
-   - (SupportsNode) initialize(name, condition)   constructor A new instance of SupportsNode. 
-   - (Boolean) invisible?   True when the directive has no visible children. 
- - resolved_value
- - value
Methods inherited from DirectiveNode
#bubbles?, #normalized_name, resolved
Methods inherited from Node
#<<, #==, #balance, #bubbles?, #css, #css_with_sourcemap, #deep_copy, #each, #inspect, #style, #to_sass, #to_scss
Constructor Details
- (SupportsNode) initialize(name, condition)
Returns a new instance of SupportsNode
| 17 18 19 20 21 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/supports_node.rb', line 17
def initialize(name, condition)
  @name = name
  @condition = condition
  super('')
end | 
Instance Attribute Details
- (Sass::Supports::Condition) condition
The supports condition.
| 14 15 16 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/supports_node.rb', line 14
def condition
  @condition
end | 
- (String) name
The name, which may include a browser prefix.
| 9 10 11 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/supports_node.rb', line 9
def name
  @name
end | 
Instance Method Details
- (Boolean) invisible?
True when the directive has no visible children.
| 34 35 36 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/supports_node.rb', line 34
def invisible?
  children.all? {|c| c.invisible?}
end | 
- resolved_value
| 27 28 29 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/supports_node.rb', line 27
def resolved_value
  @resolved_value ||= "@#{name} #{condition.to_css}"
end | 
- value
| 24 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/supports_node.rb', line 24
def value; raise NotImplementedError; end |