Skip to content

Commit

Permalink
chore: simplify font-face calls, improving performance loading only w…
Browse files Browse the repository at this point in the history
…off2 (#31)
  • Loading branch information
robsongajunior authored Dec 6, 2024
1 parent f1087b7 commit e1e20b0
Showing 1 changed file with 26 additions and 87 deletions.
113 changes: 26 additions & 87 deletions src/azion/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,156 +1,95 @@
// Configuration for the font-face of the theme, defaults to the system font so left as blank
@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-light.eot');
src:
url('https://fonts.azion.com/roboto/roboto-light.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-light.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-light.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-light.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-light.svg#roboto-light') format('svg');
font-weight: 300;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto Mono';
src: url('https://fonts.azion.com/roboto-mono/roboto-mono-regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto Mono';
src: url('https://fonts.azion.com/roboto-mono/roboto-mono-light.ttf') format('truetype');
src: url('https://fonts.azion.com/roboto/roboto-light.woff2') format('woff2');
font-weight: 300;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-regular.eot');
src:
url('https://fonts.azion.com/roboto/roboto-regular.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-regular.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-regular.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-regular.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-regular.svg#Roboto-Regular') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-italic.eot');
src:
url('https://fonts.azion.com/roboto/roboto-italic.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-italic.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-italic.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-italic.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-italic.svg#roboto-italic') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-italic.woff2') format('woff2');
font-weight: 400;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-medium.eot');
src:
url('https://fonts.azion.com/roboto/roboto-medium.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-medium.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-medium.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-medium.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-medium.svg#roboto-medium') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-medium.woff2') format('woff2');
font-weight: 500;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-mediumitalic.eot');
src:
url('https://fonts.azion.com/roboto/roboto-mediumitalic.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-mediumitalic.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-mediumitalic.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-mediumitalic.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-mediumitalic.svg#roboto-mediumitalic') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-mediumitalic.woff2') format('woff2');
font-weight: 500;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-bold.eot');
src:
url('https://fonts.azion.com/roboto/roboto-bold.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-bold.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-bold.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-bold.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-bold.svg#roboto-bold') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-bold.woff2') format('woff2');
font-weight: 600;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-bold.eot');
src:
url('https://fonts.azion.com/roboto/roboto-bold.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-bold.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-bold.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-bold.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-bold.svg#roboto-bold') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-bold.woff2') format('woff2');
font-weight: bold;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-bolditalic.eot');
src:
url('https://fonts.azion.com/roboto/roboto-bolditalic.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-bolditalic.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-bolditalic.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-bolditalic.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-bolditalic.svg#roboto-bolditalic') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-bolditalic.woff2') format('woff2');
font-weight: bold;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-bolditalic.eot');
src:
url('https://fonts.azion.com/roboto/roboto-bolditalic.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-bolditalic.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-bolditalic.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-bolditalic.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-bolditalic.svg#roboto-bold') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-bolditalic.woff2') format('woff2');
font-weight: 600;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Roboto';
src: url('https://fonts.azion.com/roboto/roboto-black.eot');
src:
url('https://fonts.azion.com/roboto/roboto-black.eot?#iefix') format('embedded-opentype'),
url('https://fonts.azion.com/roboto/roboto-black.woff2') format('woff2'),
url('https://fonts.azion.com/roboto/roboto-black.woff') format('woff'),
url('https://fonts.azion.com/roboto/roboto-black.ttf') format('truetype'),
url('https://fonts.azion.com/roboto/roboto-black.svg#roboto-black') format('svg');
src: url('https://fonts.azion.com/roboto/roboto-black.woff2') format('woff2');
font-weight: 700;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto Mono';
src: url('https://fonts.azion.com/roboto-mono/roboto-mono-regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Roboto Mono';
src: url('https://fonts.azion.com/roboto-mono/roboto-mono-light.ttf') format('truetype');
font-weight: 300;
font-style: normal;
font-display: swap;
}

0 comments on commit e1e20b0

Please sign in to comment.