Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-sass.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2014-07-12 19:23:21 +0400
committerGleb Mazovetskiy <glex.spb@gmail.com>2014-07-12 19:23:21 +0400
commitbfd047d7e2eec82e7e4a9996309f524d145b007d (patch)
treebddec7b2d3563c294da59eafa9f3ce1b0cfb259a
parent75a10e61bfdaf360c7a1bd97f0b50cad395f3fbb (diff)
parentbbda75fb7fc6b49c8264866aa6ae670dd49bbbbb (diff)
Merge branch 'pr-662'
-rw-r--r--README.md4
-rw-r--r--assets/stylesheets/bootstrap/_variables.scss5
-rw-r--r--tasks/converter/less_conversion.rb7
3 files changed, 12 insertions, 4 deletions
diff --git a/README.md b/README.md
index f9dffc96..4bb4bbfe 100644
--- a/README.md
+++ b/README.md
@@ -196,9 +196,9 @@ The fonts are referenced as:
"#{$icon-font-path}#{$icon-font-name}.eot"
```
-`$icon-font-path` defaults to `bootstrap/`.
+`$icon-font-path` defaults to `bootstrap/` if asset path helpers are used, and `../fonts/bootstrap/` otherwise.
-When using with Compass, Sprockets, or Mincer, make sure to import the relevant path helpers before Bootstrap itself, for example:.
+When using bootstrap-sass with Compass, Sprockets, or Mincer, you **must** import the relevant path helpers before Bootstrap itself, for example:
```scss
@import "bootstrap-compass";
diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss
index fe72e841..9049d460 100644
--- a/assets/stylesheets/bootstrap/_variables.scss
+++ b/assets/stylesheets/bootstrap/_variables.scss
@@ -77,7 +77,10 @@ $headings-color: inherit !default;
//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
//** Load fonts from this directory.
-$icon-font-path: "bootstrap/" !default;
+
+// [converter] Asset helpers such as Sprockets and Node.js Mincer do not resolve relative paths
+$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default;
+
//** File name for all font files.
$icon-font-name: "glyphicons-halflings-regular" !default;
//** Element ID within SVG icon file.
diff --git a/tasks/converter/less_conversion.rb b/tasks/converter/less_conversion.rb
index fd197cab..5dddfcfa 100644
--- a/tasks/converter/less_conversion.rb
+++ b/tasks/converter/less_conversion.rb
@@ -94,7 +94,12 @@ class Converter
// in Sass 3.3 this can be improved with: function-exists(twbs-font-path)
$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default;
SCSS
- file = replace_all file, /(\$icon-font-path:).*(!default)/, '\1 "bootstrap/" \2'
+ file = replace_all file, %r{(\$icon-font-path): \s*"(.*)" (!default);}, <<-SCSS
+
+// [converter] Asset helpers such as Sprockets and Node.js Mincer do not resolve relative paths
+\\1: if($bootstrap-sass-asset-helper, "bootstrap/", "\\2bootstrap/") \\3;
+SCSS
+ '\1: if($bootstrap-sass-asset-helper, "bootstrap/", "\2bootstrap/")\3'
when 'close.less'
# extract .close { button& {...} } rule
file = extract_nested_rule file, 'button&'