Module: Sass::Script::Functions

Defined in:
lib/jacket.rb

Instance Method Summary collapse

Instance Method Details

#list_separator(list) ⇒ Object

Returns the separator of the given list. If not a list, returns false.

Examples:

list-separator(1px 2px 3px) => 'space'
list-separator(1px, 2px, 3px) => 'comma'
list-separator('foo') => 'space'


24
25
26
27
28
29
30
# File 'lib/jacket.rb', line 24

def list_separator(list)
  if list.class == Sass::Script::List or list.class == Sass::Script::ArgList
    Sass::Script::String.new(list.separator.to_s)
  else
    Sass::Script::String.new('space')
  end
end