diff --git a/Gemfile.lock b/Gemfile.lock index b2c857cf..9ff9fa15 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/frameworks/compass/stylesheets/compass/css3/_font-face.scss b/frameworks/compass/stylesheets/compass/css3/_font-face.scss index 445dff16..c8475053 100644 --- a/frameworks/compass/stylesheets/compass/css3/_font-face.scss +++ b/frameworks/compass/stylesheets/compass/css3/_font-face.scss @@ -14,19 +14,20 @@ // 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; - } - @media screen and (max-device-width: 480px) { - @font-face { - font-family: quote($name); - src: $font-files; + @if $eot { + src: font-url($eot); + $font-files: font-url($iefont) unquote("format('eot')"), $font-files; } + src: $font-files; } - } // EXAMPLE diff --git a/test/fixtures/stylesheets/compass/css/fonts.css b/test/fixtures/stylesheets/compass/css/fonts.css index 8a2196ab..4cbdb33b 100644 --- a/test/fixtures/stylesheets/compass/css/fonts.css +++ b/test/fixtures/stylesheets/compass/css/fonts.css @@ -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'); } diff --git a/test/fixtures/stylesheets/compass/sass/fonts.sass b/test/fixtures/stylesheets/compass/sass/fonts.sass index fdbef5b5..dd191bb1 100644 --- a/test/fixtures/stylesheets/compass/sass/fonts.sass +++ b/test/fixtures/stylesheets/compass/sass/fonts.sass @@ -1,3 +1,3 @@ @import compass/css3/font-face -+font-face("font1", font-files("font1.woff", woff)) \ No newline at end of file ++font-face("font1", font-files("font1.woff", woff), "font1.eot") \ No newline at end of file