Giter Club home page Giter Club logo

sassylists's Introduction

SassyLists Gem Version

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

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(): returns whether list contains $value
  • contain(): returns whether the list contains the value
  • count-values(): counts the number of occurrences of each value of list
  • debug(): returns list as a string
  • first(): returns first item in list
  • flatten(): turns multidimensional list into a one-level list
  • insert-nth(): inserts value at index
  • intersection(): returns a list of shared values across all given lists
  • 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())
  • union(): returns a list of values from given lists minus duplicates

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.

sassylists's People

Contributors

kittygiraudel avatar scottkellum avatar

Watchers

Tim Kelty avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.