Created
January 30, 2015 14:27
-
-
Save suisho/5811f4f38b245303cbd5 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---- | |
| // Sass (v3.3.14) | |
| // Compass (v1.0.1) | |
| // ---- | |
| $color-palette :( | |
| red : ( | |
| base : #ff0000, | |
| dark : #ffcccc | |
| ), | |
| blue : ( | |
| base : #0000ff, | |
| light : #00bbff, | |
| ) | |
| ) !default; | |
| @function color($color, $tone: 'base'){ | |
| @return map-get(map-get($color-palette, $color), $tone) | |
| } | |
| @each $name, $palette in $color-palette { | |
| @each $tone, $code in $palette { | |
| .sample-color-palette-#{$name}-#{$tone}{ | |
| .background : color($name, $tone); | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .sample-color-palette-red-base { | |
| .background: red; | |
| } | |
| .sample-color-palette-red-dark { | |
| .background: #ffcccc; | |
| } | |
| .sample-color-palette-blue-base { | |
| .background: blue; | |
| } | |
| .sample-color-palette-blue-light { | |
| .background: #00bbff; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment