diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2014-12-17 18:27:37 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2014-12-17 18:28:54 +0300 |
commit | 7d30630bc8d490239b15dce754dfba298a7d5bc2 (patch) | |
tree | 7685bd1aa2e36c996de11624e2da4d5d52a0bcc3 /assets | |
parent | 19651584e8a669ffe4e72a715275bdcf1acbe7f1 (diff) |
Sass: explicitly set $bootstrap-sass-asset-helper
Remove reliance on a hack as a polyfill for `function-exists`.
Remove clutter from the generated variables template.
Diffstat (limited to 'assets')
-rw-r--r-- | assets/stylesheets/_bootstrap-compass.scss | 2 | ||||
-rw-r--r-- | assets/stylesheets/_bootstrap-mincer.scss | 2 | ||||
-rw-r--r-- | assets/stylesheets/_bootstrap-sprockets.scss | 2 | ||||
-rw-r--r-- | assets/stylesheets/bootstrap/_variables.scss | 9 |
4 files changed, 9 insertions, 6 deletions
diff --git a/assets/stylesheets/_bootstrap-compass.scss b/assets/stylesheets/_bootstrap-compass.scss index 82706c4..8fbc3cd 100644 --- a/assets/stylesheets/_bootstrap-compass.scss +++ b/assets/stylesheets/_bootstrap-compass.scss @@ -5,3 +5,5 @@ @function twbs-image-path($path) { @return image-url($path, true); } + +$bootstrap-sass-asset-helper: true; diff --git a/assets/stylesheets/_bootstrap-mincer.scss b/assets/stylesheets/_bootstrap-mincer.scss index 3413250..7ec4657 100644 --- a/assets/stylesheets/_bootstrap-mincer.scss +++ b/assets/stylesheets/_bootstrap-mincer.scss @@ -15,3 +15,5 @@ @function twbs-image-path($file) { @return "<%- asset_path('#{$file}') %>"; } + +$bootstrap-sass-asset-helper: true; diff --git a/assets/stylesheets/_bootstrap-sprockets.scss b/assets/stylesheets/_bootstrap-sprockets.scss index 7d30692..9fffc1e 100644 --- a/assets/stylesheets/_bootstrap-sprockets.scss +++ b/assets/stylesheets/_bootstrap-sprockets.scss @@ -5,3 +5,5 @@ @function twbs-image-path($path) { @return image-path($path); } + +$bootstrap-sass-asset-helper: true; diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss index 7d190f2..e23cba0 100644 --- a/assets/stylesheets/bootstrap/_variables.scss +++ b/assets/stylesheets/bootstrap/_variables.scss @@ -1,8 +1,4 @@ -// When true, asset path helpers are used, otherwise the regular CSS `url()` is used. -// When there no function is defined, `fn('')` is parsed as string that equals the right hand side -// NB: in Sass 3.3 there is a native function: function-exists(twbs-font-path) -$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default; - +$bootstrap-sass-asset-helper: false !default; // // Variables // -------------------------------------------------- @@ -82,7 +78,8 @@ $headings-color: inherit !default; //** Load fonts from this directory. -// [converter] Asset helpers such as Sprockets and Node.js Mincer do not resolve relative paths +// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path. +// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths. $icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default; //** File name for all font files. |