Skip to content

Instantly share code, notes, and snippets.

@fatihacet fatihacet/input.scss
Last active Aug 8, 2016

Embed
What would you like to do?
Use Scss map and map_get to get dynamic variables from map.
$white_foo_bar: #FFF;
$map: (
foo: 'foo',
bar: 'bar',
baz: 'white',
foowhite: 'foowhitecolor'
);
@mixin foo($type) {
.foo {
.bar {
background: $white_foo_bar;
color: map-get($map, #{$type}white);
}
}
}
.div {
@include foo('foo');
}
.div .foo .bar {
background: #FFF;
color: "foowhitecolor";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.