Skip to content

Instantly share code, notes, and snippets.

@mucsher
Last active December 10, 2015 18:38
Show Gist options
  • Save mucsher/4475436 to your computer and use it in GitHub Desktop.
Save mucsher/4475436 to your computer and use it in GitHub Desktop.
Function Less: Add Font-face
@patchFont : "../font/";
#font-face(@fileFont, @nameFont, @svgFontId){
@font-face {
@patch : ~"@{patchFont}@{fileFont}";
font-family: '@{nameFont}';
src: url('@{patch}.eot');
src: url('@{patch}.eot?#iefix') format('embedded-opentype'),
url('@{patch}.woff') format('woff'),
url('@{patch}.ttf') format('truetype'),
url('@{patch}.svg#@{svgFontId}') format('svg');
font-weight: normal;
font-style: normal;
}
}
#font-face(Arial, arial, svgArial);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment