Skip to content

Instantly share code, notes, and snippets.

@mattbarackman
Created April 24, 2013 21:26
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 mattbarackman/5455714 to your computer and use it in GitHub Desktop.
Save mattbarackman/5455714 to your computer and use it in GitHub Desktop.
This is a snippet for Sublime Text 2 which contains the CSS rules necessary for creating a custom font-face. This would be used if you wanted to include a font-face kit downloaded from a website like fontsquirrel.com in your project. After adding the font files to your project folder, you would add this snippet to your CSS file and would then be…
<snippet>
<content><![CDATA[
@font-face {
font-family: '${1:FontName}';
src: url('${2:eot_filepath}'); /* IE9 Compat Modes */
src: url('${2:eot_filepath}?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('${4:woff_filepath}') format('woff'), /* Modern Browsers */
url('${5:ttf_filepath}') format('truetype'), /* Safari, Android, iOS */
url('${6:svg_filepath}#svgFontName') format('svg'); /* Legacy iOS */
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<description>@font-face</description>
<tabTrigger>font-face</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.css</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment