$primary-color: #272727;
$font-weight: (
"regular": 400,
"medium": 600,
"bold": 800
);
body {
background: $primary-color;
font-weight: map-get($font-weight, bold);
}
.main {
width: 80%;
#{&}__paragraph {
font-weight: map-get($font-weight, bold);
&:hover {
color: #666;
}
}
// file ./_resets.scss
@import './resets';
@function weight($weight-name) {
@return map-get($font-weights, $weight-name);
}
@mixin flexCenter($direction) {
display: flex;
flex-direction: $direction;
}
@mixin theme($light-theme: true) {
@if $light-theme {
color: #fff;
}
}
.main {
@include flexCenter(row);
}
.light {
@include theme($light-theme: true);
.p1 {
}
.p2 {
@extend .p1
}