A Pen by gregwhitworth on CodePen.
Created
December 7, 2017 04:47
-
-
Save gregwhitworth/e7cc3597a986e2212bb6415114e2d8e7 to your computer and use it in GitHub Desktop.
Variable Fonts playground made with Mavo
This file contains 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
<p>Variable Fonts</p> |
This file contains 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 { | |
/* 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: "😭" | |
} | |
} |
This file contains 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
<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