Created
May 26, 2021 14:56
-
-
Save khamer/62b85ad884d76e846526d5ff9df6ee13 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
@use "sass:map"; | |
@use "sass:list"; | |
@function hydrate($base, $map) { | |
$new: (); | |
@each $key, $value in $base { | |
$new: list.append($new, $value or map-get($map, $key) or $key); | |
} | |
@return $new; | |
} | |
$colors: ( | |
primary: red, | |
secondary: blue, | |
tertiary: orange, | |
); | |
.foo { | |
stuff: hydrate(primary green tertiary, $colors); | |
bar: map-get($colors, primary) or foo; | |
bar: map-get($colors, orange) or orange; | |
} |
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
.foo { | |
stuff: red green orange; | |
bar: red; | |
bar: orange; | |
} |
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": { | |
"compiler": "dart-sass/1.32.12", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment