Skip to content

Instantly share code, notes, and snippets.

@kwaledesign
Created March 18, 2014 01:58
Show Gist options
  • Save kwaledesign/9612196 to your computer and use it in GitHub Desktop.
Save kwaledesign/9612196 to your computer and use it in GitHub Desktop.
/**
* Component Constructor
*
* Used to provide a means for overriding default styles without redundant output
* Allows for the component to be package managed with a tool like bower
* without being tied to its predefined styles/settings for unit testing
*
* Sass v3.3.2 (Maptastic Maple)
* Compass (v1.0.0.alpha.19)
*
* 1. Component Constructor takes only one argument$map
* 2. Loop over $map and find properties and values
* 3. Output 'property: value;'
*
*/
@mixin componentConstructor($map) { /* 1 */
@each $p, $v in $map { /* 2 */
#{$p}: $v; /* 3 */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment