Mapping und jeweils in Sass
$font-sizes: (
900: 3rem,
700: 1.5rem,
400: 1.125rem,
);
@each $shade, $value in $font-sizes {
.fs-#{$shade} {
font-size: $value;
}
}
/*
Compiled CSS:
.fs-900 { font-size: 1.125rem }
.fs-700 { font-size: 1.5rem }
.fs-400 { font-size: 3rem }
*/
Whale