Skip to content

Instantly share code, notes, and snippets.

@kyledurand
Last active August 29, 2015 14:00
Show Gist options
  • Save kyledurand/11193171 to your computer and use it in GitHub Desktop.
Save kyledurand/11193171 to your computer and use it in GitHub Desktop.
Importing a web font using @font-face in shopify's liquid
@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