class Sass::Supports::Declaration - sass-3.4.14 Documentation

# class Sass::Supports::Declaration

A declaration condition (e.g. `(feature: value)`).

### Attributes

name[RW]

@return [Sass::Script::Tree::Node] The feature name.

resolved_name[RW]

@!attribute #resolved_name

    The name of the feature after any SassScript has been resolved.
    Only set once \{Tree::Visitors::Perform} has been run.

    @return [String]

resolved_value[RW]

The value of the feature after any SassScript has been resolved. Only set once {Tree::Visitors::Perform} has been run.

@return [String]

value[RW]

The feature value.

@return [Sass::Script::Tree::Node]

### Public Class Methods

new(name, value) click to toggle source

    # File lib/sass/supports.rb, line 155
    def initialize(name, value)
      @name = name
      @value = value
    end

### Public Instance Methods

deep_copy() click to toggle source

    # File lib/sass/supports.rb, line 173
    def deep_copy
      copy = dup
      copy.name = @name.deep_copy
      copy.value = @value.deep_copy
      copy
    end

options=(options) click to toggle source

    # File lib/sass/supports.rb, line 180
    def options=(options)
      @name.options = options
      @value.options = options
    end

perform(env) click to toggle source

    # File lib/sass/supports.rb, line 160
    def perform(env)
      @resolved_name = name.perform(env)
      @resolved_value = value.perform(env)
    end

to_css() click to toggle source

    # File lib/sass/supports.rb, line 165
    def to_css
      "(#{@resolved_name}: #{@resolved_value})"
    end

to_src(options) click to toggle source

    # File lib/sass/supports.rb, line 169
    def to_src(options)
      "(#{@name.to_sass(options)}: #{@value.to_sass(options)})"
    end