Last active
February 27, 2018 14:00
-
-
Save bruno2ms/57b0588740eee669b06eb001c937bfa6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
> 0,01% | |
last 5 versions |
This file contains 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 (v4.0.0.alpha.1) | |
// Compass (vundefined) | |
// ---- | |
// Var definition no Geral | |
$props:(); | |
$props: map-merge($props, (main-menu__menu-home__span--props: ( | |
color: blue, | |
background: #CCC | |
))); | |
$props: map-merge($props, (main-menu__menu-home__div--props: ( | |
color: blue, | |
background: #CCC | |
))); | |
// Var definition no Cliente | |
$props: map-merge($props, (main-menu__menu-home__div--props: ( | |
color: red, | |
border-radius: 4px | |
))); | |
@mixin extend-props($elem) { | |
$elem-props: map-get($props, $elem); | |
@each $key, $value in $elem-props { | |
#{$key}: $value; | |
} | |
} | |
.main-menu { | |
&__menu-home { | |
span { | |
@include extend-props(main-menu__menu-home__span--props); | |
} | |
div { | |
// Variavel sobrescrita no arquivo de variaveis do cliente | |
@include extend-props(main-menu__menu-home__div--props); | |
} | |
p { | |
// Variável inexistente, não deve quebrar o css | |
@include extend-props(main-menu__menu-home__p--props); | |
} | |
} | |
} |
This file contains 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
.main-menu__menu-home span { | |
color: blue; | |
background: #CCC; | |
} | |
.main-menu__menu-home div { | |
color: red; | |
border-radius: 4px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment