[Compass Core] +font-face mixin uses stylesheet_url to form urls relative to the css directory.
This commit is contained in:
parent
d6b170b851
commit
7da41d027a
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user