Sha256: 3e6713465da75fd1c3db2a3e613d8e2dcdf349857e7cc9a40dfb731f569f4682
Contents?: true
Size: 388 Bytes
Versions: 27
Compression:
Stored size: 388 Bytes
Contents
require 'sass' module Sass::Script::Functions COMMA_SEPARATOR = /\s*,\s*/ def nest(*arguments) nested = arguments.map{|a| a.value}.inject do |memo,arg| ancestors = memo.split(COMMA_SEPARATOR) descendants = arg.split(COMMA_SEPARATOR) ancestors.map{|a| descendants.map{|d| "#{a} #{d}"}.join(", ")}.join(", ") end Sass::Script::String.new(nested) end end
Version data entries
27 entries across 27 versions & 6 rubygems