// light: 300; regular: 400; semi-bold: 600; @mixin font-weight($weight){ font-weight: $weight; } @function calculateRem($size) { $remSize: $size / 16; @return $remSize * 1rem; } @mixin font-size($size) { //add font value in PX it will convert to REM //also for older browser where rem is not supported it will render PX font-size: $size + px; font-size: calculateRem($size); } @mixin font-color($value) { color: $value; } .font{ &-light { @include font-weight(100); } &-regular { @include font-weight(400); } &-bold { @include font-weight(600); } } @font-face { font-family: Nunito; src: url('./assets/fonts/Nunito-Medium.ttf' ) format("truetype"); } @font-face { font-family: NunitoB; src: url('./assets/fonts/Nunito-Black.ttf' ) format("truetype"); }