Last active
August 22, 2016 21:22
-
-
Save hilja/65ea433e0f6dd3a36e1c 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
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
$primary-colors: ( | |
"red": "#ff0000", | |
"green": "#00ff00", | |
"blue": "#0000ff" | |
); | |
/* Key and value together */ | |
@each $color in $primary-colors { | |
.thing { | |
content: "#{$color}"; | |
} | |
} | |
/* Key and value separate */ | |
@each $color-name, $color-code in $primary-colors { | |
.color-#{$color-name} { | |
background: $color-code; | |
} | |
} |
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
/* Key and value together */ | |
.thing { | |
content: "red #ff0000"; | |
} | |
.thing { | |
content: "green #00ff00"; | |
} | |
.thing { | |
content: "blue #0000ff"; | |
} | |
/* Key and value separate */ | |
.color-red { | |
background: "#ff0000"; | |
} | |
.color-green { | |
background: "#00ff00"; | |
} | |
.color-blue { | |
background: "#0000ff"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment