Created
July 2, 2014 14:24
-
-
Save KittyGiraudel/b294f899642a7545bc62 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.9) | |
| // Compass (v1.0.0.alpha.20) | |
| // ---- | |
| // Define a default map | |
| $configuration: ( | |
| "option": "default" | |
| ) !global; | |
| // Define an empty map of custom parameters | |
| $custom: (); | |
| // Whenever a function/mixin needs the option map, | |
| // Merge the custom conf to the default conf | |
| @mixin test() { | |
| $options: map-merge($configuration, $custom); | |
| $option: map-get($options, "option"); | |
| option: $option; | |
| } | |
| // With default values | |
| test { | |
| @include test(); | |
| } | |
| // Update custom map with your own options | |
| $custom: map-merge($custom, ("option": "value")) !global; | |
| // With custom values | |
| test { | |
| @include test(); | |
| } |
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
| test { | |
| option: "default"; | |
| } | |
| test { | |
| option: "value"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment