Skip to content

Instantly share code, notes, and snippets.

@quentint
Last active August 29, 2015 14:15
Show Gist options
  • Save quentint/3e390fab495921bff02b to your computer and use it in GitHub Desktop.
Save quentint/3e390fab495921bff02b to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$couleur-bandeau: (fr: blue, en: red, es: #f0f);
@mixin lang-color($prop, $color-name) {
@each $lang, $val in $color-name {
#{'.lang-' + $lang} & {
#{$prop}: $val;
}
}
}
.header {
a {
@include lang-color(border-bottom-color, $couleur-bandeau);
}
}
.lang-fr .header a {
border-bottom-color: blue;
}
.lang-en .header a {
border-bottom-color: red;
}
.lang-es .header a {
border-bottom-color: #f0f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment