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