seed-props
Props mixin pack for Seed!
Install
npm install seed-props --save
Documentation
Check out our documentation of this pack.
Basic Usage
SCSS
This seed pack needs to be imported into your sass pipeline. Below is an example using Gulp:
var gulp = ;var sass = ;var pack = ; gulp;
Once that is setup, simply @import
seed-props as needed in your .scss
file:
// Packs
Usage
prop-map
The prop-map
mixin allows you to loop through a map and use arguments as variables in your styles (@content
).
You have to use the prop
function for your @content
to utilize the argument defined in your prop-map
.
Simple
// Input (scss) 1: 10%, 2: 20%); }} // Output (css)
Slightly trickier (aka. Awesome)
Yo dawg. I heard you like using maps within maps. prop-map
will be able to handle that!
// Input (scss) ); }} // Output (css)
P.S. For maps within maps, the arguments are based on name (not the argument order).