Created
June 15, 2015 12:15
-
-
Save binary-solo/711e0a2df18f10066220 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.4.14) | |
| // Compass (v1.0.3) | |
| // ---- | |
| @function map-fetch($map, $keys) { | |
| $key: nth($keys, 1); | |
| $length: length($keys); | |
| $value: map-get($map, $key); | |
| @if ($length > 1) { | |
| $rest: (); | |
| @for $i from 2 through $length { | |
| $rest: append($rest, nth($keys, $i)) | |
| } | |
| @return map-fetch($value, $rest) | |
| } @else { | |
| @return $value; | |
| } | |
| } | |
| $notice-boxes: ( | |
| types: ( | |
| warning: ( | |
| border: #dcfac0, | |
| background: #00968b, | |
| ), | |
| ) | |
| ); | |
| @each $type in map-keys(map-get($notice-boxes, types)) { | |
| .notice-box-#{$type} { | |
| background-color: map-fetch($notice-boxes, types $type background); | |
| border: map-fetch($notice-boxes, types $type border); | |
| } | |
| } |
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
| .notice-box-warning { | |
| background-color: #00968b; | |
| border: #dcfac0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment