Skip to content

Instantly share code, notes, and snippets.

@Chagall
Created April 1, 2021 00:07
Show Gist options
  • Save Chagall/bae462d427da2cab0b0b184dd5165d9e to your computer and use it in GitHub Desktop.
Save Chagall/bae462d427da2cab0b0b184dd5165d9e to your computer and use it in GitHub Desktop.
How to import a font and apply it globally to your whole website
@font-face {
font-family: "Roboto Medium";
font-style: normal;
font-weight: normal;
src: url("./fonts/Roboto-Medium.eot");
src: local(''), url("./fonts/Roboto-Medium.eot?#iefix") format('embedded-opentype'), /* IE6-IE8 */
url("./fonts/Roboto-Medium.woff") format("woff"), /* Modern Browsers */
url("./fonts/Roboto-Medium.ttf") format("truetype"), /* Safari, Android, iOS */
url("./fonts/Roboto-Medium.svg#Roboto-Medium") format("svg");
/* Legacy iOS */
}
body {
font-family: 'Roboto' !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment