Created
February 22, 2023 09:52
-
-
Save jensgro/14f2e73aeb523b33107782626edc5214 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; | |
@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: 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