updated font-face a la fontspring, no change in usage
This commit is contained in:
parent
132621c230
commit
5a5c30caf4
@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
compass (0.11.beta.2.c521908)
|
||||
compass (0.11.beta.2.132621c)
|
||||
chunky_png (~> 0.12.0)
|
||||
sass (>= 3.1.0.alpha.218)
|
||||
|
||||
|
@ -14,21 +14,22 @@
|
||||
// If you need to generate other formats check out the Font Squirrel
|
||||
// [font generator](http://www.fontsquirrel.com/fontface/generator)
|
||||
|
||||
@mixin font-face($name, $font-files, $eot: false) {
|
||||
@mixin font-face(
|
||||
$name,
|
||||
$font-files,
|
||||
$eot: false
|
||||
) {
|
||||
$iefont: unquote("#{$eot}?iefix");
|
||||
@font-face {
|
||||
font-family: quote($name);
|
||||
@if $eot { src: font-url($eot); }
|
||||
src: local("☺"), $font-files;
|
||||
@if $eot {
|
||||
src: font-url($eot);
|
||||
$font-files: font-url($iefont) unquote("format('eot')"), $font-files;
|
||||
}
|
||||
@media screen and (max-device-width: 480px) {
|
||||
@font-face {
|
||||
font-family: quote($name);
|
||||
src: $font-files;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// EXAMPLE
|
||||
// +font-face("this name", font-files("this.woff", "woff", "this.otf", "opentype"), "this.eot")
|
||||
//
|
||||
|
@ -1,9 +1,5 @@
|
||||
@charset "UTF-8";
|
||||
@font-face {
|
||||
font-family: "font1";
|
||||
src: local("☺"), url('/tmp/fonts/font1.woff') format('woff'); }
|
||||
|
||||
@media screen and (max-device-width: 480px) {
|
||||
@font-face {
|
||||
font-family: "font1";
|
||||
src: url('/tmp/fonts/font1.woff') format('woff'); } }
|
||||
src: url('/tmp/fonts/font1.eot');
|
||||
src: url('/tmp/fonts/font1.eot?iefix') format('eot'), url('/tmp/fonts/font1.woff') format('woff'); }
|
||||
|
@ -1,3 +1,3 @@
|
||||
@import compass/css3/font-face
|
||||
|
||||
+font-face("font1", font-files("font1.woff", woff))
|
||||
+font-face("font1", font-files("font1.woff", woff), "font1.eot")
|
Loading…
Reference in New Issue
Block a user