From 2525d0e019be4edc88970163cfc322503eb2af34 Mon Sep 17 00:00:00 2001 From: Tyson Gach Date: Sun, 7 Feb 2016 11:55:55 -0500 Subject: [PATCH] Remove the _font-url-prefixer function This function was not actually being utilized and was likely an artifact from refactoring the `font-face` mixin. --- core/_bourbon.scss | 1 - core/bourbon/addons/_font-face.scss | 7 +------ core/bourbon/functions/_font-source-declaration.scss | 3 +-- core/bourbon/functions/_font-url-prefixer.scss | 10 ---------- spec/fixtures/functions/font-source-declaration.scss | 7 ++++--- 5 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 core/bourbon/functions/_font-url-prefixer.scss diff --git a/core/_bourbon.scss b/core/_bourbon.scss index 5972c6b63..03eede857 100644 --- a/core/_bourbon.scss +++ b/core/_bourbon.scss @@ -12,7 +12,6 @@ @import "bourbon/functions/contains"; @import "bourbon/functions/contains-falsy"; @import "bourbon/functions/font-source-declaration"; -@import "bourbon/functions/font-url-prefixer"; @import "bourbon/functions/is-length"; @import "bourbon/functions/is-light"; @import "bourbon/functions/is-number"; diff --git a/core/bourbon/addons/_font-face.scss b/core/bourbon/addons/_font-face.scss index e411542c2..f4861a931 100644 --- a/core/bourbon/addons/_font-face.scss +++ b/core/bourbon/addons/_font-face.scss @@ -36,8 +36,6 @@ /// format("truetype"); /// } /// -/// @require {function} _font-url-prefixer -/// /// @require {function} _font-source-declaration /// /// @require {function} _bourbon-get-setting @@ -49,16 +47,13 @@ $file-formats: _bourbon-get-setting("global-font-file-formats") ) { - $font-url-prefix: _font-url-prefixer($asset-pipeline); - @font-face { font-family: $font-family; src: _font-source-declaration( $font-family, $file-path, $asset-pipeline, - $file-formats, - $font-url-prefix + $file-formats ); @content; } diff --git a/core/bourbon/functions/_font-source-declaration.scss b/core/bourbon/functions/_font-source-declaration.scss index 78046d07d..aed5cd3af 100644 --- a/core/bourbon/functions/_font-source-declaration.scss +++ b/core/bourbon/functions/_font-source-declaration.scss @@ -2,8 +2,7 @@ $font-family, $file-path, $asset-pipeline, - $file-formats, - $font-url) { + $file-formats) { $src: (); diff --git a/core/bourbon/functions/_font-url-prefixer.scss b/core/bourbon/functions/_font-url-prefixer.scss deleted file mode 100644 index 9e6bba0cf..000000000 --- a/core/bourbon/functions/_font-url-prefixer.scss +++ /dev/null @@ -1,10 +0,0 @@ -// Used for creating the source string for fonts using @font-face -// Reference: http://goo.gl/Ru1bKP - -@function _font-url-prefixer($asset-pipeline) { - @if $asset-pipeline == true { - @return font-url; - } @else { - @return url; - } -} diff --git a/spec/fixtures/functions/font-source-declaration.scss b/spec/fixtures/functions/font-source-declaration.scss index 03173b371..2c32984cb 100644 --- a/spec/fixtures/functions/font-source-declaration.scss +++ b/spec/fixtures/functions/font-source-declaration.scss @@ -1,10 +1,11 @@ @import "setup"; -$file-formats: eot woff2 woff ttf svg; + +$file-formats: ("eot", "woff2", "woff", "ttf", "svg"); .has-pipeline { - src: _font-source-declaration("a", "b", true, $file-formats, "/c"); + src: _font-source-declaration("a", "b", true, $file-formats); } .no-pipeline { - src: _font-source-declaration("a", "b", false, $file-formats, "/c"); + src: _font-source-declaration("a", "b", false, $file-formats); }