generated from o/repo-template
72 lines
1.7 KiB
SCSS
72 lines
1.7 KiB
SCSS
@charset 'UTF-8';
|
|
|
|
/**
|
|
* Mixin to include fonts via font-face
|
|
*
|
|
* @param $font-family name of the font
|
|
* @param $font-path path, relative to compiled stylesheed
|
|
* @param $font-file name of the file
|
|
* @param $font-weight e.g. 300, regular, 400, 600
|
|
* @param $font-style e.g. normal, italic
|
|
*
|
|
* Example:
|
|
* @include font-face('Open Sans', '../fonts/', 'OpenSans-regular-webfont', 400, normal)
|
|
*/
|
|
@mixin font-face(
|
|
$font-family,
|
|
$font-path,
|
|
$font-file,
|
|
$font-weight: 300,
|
|
$font-style: normal
|
|
) {
|
|
@font-face {
|
|
font-family: $font-family;
|
|
src: url($font-path + $font-file + '.eot'); /* IE9 Compat Modes */
|
|
src: url($font-path + $font-file + '.eot?#iefix')
|
|
format('embedded-opentype'),
|
|
/* IE6-IE8 */ url($font-path + $font-file + '.woff2') format('woff2'),
|
|
/* Super Modern Browsers */ url($font-path + $font-file + '.woff')
|
|
format('woff'),
|
|
/* Modern Browsers */ url($font-path + $font-file + '.ttf')
|
|
format('truetype'),
|
|
/* Safari, Android, iOS */
|
|
url($font-path + $font-file + '.svg#{$font-family}') format('svg'); /* Legacy iOS */
|
|
font-weight: $font-weight;
|
|
font-style: $font-style;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** Open Sans light **/
|
|
@include font-face(
|
|
'Open Sans',
|
|
'../assets/fonts/open-sans/',
|
|
'open-sans-v18-latin-300',
|
|
300,
|
|
normal
|
|
);
|
|
/** Open Sans regular **/
|
|
@include font-face(
|
|
'Open Sans',
|
|
'../assets/fonts/open-sans/',
|
|
'open-sans-v18-latin-regular',
|
|
400,
|
|
normal
|
|
);
|
|
/** Open Sans italic **/
|
|
@include font-face(
|
|
'Open Sans',
|
|
'../assets/fonts/open-sans/',
|
|
'open-sans-v18-latin-italic',
|
|
300,
|
|
italic
|
|
);
|
|
/** Open Sans bold **/
|
|
@include font-face(
|
|
'Open Sans',
|
|
'../assets/fonts/open-sans/',
|
|
'open-sans-v18-latin-700',
|
|
700,
|
|
normal
|
|
); |