diff --git a/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass b/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass index 7256dd01..7be10200 100644 --- a/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass +++ b/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass @@ -11,14 +11,14 @@ @if !style font-style= !style @if !eot - src: url('#{!eot}') + src= stylesheet_url(!eot) @if !postscript src: local('#{!name}'), local('#{!postscript}'), #{!font_files} @else src: local('#{!name}'), #{!font_files} // EXAMPLE - +font-face("this name", font_files("this.woff", "woff", "this.otf", "opentype"), "fonts/this.eot", "thisname") + +font-face("this name", font-files("this.woff", "woff", "this.otf", "opentype"), "fonts/this.eot", "thisname") will generate: diff --git a/lib/compass/sass_extensions/functions/font_files.rb b/lib/compass/sass_extensions/functions/font_files.rb index 9b12b7e1..f46b2721 100644 --- a/lib/compass/sass_extensions/functions/font_files.rb +++ b/lib/compass/sass_extensions/functions/font_files.rb @@ -3,7 +3,7 @@ module Compass::SassExtensions::Functions::FontFiles raise Sass::SyntaxError, "An even number of arguments must be passed to font_files()" unless args.size % 2 == 0 files = [] while args.size > 0 - files << "url('#{args.shift}') format('#{args.shift}')" + files << "#{stylesheet_url(args.shift)} format('#{args.shift}')" end Sass::Script::String.new(files.join(", ")) end