Skip to content

Instantly share code, notes, and snippets.

@Pickra
Created May 24, 2017 20:00
Show Gist options
  • Save Pickra/7b734c017d396d1624ae98ca01c696a4 to your computer and use it in GitHub Desktop.
Save Pickra/7b734c017d396d1624ae98ca01c696a4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
$cool: blue;
$mad: red;
$colors: (
cool: $cool,
mad: $mad
);
.prfx-color {
@each $color in map-keys($colors) {
&--#{$color} {
background-color: map-get($colors, $color);
&::after { content: "$#{$color}"; }
}
}
}
.prfx-color--cool {
background-color: blue;
}
.prfx-color--cool::after {
content: "$cool";
}
.prfx-color--mad {
background-color: red;
}
.prfx-color--mad::after {
content: "$mad";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment