Skip to content

anrizal/SassyLists

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SassyLists

Advanced Sass list functions

Here is a Compass Extension providing you all functions you need to manipulate your Sass lists. See complete documentation here.

Current version: 0.2.1.

How to use it

  1. gem install SassyLists
  2. Add require 'SassyLists' to your config.rb
  3. Import it in your stylesheets with @import 'SassyLists'

What's in there?

  • chunk(): chunks list into size large lists
  • count-values(): counts the number of occurrences of each value of list
  • debug(): returns list as a string
  • first(): returns first item in list
  • insert-nth(): inserts value at index
  • is-symmetrical(): checks if list is symmetrical
  • last(): returns last item in list
  • last-index(): returns last index of value in list
  • loop(): shifts indexes in list
  • prepend(): prepends value to list
  • purge(): removes all false and null values from list
  • random-value(): returns random value from list
  • remove(): removes value in list
  • remove-duplicates(): removes duplicate values from list
  • remove-nth(): removes value at index
  • replace(): replaces value in list
  • replace-nth(): replaces value at index
  • reverse(): reverses list
  • slice(): slices list
  • sort(): sorts list
  • sum(): sums all unitless values in list
  • to-string(): casts list as string (JS .join())

If you feel like an explorer, you can have a look at the code here.

Requirements

  • Sass ~> 3.2.0
  • Compass ~> 0.12.2 (obviously)

Some functions depend on other functions. If you include functions individually, make sure to check for these dependencies in their respective docs.

Also read

Credits

A million thanks to Vinay Raghu for making this Compass extension out of my original work and to Team-Sass for their Compass Extension template.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published