Android 2.2 compat for @font-face declarations via a MQ redeclaration of the @ff

This commit is contained in:
Paul Irish 2011-02-01 22:24:22 -08:00
parent 58740fc039
commit 0fd9c08664
2 changed files with 14 additions and 1 deletions

View File

@ -14,9 +14,17 @@
} }
@font-face { @font-face {
font-family: quote($name); font-family: quote($name);
@if $eot { src: font-url($eot); } @if $eot {
src: font-url($eot); }
src: local(""), $font-files; src: local(""), $font-files;
} }
@media screen and (max-device-width: 480px) {
@font-face {
font-family: quote($name);
src: $font-files;
}
}
} }
// EXAMPLE // EXAMPLE

View File

@ -2,3 +2,8 @@
@font-face { @font-face {
font-family: "font1"; font-family: "font1";
src: local("☺"), url('/tmp/fonts/font1.woff') format('woff'); } 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'); } }