Change styles based on the quantity of Elements.
Example Usecase: Too many Elements in a horizontal Navigation
###Usage
@include quantity-at(4) {...} // styles when exactly 4 elements
@include quantity-above(4) {...} // styles when more than 4 elements
@include quantity-below(4) {...} // styles when less than 4 elements
@include quantity-between(2,4) {...} // styles between 2 and 4 elements
###Snippets The Snippets for Sublime Text are optional but make the workflow much faster.
Install: Download the Snippets and place them in your
(path_to_sublime)/Packages/User
folder.Usage: Just type
quantity
, choose your type (above, below, at or between) and hit TAB
to place your include.
###Playground You can test the mixin over here:
Open Playground