class Sass::Tree::SupportsNode

A static node representing a `@supports` rule. `@supports` rules behave differently from other directives in that when they're nested within rules, they bubble up to top-level.

@see Sass::Tree

Attributes

condition[RW]

The supports condition.

@return [Sass::Supports::Condition]

group_end[RW]
name[RW]

The name, which may include a browser prefix.

@return [String]

Public Class Methods

new(name, condition) click to toggle source

@param condition [Sass::Supports::Condition] See {#condition}

Calls superclass method Sass::Tree::DirectiveNode.new
# File lib/sass/tree/supports_node.rb, line 26
def initialize(name, condition)
  @name = name
  @condition = condition
  @tabs = 0
  super('')
end

Public Instance Methods

bubbles?() click to toggle source

@see Sass::Tree::Node#bubbles?

# File lib/sass/tree/supports_node.rb, line 49
def bubbles?; true; end
invisible?() click to toggle source

True when the directive has no visible children.

@return [Boolean]

# File lib/sass/tree/supports_node.rb, line 44
def invisible?
  children.all? {|c| c.invisible?}
end
resolved_value() click to toggle source

@see Sass::Tree::DirectiveNode#resolved_value

# File lib/sass/tree/supports_node.rb, line 37
def resolved_value
  @resolved_value ||= "@#{name} #{condition.to_css}"
end
value() click to toggle source

@see Sass::Tree::DirectiveNode#value

# File lib/sass/tree/supports_node.rb, line 34
def value; raise NotImplementedError; end