Sha256: 63973ac38dffc6ba8ef50694f0bee44d554795bfe556758f144eb68e7da5333f

Contents?: true

Size: 335 Bytes

Versions: 5

Compression:

Stored size: 335 Bytes

Contents

# Compact function pulled from compass
module Liqueur::SassExtensions::Functions::Compact

  def compact(*args)
    sep = :comma
    if args.size == 1 && args.first.is_a?(Sass::Script::List)
      args = args.first.value
      sep = args.first.separator
    end
    Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep)
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
liqueur-0.1.0 lib/liqueur/sass_extensions/functions/compact.rb
liqueur-0.0.5 lib/liqueur/sass_extensions/functions/compact.rb
liqueur-0.0.4 lib/liqueur/sass_extensions/functions/compact.rb
liqueur-0.0.3 lib/liqueur/sass_extensions/functions/compact.rb
liqueur-0.0.2 lib/liqueur/sass_extensions/functions/compact.rb