Last active
August 29, 2015 14:00
-
-
Save kyledurand/11193171 to your computer and use it in GitHub Desktop.
Importing a web font using @font-face in shopify's liquid
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 { | |
font-family: 'font'; | |
src: url('{{ 'font.eot' | asset_url }}'); | |
src: url('{{ 'font.eot' | asset_url }}?#iefix') format('eot'), | |
url('{{ 'font.woff' | asset_url }}') format('woff'), | |
url('{{ 'font.ttf' | asset_url }}') format('truetype'), | |
url('{{ 'font.svg' | asset_url }}') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
/* fixes choppy text in chrome */ | |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
@font-face { | |
font-family: 'font'; | |
src: url('{{ 'font.svg' | asset_url }}') format('svg'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment