class Sass::Script::List

This includes both comma-separated lists and space-separated lists.
A SassScript object representing a CSS list.

def _perform(environment)

Other tags:
    See: Node#_perform -
def _perform(environment)
  list = Sass::Script::List.new(
    value.map {|e| e.perform(environment)},
    separator)
  list.options = self.options
  list
end

def deep_copy

Other tags:
    See: Node#deep_copy -
def deep_copy
  node = dup
  node.instance_variable_set('@value', value.map {|c| c.deep_copy})
  node
end

def eq(other)

Other tags:
    See: Node#eq -
def eq(other)
  Sass::Script::Bool.new(
    self.class == other.class && self.value == other.value &&
    self.separator == other.separator)
end

def initialize(value, separator)

Parameters:
  • separator (String) -- See \{#separator}
  • value (Array) -- See \{#value}
def initialize(value, separator)
  super(value)
  @separator = separator
end

def inspect

Other tags:
    See: Node#inspect -
def inspect
  "(#{to_sass})"
end

def sep_str(opts = self.options)

def sep_str(opts = self.options)
  return ' ' if separator == :space
  return ',' if opts && opts[:style] == :compressed
  return ', '
end

def to_s(opts = {})

Other tags:
    See: Node#to_s -
def to_s(opts = {})
  raise Sass::SyntaxError.new("() isn't a valid CSS value.") if value.empty?
  return value.reject {|e| e.is_a?(List) && e.value.empty?}.map {|e| e.to_s(opts)}.join(sep_str)
end

def to_sass(opts = {})

Other tags:
    See: Node#to_sass -
def to_sass(opts = {})
  return "()" if value.empty?
  precedence = Sass::Script::Parser.precedence_of(separator)
  value.map do |v|
    if v.is_a?(List) && Sass::Script::Parser.precedence_of(v.separator) <= precedence
      "(#{v.to_sass(opts)})"
    else
      v.to_sass(opts)
    end
  end.join(sep_str(nil))
end