Created
May 12, 2016 12:45
-
-
Save pentzzsolt/35517598cf0ab7ef81c60f018bb501b0 to your computer and use it in GitHub Desktop.
Example code for my non-destructive-map-merge Sass function.
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
| $global-colors: ( | |
| neutral: #ccc, | |
| success: green, | |
| error: red | |
| ); | |
| $local-colors: ( | |
| primary: ( | |
| base: #33c, | |
| dark: #00a | |
| ), | |
| neutral: ( | |
| base: #ccc, | |
| dark: #999 | |
| ) | |
| ); | |
| $colors: some-different-map-merge($global-colors, $local-colors); | |
| /* Expected $colors list after merging: */ | |
| $colors: ( | |
| primary: ( | |
| base: #33c, | |
| dark: #00a | |
| ), | |
| neutral: ( | |
| base: #ccc, | |
| dark: #999 | |
| ), | |
| success: green, | |
| error: red | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment