Skip to content

Instantly share code, notes, and snippets.

@scottdavis
Last active August 29, 2015 14:19
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 scottdavis/a43172b5ecf31488a0bd to your computer and use it in GitHub Desktop.
Save scottdavis/a43172b5ecf31488a0bd to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.1.0)
// ----
$config: (
"color-red": red,
"color-blue": blue,
"color-black": black,
"color-white": white,
"font-body": 16px,
"font-heading": 24px,
"font-hero": 5rem,
);
@mixin properties-that-match($match, $map, $property) {
@each $key, $value in $map {
@if str-index($key, $match) {
.#{$key} {
#{$property}: $value;
}
}
}
}
@include properties-that-match('color', $config, 'color');
@include properties-that-match('font', $config, 'font-size');
.color-red {
color: red; }
.color-blue {
color: blue; }
.color-black {
color: black; }
.color-white {
color: white; }
.font-body {
font-size: 16px; }
.font-heading {
font-size: 24px; }
.font-hero {
font-size: 5rem; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment