Я бы пошел с картой , так как она имеет тенденцию быть более гибкой - например:
$font-size:(
h1 : 40px,
h2 : 28px,
h3 : 24px,
h4 : 20px,
h5 : 18px,
h6 : 14px
);
@each $header, $size in $font-size {
#{$header}{ font-size: $size; }
}
// Bonus
// If you need to apply a font-size to another
// element you can get the size using map-get
.class {
font-size: map-get($font-size, h3);
}
// Function and mixin to handle the above
@function font-size($key){
@return map-get($font-size, $key);
}
@mixin font-size($key){
font-size: font-size($key);
}
.class {
font-size: font-size(h3); // use it as function
@include font-size(h3); // use it as include
}