Skip to content

Instantly share code, notes, and snippets.

@RuslanHolovko
Created July 30, 2020 07:27
Show Gist options
  • Save RuslanHolovko/a4d960e5adc5bf61bbc418a9cd1e6ac5 to your computer and use it in GitHub Desktop.
Save RuslanHolovko/a4d960e5adc5bf61bbc418a9cd1e6ac5 to your computer and use it in GitHub Desktop.
Generating classes with sass mixin
// FONT SIZES MIXIN START
$fontSizes: (
10: 10,
12: 12,
15: 15,
18: 18,
20: 20,
25: 25
);
@mixin fz-modifiers {
@each $name, $size in $fontSizes {
&-#{$name} {
font-size: $size+px;
}
}
}
.fz {
@include fz-modifiers;
}
// FONT SIZES MIXIN END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment