Error: argument `$number` of `unitless($number)` must be a number
rem
? https://codepen.io/anon/pen/BgOKWq$breakpoints: (
sm-min: (min-width: 36em),
md-min: (min-width: 48em),
lg-min: (min-width: 62em),
);
$sizes: (
h1: (
sm: (3rem),
md: (3rem),
lg: (2.5rem),
),
h2: (
sm: (2.5rem),
md: (2.5rem),
lg: (2rem),
),
h3: (
sm: (2rem),
md: (2rem),
lg: (1.5rem),
),
h4: (
sm: (1.5rem),
md: (1.5rem),
lg: (1.25rem),
),
h5: (
sm: (1.25rem),
md: (1.25rem),
lg: (1rem),
),
h6: (
sm: (1rem),
md: (1rem),
lg: (1rem),
),
);
@each $query, $val in $breakpoints {
@media #{$val} {
@each $tag, $mq, $val in $sizes {
#{$tag} {
font-size: $mq, $val;
}
}
}
}
$sizes: (
h6: ($fzh6, $fzh6, $fzh6, $fzh6),
h5: ($fzh6, $fzh6, $fzh5, $fzh5),
h4: ($fzh6, $fzh5, $fzh4, $fzh4),
h3: ($fzh4, $fzh4, $fzh3, $fzh3),
h2: ($fzh3, $fzh3, $fzh2, $fzh2),
h1: ($fzh3, $fzh2, $fzh1, $fzh1)
);
content: 'font-size: ' attr(data-size);
let headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
headings.forEach(e => {
e.setAttribute('data-size', 'font-size' + e.style.fontSize);
});
&::after {
position: absolute;
content: attr(data-size);
}
font-size: значение
Спасибо большое за помощь! Много не понятного, но, надеюсь, я разберусь)