Skip to content

Instantly share code, notes, and snippets.

@phlillip
Created October 25, 2018 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phlillip/0b5b390bce9f0c74d812394b7f48e089 to your computer and use it in GitHub Desktop.
Save phlillip/0b5b390bce9f0c74d812394b7f48e089 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (vundefined)
// ----
$black: "black_rgb(0,0,0)";
$honey-brown: "honey-brown_rgb(144,122,106)";
$red: "red_rgb(255,0,0)";
$paints: $black, $honey-brown, $red;
@each $color in $paints {
$colSplit: str-index($color, _);
$colName: str-slice($color, 1, $colSplit - 1);
$colVal: str-slice($color, $colSplit + 1);
.paint-#{$colName}-paint {background-color: #{$colVal};}
}
.paint-black-paint {
background-color: rgb(0,0,0);
}
.paint-honey-brown-paint {
background-color: rgb(144,122,106);
}
.paint-red-paint {
background-color: rgb(255,0,0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment