Created
February 22, 2023 09:56
-
-
Save jensgro/908eb7f43547445a5d4e1649b0c5505a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin font-face($name, $path, $weight: null, $style: null, $exts: woff2 woff) { | |
//$src: null; | |
$src: local(""+$name+""); | |
@each $ext in $exts { | |
$src: append($src, url(quote($path + "." + $ext)) format(quote($ext)), comma); | |
} | |
@font-face { | |
font-family: quote($name); | |
font-style: $style; | |
font-weight: $weight; | |
font-display: swap; | |
src: $src; | |
} | |
} | |
@include font-face(One, fonts/one); | |
@font-face { | |
font-family:'Roboto'; | |
font-style: normal; | |
font-weight: 400; | |
src: | |
local('Roboto'), // Erst nachsehen, ob die Schrift | |
local('Roboto-Regular'), // beim Besucher schon installiert ist | |
url(fonts/roboto-v18-latin-regular.woff2) format('woff2'), // Wenn nicht, wird die Schrift vom Webserver geladen | |
url(fonts/roboto-v18-latin-regular.woff) format('woff'); // Am Ende das Schlusslicht für IE11 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: "One"; | |
font-display: swap; | |
src: local("One"), url("fonts/one.woff2") format("woff2"), url("fonts/one.woff") format("woff"); | |
} | |
@font-face { | |
font-family: "Roboto"; | |
font-style: normal; | |
font-weight: 400; | |
src: local("Roboto"), local("Roboto-Regular"), url(fonts/roboto-v18-latin-regular.woff2) format("woff2"), url(fonts/roboto-v18-latin-regular.woff) format("woff"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sass": { | |
"compiler": "dart-sass/1.32.12", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment