Created
October 16, 2014 14:43
-
-
Save bleuebuzz/f26164117ab3d46b7d98 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) | |
// ---- | |
$CONSTANTS_DO_NOT_TOUCH_HAHAHA: (); | |
@function constant($name, $value: NULL) { | |
@if ($value != NULL) { | |
@if (map-has-key($CONSTANTS_DO_NOT_TOUCH_HAHAHA, $name)) { | |
@warn "Constant `#{$name}` was already defined"; | |
} | |
@else { | |
$CONSTANTS_DO_NOT_TOUCH_HAHAHA: map-merge($CONSTANTS_DO_NOT_TOUCH_HAHAHA, ($name: $value)); | |
} | |
@return map-get($CONSTANTS_DO_NOT_TOUCH_HAHAHA, $name); | |
} | |
@if map-has-key($CONSTANTS_DO_NOT_TOUCH_HAHAHA, $name) { | |
@return map-get($CONSTANTS_DO_NOT_TOUCH_HAHAHA, $name); | |
} | |
@return null; | |
} | |
@mixin constant($name, $value) { | |
$value: constant($name, $value); | |
} | |
@include constant("foo", "bar"); | |
@include constant("foo", "babar"); | |
je suis { | |
au: constant(foo) | |
} |
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
je suis { | |
au: "bar"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment