frameworks/compass/stylesheets/compass/css3/_font-face.scss in compass-0.10.2 vs frameworks/compass/stylesheets/compass/css3/_font-face.scss in compass-0.10.3.pre.1
- old
+ new
@@ -4,31 +4,30 @@
//
// * $name is required, arbitrary, and what you will use in font stacks.
// * $font-files is required using font-files('relative/location', 'format').
// for best results use this order: woff, opentype/truetype, svg
// * $eot is required by IE, and is a relative location of the eot file.
-// * postscript name is required by some browsers to look for local fonts.
@mixin font-face($name, $font-files, $eot: false, $postscript: false, $style: false) {
+ @if $postscript or $style {
+ @warn "The $postscript and $style variables have been deprecated in favor of the Paul Irish smiley bulletproof technique.";
+ }
@font-face {
- font-family: "#{$name}";
- @if $style {
- font-style: $style; }
+ font-family: quote($name);
@if $eot {
src: font-url($eot); }
- @if $postscript {
- src: local("#{$name}"), local("#{$postscript}"), #{$font-files}; }
- @else {
- src: local("#{$name}"), #{$font-files}; } } }
+ src: local("☺"), $font-files;
+ }
+}
// EXAMPLE
-// +font-face("this name", font-files("this.woff", "woff", "this.otf", "opentype"), "this.eot", "thisname")
+// +font-face("this name", font-files("this.woff", "woff", "this.otf", "opentype"), "this.eot")
//
// will generate:
//
// @font-face {
// font-family: 'this name';
// src: url('fonts/this.eot');
-// src: local('this name'), local('thisname'),
-// url('this.otf') format('woff'),
-// url('this.woff') format('opentype');
+// src: local("☺"),
+// url('fonts/this.otf') format('woff'),
+// url('fonts/this.woff') format('opentype');
// }