$h1: 30px;
h1 { font-size: $h1; }
@media(){
$h1: 20px;
}
$h1: 30px;
$h1-sm: 20px;
h1 { font-size: $h1; }
@media(){
h1 { font-size: $h1-sm; }
}
:root {
--h1: 30px;
}
h1 { font-size: var(--h1, 30px); }
@media(){
:root {
--h1: 20px;
}
}
$size: 36px;
border-radius: calc(#{($size/2) / $size});
$size: 36px;
$result: ($size/2) / $size;
border-radius: calc(#{$result});
$size: 36px;
border-radius: calc((#{$size}/2) / #{$size});
$size: 36px;
border-radius: (($size/2) / $size);
$color-black: #000;
:root {
--color-black: #{$color-black}
}
.class {
color: $color-black; // fallback
color: var(--color-black);
}
src: url('../fonts/FiraSans-Regular/FiraSans-Regular.woff') format('woff');
src: url('../fonts/FiraSans-Regular/FiraSans-Regular.svg') format('svg');
src: url('../fonts/FiraSans-Regular/FiraSans-Regular.woff') format('woff'),
url('../fonts/FiraSans-Regular/FiraSans-Regular.svg') format('svg');
opechatka
.soc {
}
opechatka .soc {
}
{
opechatka
display: flex;
}
{
opechatka: 10px;
display: flex;
}
Вложенных массивов же Sass не знает? В доке не нашёл.
$text_sizes: (
s: ( s:20px, m:48px, l:100px ),
m: ( s:24px, m:56px, l:114px ),
l: ( s:28px, m:68px, l:138px ),
xl: ( s:32px, m:74px, l:154px ),
xxl: ( s:36px, m:88px, l:184px ),
);
@each $size, $def in $text_sizes {
.text_size_#{$size} {
@each $word_size, $word_width in $def {
.text__word_width_#{$word_size} {
width: $word_width;
}
}
}
}