Skip to content

Instantly share code, notes, and snippets.

@gregwhitworth
Created December 7, 2017 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregwhitworth/e7cc3597a986e2212bb6415114e2d8e7 to your computer and use it in GitHub Desktop.
Save gregwhitworth/e7cc3597a986e2212bb6415114e2d8e7 to your computer and use it in GitHub Desktop.
Variable Fonts playground made with Mavo
<p>Variable Fonts</p>
@font-face {
/* Downloaded from axis-praxis.org, font from https://github.com/TypeNetwork/fb-Amstelvar. Oddly the one on Github supported fewer axes and had different values wtf */
src: url('https://lea.verou.me/files/AmstelvarAlpha-Variations.ttf') format('truetype');
font-family: Amstelvar;
}
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
align-content: center;
overflow: hidden;
}
p {
font-family: Amstelvar;
font-size: 25rem;
background: white;
flex: 1 0 auto;
text-align: center;
font-variation-settings: 'wght' 75, 'cntr' 121, 'grad' 253, 'opsz' 27, 'wdth' 258, 'prwd' 804, 'prwg' 181, 'srfr' 50, 'xhgt' 890;
animation: grow 3s infinite;
}
@keyframes grow {
to {
font-variation-settings: 'wght' 500, 'cntr' 121, 'grad' 303, 'opsz' 48, 'wdth' 800, 'prwd' 804, 'prwg' 181, 'srfr' 4, 'xhgt' 1200;
}
}
@supports not (font-variation-settings: inherit) {
[property=text]::before {
content: "Your browser does not support "
}
[property=text]::after {
content: "😭"
}
}
<link href="https://dev.mavo.io/dist/mavo.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment