i am very newbie about Sass and i am trying to get CSS like this;
.heading-lg {
font-size: 11.2rem;}
.heading-md {
font-size: 11.2rem;}
.heading-sm {
font-size: 11.2rem;}
And here's my SCSS Code. But all heading-xx classes gets 11.2rem. Can anyone please show me the way? Thanks a lot.
$font-size: 1.6rem;
$heading-size: .8rem;
$heading: lg md sm;
$heading-lg: lg;
$heading-md: md;
$heading-sm: sm;
@each $size in $heading {
.heading-#{$size} {
@if $heading-lg==lg {
font-size: $font-size + $heading-size * (12);
}
@else if $heading-md==md {
font-size: $font-size + $heading-size * (10);
}
@else {
font-size: $font-size + $heading-size * (8);
}
}
}