Sha256: f8dfec251098d98577ffee94c84b8d251127fb33dda8eb57091cdb3647e4d216

Contents?: true

Size: 312 Bytes

Versions: 3

Compression:

Stored size: 312 Bytes

Contents

module Compass::SassExtensions::Functions::Lists
  def first_value_of(list)
    if list.is_a?(Sass::Script::String)
      Sass::Script::String.new(list.value.split(/\s+/).first)
    elsif defined?(Sass::Script::List) && list.is_a?(Sass::Script::List)
      list.value.first
    else
      list
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
compass-0.11.alpha.4 lib/compass/sass_extensions/functions/lists.rb
compass-0.11.alpha.3 lib/compass/sass_extensions/functions/lists.rb
compass-0.11.alpha.1 lib/compass/sass_extensions/functions/lists.rb