diff --git a/lib/compass/sass_extensions/functions/lists.rb b/lib/compass/sass_extensions/functions/lists.rb new file mode 100644 index 00000000..663890b8 --- /dev/null +++ b/lib/compass/sass_extensions/functions/lists.rb @@ -0,0 +1,9 @@ +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) + else + list + end + end +end