4692413b52
- Add woff2 for RobotoSlab - Default font as option/variable
18 lines
504 B
SCSS
18 lines
504 B
SCSS
$font-path: 'fonts' !default;
|
|
|
|
@mixin load-font($name, $type, $weight, $style, $alias: '') {
|
|
@if $alias == '' {
|
|
$alias: $name;
|
|
}
|
|
@font-face {
|
|
font-family: '#{$alias}';
|
|
font-style: $style;
|
|
font-weight: $weight;
|
|
src: local('#{$name} #{$type}'),
|
|
local('#{$name}-#{$type}'),
|
|
url('#{$font-path}/#{$name}-#{$type}.woff2') format('woff2'),
|
|
url('#{$font-path}/#{$name}-#{$type}.woff') format('woff'),
|
|
url('#{$font-path}/#{$name}-#{$type}.ttf') format('truetype');
|
|
}
|
|
}
|