bootstrap-sass 3.3.1.0 → 3.3.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bootstrap-sass might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +8 -8
- data/CHANGELOG.md +44 -0
- data/CONTRIBUTING.md +8 -1
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/README.md +69 -49
- data/Rakefile +46 -4
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +273 -214
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/javascripts/bootstrap/affix.js +7 -7
- data/assets/javascripts/bootstrap/alert.js +3 -3
- data/assets/javascripts/bootstrap/button.js +14 -10
- data/assets/javascripts/bootstrap/carousel.js +11 -14
- data/assets/javascripts/bootstrap/collapse.js +9 -9
- data/assets/javascripts/bootstrap/dropdown.js +49 -45
- data/assets/javascripts/bootstrap/modal.js +45 -32
- data/assets/javascripts/bootstrap/popover.js +9 -20
- data/assets/javascripts/bootstrap/scrollspy.js +18 -21
- data/assets/javascripts/bootstrap/tab.js +7 -5
- data/assets/javascripts/bootstrap/tooltip.js +82 -46
- data/assets/javascripts/bootstrap/transition.js +2 -2
- data/assets/javascripts/bootstrap-sprockets.js +2 -2
- data/assets/javascripts/bootstrap.js +1210 -1151
- data/assets/javascripts/bootstrap.min.js +7 -0
- data/assets/stylesheets/_bootstrap-compass.scss +2 -0
- data/assets/stylesheets/_bootstrap-mincer.scss +4 -2
- data/assets/stylesheets/_bootstrap-sprockets.scss +2 -0
- data/assets/stylesheets/_bootstrap.scss +6 -0
- data/assets/stylesheets/bootstrap/_alerts.scss +5 -0
- data/assets/stylesheets/bootstrap/_badges.scss +7 -2
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +3 -1
- data/assets/stylesheets/bootstrap/_button-groups.scss +5 -4
- data/assets/stylesheets/bootstrap/_buttons.scss +14 -6
- data/assets/stylesheets/bootstrap/_carousel.scss +16 -13
- data/assets/stylesheets/bootstrap/_close.scss +1 -0
- data/assets/stylesheets/bootstrap/_component-animations.scss +1 -2
- data/assets/stylesheets/bootstrap/_dropdowns.scss +6 -3
- data/assets/stylesheets/bootstrap/_forms.scss +98 -29
- data/assets/stylesheets/bootstrap/_glyphicons.scss +83 -10
- data/assets/stylesheets/bootstrap/_input-groups.scss +8 -3
- data/assets/stylesheets/bootstrap/_jumbotron.scss +8 -3
- data/assets/stylesheets/bootstrap/_list-group.scss +9 -3
- data/assets/stylesheets/bootstrap/_media.scss +19 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +1 -0
- data/assets/stylesheets/bootstrap/_modals.scss +4 -2
- data/assets/stylesheets/bootstrap/_navbar.scss +1 -1
- data/assets/stylesheets/bootstrap/_navs.scss +0 -2
- data/assets/stylesheets/bootstrap/_normalize.scss +8 -11
- data/assets/stylesheets/bootstrap/_pagination.scss +4 -3
- data/assets/stylesheets/bootstrap/_panels.scss +11 -1
- data/assets/stylesheets/bootstrap/_popovers.scss +4 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -6
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +8 -8
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +8 -3
- data/assets/stylesheets/bootstrap/_scaffolding.scss +11 -0
- data/assets/stylesheets/bootstrap/_tables.scss +3 -3
- data/assets/stylesheets/bootstrap/_theme.scss +26 -7
- data/assets/stylesheets/bootstrap/_tooltip.scss +4 -6
- data/assets/stylesheets/bootstrap/_type.scss +2 -2
- data/assets/stylesheets/bootstrap/_utilities.scss +0 -1
- data/assets/stylesheets/bootstrap/_variables.scss +20 -10
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +19 -6
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +3 -3
- data/bootstrap-sass.gemspec +9 -9
- data/bower.json +5 -19
- data/composer.json +1 -1
- data/lib/bootstrap-sass/engine.rb +6 -1
- data/lib/bootstrap-sass/version.rb +2 -2
- data/lib/bootstrap-sass.rb +27 -5
- data/package.json +6 -6
- data/sache.json +1 -1
- data/tasks/bower.rake +2 -5
- data/tasks/converter/fonts_conversion.rb +1 -1
- data/tasks/converter/js_conversion.rb +7 -5
- data/tasks/converter/less_conversion.rb +41 -29
- data/tasks/converter/network.rb +10 -5
- data/tasks/converter.rb +1 -1
- data/templates/project/_bootstrap-variables.sass +20 -11
- data/templates/project/styles.sass +3 -0
- data/test/dummy_rails/app/assets/stylesheets/{application.css.sass → application.sass} +0 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +43 -0
- data/test/dummy_rails/config/application.rb +1 -1
- data/test/dummy_rails/config/environments/development.rb +0 -3
- data/test/dummy_rails/config/environments/production.rb +7 -1
- data/test/dummy_rails/config/environments/test.rb +9 -1
- data/test/dummy_sass_only/Gemfile +1 -1
- data/test/gemfiles/rails_head.gemfile +17 -0
- data/test/node_mincer_test.rb +2 -3
- data/test/node_sass_compile_test.sh +2 -2
- data/test/sprockets_rails_test.rb +1 -1
- data/test/support/reporting.rb +10 -0
- data/test/test_helper.rb +1 -1
- metadata +36 -34
- data/test/dummy_rails/log/development.log +0 -0
- data/test/gemfiles/sass_3_2.gemfile +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55139f6cb78bf3543a9bfa371598eafbecfc743d
|
4
|
+
data.tar.gz: ab0260cc09e54be379f9c7f1c1b93f490d85c7ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4284b5dbb1561011e953993a4264d12cc373e0aa94a0bb1221714d842819073bd2755b78134094b961344d12275237eded8424eff05f8b3d0d3de910e82386c
|
7
|
+
data.tar.gz: 25ca22cf946b3f8b286cef43a9d71d851f57268fd44fb72c4463e4938861a48498912a98cfccece688572966e4fe5ca4edee0e18355e53ae3c0c3630e41e32f9
|
data/.travis.yml
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
bundler_args: --path ../../vendor/bundle --without debug
|
2
4
|
rvm:
|
3
|
-
- 2.
|
4
|
-
- jruby
|
5
|
-
- rbx-2
|
5
|
+
- 2.2.3
|
6
6
|
gemfile:
|
7
|
-
- test/gemfiles/
|
7
|
+
- test/gemfiles/rails_head.gemfile
|
8
8
|
- test/gemfiles/sass_3_3.gemfile
|
9
9
|
- test/gemfiles/sass_3_4.gemfile
|
10
10
|
- test/gemfiles/sass_head.gemfile
|
11
11
|
before_install:
|
12
|
+
- "nvm install stable"
|
12
13
|
- "npm install"
|
13
14
|
matrix:
|
14
15
|
allow_failures:
|
15
|
-
|
16
|
-
- rvm: rbx-2
|
16
|
+
- gemfile: test/gemfiles/rails_head.gemfile
|
17
17
|
- gemfile: test/gemfiles/sass_head.gemfile
|
18
18
|
notifications:
|
19
19
|
slack: heybb:3n88HHilXn76ji9vV4gL819Y
|
@@ -21,5 +21,5 @@ env:
|
|
21
21
|
global:
|
22
22
|
- VERBOSE=1
|
23
23
|
script:
|
24
|
-
|
25
|
-
|
24
|
+
bundle exec rake && sh test/*.sh
|
25
|
+
sudo: false
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,49 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.3.6
|
4
|
+
|
5
|
+
Bumps Sass dependency to 3.3.4+ to avoid compatibility issues with @at-root.
|
6
|
+
Bumps node-sass dependency to ~3.4.2 for Node.js v5 compatibility. [#986](https://github.com/twbs/bootstrap-sass/issues/986)
|
7
|
+
Fixes breadcrumb content issues on libsass. [#919](https://github.com/twbs/bootstrap-sass/issues/919)
|
8
|
+
Fixes a Rails 5 compatibility issue. [#965](https://github.com/twbs/bootstrap-sass/pull/965)
|
9
|
+
|
10
|
+
Framework version: Bootstrap **v3.3.6**
|
11
|
+
|
12
|
+
## 3.3.5
|
13
|
+
|
14
|
+
Fix for standalone Compass extension compatibility. [#914](https://github.com/twbs/bootstrap-sass/issues/914)
|
15
|
+
|
16
|
+
Framework version: Bootstrap **v3.3.5**
|
17
|
+
|
18
|
+
## 3.3.4
|
19
|
+
|
20
|
+
No Sass-specific changes.
|
21
|
+
|
22
|
+
Framework version: Bootstrap **v3.3.4**
|
23
|
+
|
24
|
+
## 3.3.3
|
25
|
+
|
26
|
+
This is a re-packaged release of 3.3.2.1 (v3.3.2+1).
|
27
|
+
|
28
|
+
Versions are now strictly semver.
|
29
|
+
The PATCH version may be ahead of the upstream.
|
30
|
+
|
31
|
+
Framework version: Bootstrap **v3.3.2**.
|
32
|
+
|
33
|
+
## 3.3.2.1
|
34
|
+
|
35
|
+
* Fix glyphicons regression (revert 443d5b49eac84aec1cb2f8ea173554327bfc8c14)
|
36
|
+
|
37
|
+
## 3.3.2.0
|
38
|
+
|
39
|
+
* Autoprefixer is now required, and `autoprefixer-rails` is now a dependency for the ruby gem. [#824](https://github.com/twbs/bootstrap-sass/issues/824)
|
40
|
+
* Minimum precision reduced from 10 to 8 [#821](https://github.com/twbs/bootstrap-sass/issues/821)
|
41
|
+
* Requiring bootstrap JS from npm now works [#812](https://github.com/twbs/bootstrap-sass/issues/812)
|
42
|
+
* Fix Sass 3.4.x + IE10 compatibility issue [#803](https://github.com/twbs/bootstrap-sass/issues/803)
|
43
|
+
* Provide minified JS bundle [#777](https://github.com/twbs/bootstrap-sass/issues/777)
|
44
|
+
* Bower package is now at bootstrap-sass [#813](https://github.com/twbs/bootstrap-sass/issues/813)
|
45
|
+
|
46
|
+
|
3
47
|
## 3.3.1.0
|
4
48
|
|
5
49
|
* Variables override template at templates/project/_bootstrap-variables.sass
|
data/CONTRIBUTING.md
CHANGED
@@ -57,7 +57,11 @@ Example:
|
|
57
57
|
|
58
58
|
**We will not accept pull requests that modify the SCSS beyond fixing bugs caused by *our* code!**
|
59
59
|
|
60
|
-
|
60
|
+
We use a [converter script][converter-readme] to automatically convert upstream bootstrap, written in LESS, to Sass.
|
61
|
+
|
62
|
+
Issues related to styles or javascript but unrelated to the conversion process should go to [twbs/bootstrap][upstream].
|
63
|
+
|
64
|
+
Pull requests that fix bugs caused by our code should not modify the SCSS directly, but should patch the converter instead.
|
61
65
|
|
62
66
|
Good pull requests - patches, improvements, new features - are a fantastic
|
63
67
|
help. They should remain focused in scope and avoid containing unrelated
|
@@ -77,3 +81,6 @@ Please **do not** derail or troll issues. Keep the
|
|
77
81
|
discussion on topic and respect the opinions of others.
|
78
82
|
|
79
83
|
*props [html5-boilerplate](https://github.com/h5bp/html5-boilerplate/blob/master/CONTRIBUTING.md)*
|
84
|
+
|
85
|
+
[upstream]: https://github.com/twbs/bootstrap
|
86
|
+
[converter-readme]: https://github.com/twbs/bootstrap-sass/blob/master/README.md#upstream-converter
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
-
# Bootstrap for Sass
|
1
|
+
# Bootstrap for Sass
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/bootstrap-sass.svg)](http://badge.fury.io/rb/bootstrap-sass)
|
3
|
+
[![npm version](https://img.shields.io/npm/v/bootstrap-sass.svg?style=flat)](https://www.npmjs.com/package/bootstrap-sass)
|
4
|
+
[![Bower Version](https://badge.fury.io/bo/bootstrap-sass.svg)](http://badge.fury.io/bo/bootstrap-sass)
|
5
|
+
[![Build Status](https://img.shields.io/travis/twbs/bootstrap-sass.svg)](https://travis-ci.org/twbs/bootstrap-sass)
|
2
6
|
|
3
|
-
`bootstrap-sass` is a Sass-powered version of [Bootstrap](
|
7
|
+
`bootstrap-sass` is a Sass-powered version of [Bootstrap](https://github.com/twbs/bootstrap) 3, ready to drop right into your Sass powered applications.
|
8
|
+
|
9
|
+
This is Bootstrap 3. For Bootstrap 4 use the [Bootstrap Ruby gem](http://github.com/twbs/bootstrap-rubygem) if you use Ruby, and the [main repo](http://github.com/twbs/bootstrap) otherwise.
|
4
10
|
|
5
11
|
## Installation
|
6
12
|
|
@@ -17,20 +23,13 @@ Please see the appropriate guide for your environment of choice:
|
|
17
23
|
In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default.
|
18
24
|
|
19
25
|
```ruby
|
20
|
-
gem 'bootstrap-sass', '~> 3.3.
|
26
|
+
gem 'bootstrap-sass', '~> 3.3.6'
|
21
27
|
gem 'sass-rails', '>= 3.2'
|
22
28
|
```
|
23
29
|
|
24
|
-
It is also recommended to use [Autoprefixer](https://github.com/ai/autoprefixer-rails) with Bootstrap
|
25
|
-
to add browser vendor prefixes automatically. Simply add the gem:
|
26
|
-
|
27
|
-
```ruby
|
28
|
-
gem 'autoprefixer-rails'
|
29
|
-
```
|
30
|
-
|
31
30
|
`bundle install` and restart your server to make the files available through the pipeline.
|
32
31
|
|
33
|
-
Import Bootstrap styles in `app/assets/stylesheets/application.
|
32
|
+
Import Bootstrap styles in `app/assets/stylesheets/application.scss`:
|
34
33
|
|
35
34
|
```scss
|
36
35
|
// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
|
@@ -40,14 +39,16 @@ Import Bootstrap styles in `app/assets/stylesheets/application.css.scss`:
|
|
40
39
|
|
41
40
|
`bootstrap-sprockets` must be imported before `bootstrap` for the icon fonts to work.
|
42
41
|
|
43
|
-
Make sure the file has `.
|
44
|
-
it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so
|
42
|
+
Make sure the file has `.scss` extension (or `.sass` for Sass syntax). If you have just generated a new Rails app,
|
43
|
+
it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so rename it:
|
45
44
|
|
46
45
|
```console
|
47
|
-
$
|
46
|
+
$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
|
48
47
|
```
|
49
48
|
|
50
|
-
|
49
|
+
Then, remove all the `*= require_self` and `*= require_tree .` statements from the sass file. Instead, use `@import` to import Sass files.
|
50
|
+
|
51
|
+
Do not use `*= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
|
51
52
|
|
52
53
|
Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
|
53
54
|
|
@@ -56,6 +57,11 @@ Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
|
|
56
57
|
//= require bootstrap-sprockets
|
57
58
|
```
|
58
59
|
|
60
|
+
`bootstrap-sprockets` and `bootstrap` [should not both be included](https://github.com/twbs/bootstrap-sass/issues/829#issuecomment-75153827) in `application.js`.
|
61
|
+
|
62
|
+
`bootstrap-sprockets` provides individual Bootstrap Javascript files (`alert.js` or `dropdown.js`, for example), while
|
63
|
+
`bootstrap` provides a concatenated file containing all Bootstrap Javascripts.
|
64
|
+
|
59
65
|
#### Bower with Rails
|
60
66
|
|
61
67
|
When using [bootstrap-sass Bower package](#c-bower) instead of the gem in Rails, configure assets in `config/application.rb`:
|
@@ -67,12 +73,12 @@ root.join('vendor', 'assets', 'bower_components').to_s.tap do |bower_path|
|
|
67
73
|
config.assets.paths << bower_path
|
68
74
|
end
|
69
75
|
# Precompile Bootstrap fonts
|
70
|
-
config.assets.precompile << %r(bootstrap-sass/assets/fonts/bootstrap/[\w-]+\.(?:eot|svg|ttf|
|
76
|
+
config.assets.precompile << %r(bootstrap-sass/assets/fonts/bootstrap/[\w-]+\.(?:eot|svg|ttf|woff2?)$)
|
71
77
|
# Minimum Sass number precision required by bootstrap-sass
|
72
|
-
::Sass::Script::Number.precision = [
|
78
|
+
::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
|
73
79
|
```
|
74
80
|
|
75
|
-
Replace Bootstrap `@import` statements in `application.
|
81
|
+
Replace Bootstrap `@import` statements in `application.scss` with:
|
76
82
|
|
77
83
|
```scss
|
78
84
|
$icon-font-path: "bootstrap-sass/assets/fonts/bootstrap/";
|
@@ -96,21 +102,25 @@ bootstrap-sass is no longer compatible with Rails 3. The latest version of boots
|
|
96
102
|
|
97
103
|
### b. Compass without Rails
|
98
104
|
|
99
|
-
Install the gem
|
100
|
-
|
101
|
-
|
105
|
+
Install the gem:
|
106
|
+
|
107
|
+
```console
|
108
|
+
$ gem install bootstrap-sass
|
102
109
|
```
|
103
110
|
|
104
111
|
If you have an existing Compass project:
|
105
112
|
|
106
|
-
|
107
|
-
# config.rb:
|
108
|
-
require 'bootstrap-sass'
|
109
|
-
```
|
113
|
+
1. Require `bootstrap-sass` in `config.rb`:
|
110
114
|
|
111
|
-
```
|
112
|
-
|
113
|
-
```
|
115
|
+
```ruby
|
116
|
+
require 'bootstrap-sass'
|
117
|
+
```
|
118
|
+
|
119
|
+
2. Install Bootstrap with:
|
120
|
+
|
121
|
+
```console
|
122
|
+
$ bundle exec compass install bootstrap -r bootstrap-sass
|
123
|
+
```
|
114
124
|
|
115
125
|
If you are creating a new Compass project, you can generate it with bootstrap-sass support:
|
116
126
|
|
@@ -134,24 +144,22 @@ If this happens, change the import order so that Compass mixins are loaded later
|
|
134
144
|
|
135
145
|
### c. Bower
|
136
146
|
|
137
|
-
|
147
|
+
bootstrap-sass Bower package is compatible with node-sass 3.2.0+. You can install it with:
|
138
148
|
|
139
149
|
```console
|
140
|
-
$ bower install bootstrap-sass
|
150
|
+
$ bower install bootstrap-sass
|
141
151
|
```
|
142
152
|
|
143
|
-
`bootstrap-sass` is taken so make sure you use the command above.
|
144
|
-
|
145
153
|
Sass, JS, and all other assets are located at [assets](/assets).
|
146
154
|
|
147
|
-
By default, `bower.json` main field list only the main `
|
155
|
+
By default, `bower.json` main field list only the main `_bootstrap.scss` and all the static assets (fonts and JS).
|
148
156
|
This is compatible by default with asset managers such as [wiredep](https://github.com/taptapship/wiredep).
|
149
157
|
|
150
158
|
#### Node.js Mincer
|
151
159
|
|
152
|
-
If you use [mincer][mincer] with node-sass, import bootstrap
|
160
|
+
If you use [mincer][mincer] with node-sass, import bootstrap like so:
|
153
161
|
|
154
|
-
In `application.css.ejs.scss` (NB **.css.ejs.
|
162
|
+
In `application.css.ejs.scss` (NB **.css.ejs.scss**):
|
155
163
|
|
156
164
|
```scss
|
157
165
|
// Import mincer asset paths helper integration
|
@@ -185,21 +193,18 @@ In the application Sass file, replace `@import 'bootstrap'` with:
|
|
185
193
|
|
186
194
|
#### Sass: Number Precision
|
187
195
|
|
188
|
-
bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of
|
196
|
+
bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 8 (default is 5).
|
189
197
|
|
190
198
|
Precision is set for Rails and Compass automatically.
|
191
199
|
When using ruby Sass compiler standalone or with the Bower version you can set it with:
|
192
200
|
|
193
201
|
```ruby
|
194
|
-
::Sass::Script::Number.precision = [
|
202
|
+
::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
|
195
203
|
```
|
196
204
|
|
197
|
-
Note that libsass and node-sass do not currently support the precision option, due to an open bug ([bug #364](https://github.com/sass/libsass/issues/364)) in libsass.
|
198
|
-
|
199
|
-
|
200
205
|
#### Sass: Autoprefixer
|
201
206
|
|
202
|
-
|
207
|
+
Bootstrap requires the use of [Autoprefixer][autoprefixer].
|
203
208
|
[Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](http://caniuse.com/).
|
204
209
|
|
205
210
|
#### JavaScript
|
@@ -247,7 +252,7 @@ When using bootstrap-sass with Compass, Sprockets, or Mincer, you **must** impor
|
|
247
252
|
|
248
253
|
### Sass
|
249
254
|
|
250
|
-
Import Bootstrap into a Sass file (for example, application.
|
255
|
+
Import Bootstrap into a Sass file (for example, application.scss) to get all of Bootstrap's styles, mixins and variables!
|
251
256
|
|
252
257
|
```scss
|
253
258
|
@import "bootstrap";
|
@@ -271,7 +276,22 @@ $navbar-default-color: $light-orange;
|
|
271
276
|
|
272
277
|
## Version
|
273
278
|
|
274
|
-
|
279
|
+
Bootstrap for Sass version may differ from the upstream version in the last number, known as
|
280
|
+
[PATCH](http://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
|
281
|
+
This happens when we need to release Sass-specific changes.
|
282
|
+
|
283
|
+
Before v3.3.2, Bootstrap for Sass version used to reflect the upstream version, with an additional number for
|
284
|
+
Sass-specific changes. This was changed due to Bower and npm compatibility issues.
|
285
|
+
|
286
|
+
The upstream versions vs the Bootstrap for Sass versions are:
|
287
|
+
|
288
|
+
| Upstream | Sass |
|
289
|
+
|---------:|--------:|
|
290
|
+
| 3.3.6 | 3.3.6 |
|
291
|
+
| 3.3.5 | 3.3.5 |
|
292
|
+
| 3.3.4 | 3.3.4 |
|
293
|
+
| 3.3.2 | 3.3.3 |
|
294
|
+
| <= 3.3.1 | 3.3.1.x |
|
275
295
|
|
276
296
|
Always refer to [CHANGELOG.md](/CHANGELOG.md) when upgrading.
|
277
297
|
|
@@ -301,7 +321,7 @@ To convert a specific branch or version, pass the branch name or the commit hash
|
|
301
321
|
The latest converter script is located [here][converter] and does the following:
|
302
322
|
|
303
323
|
* Converts upstream bootstrap LESS files to its matching SCSS file.
|
304
|
-
* Copies all upstream JavaScript into `assets/javascripts/bootstrap`,
|
324
|
+
* Copies all upstream JavaScript into `assets/javascripts/bootstrap`, a Sprockets manifest at `assets/javascripts/bootstrap-sprockets.js`, and a concatenation at `assets/javascripts/bootstrap.js`.
|
305
325
|
* Copies all upstream font files into `assets/fonts/bootstrap`.
|
306
326
|
* Sets `Bootstrap::BOOTSTRAP_SHA` in [version.rb][version] to the branch sha.
|
307
327
|
|
@@ -322,15 +342,15 @@ and a [significant number of other contributors][contrib].
|
|
322
342
|
|
323
343
|
## You're in good company
|
324
344
|
bootstrap-sass is used to build some awesome projects all over the web, including
|
325
|
-
[Diaspora](
|
326
|
-
Michael Hartl's [Rails Tutorial](
|
327
|
-
[kandan](http://
|
345
|
+
[Diaspora](https://diasporafoundation.org/), [rails_admin](https://github.com/sferik/rails_admin),
|
346
|
+
Michael Hartl's [Rails Tutorial](https://www.railstutorial.org/), [gitlabhq](http://gitlabhq.com/) and
|
347
|
+
[kandan](http://getkandan.com/).
|
328
348
|
|
329
349
|
[converter]: https://github.com/twbs/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb
|
330
350
|
[version]: https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb
|
331
351
|
[contrib]: https://github.com/twbs/bootstrap-sass/graphs/contributors
|
332
352
|
[antirequire]: https://github.com/twbs/bootstrap-sass/issues/79#issuecomment-4428595
|
333
353
|
[jsdocs]: http://getbootstrap.com/javascript/#transitions
|
334
|
-
[sass-precision]: http://sass-lang.com/documentation/Sass/Script/Number.html#precision-class_method
|
354
|
+
[sass-precision]: http://sass-lang.com/documentation/Sass/Script/Value/Number.html#precision%3D-class_method
|
335
355
|
[mincer]: https://github.com/nodeca/mincer
|
336
|
-
[autoprefixer]: https://github.com/
|
356
|
+
[autoprefixer]: https://github.com/postcss/autoprefixer
|
data/Rakefile
CHANGED
@@ -4,9 +4,40 @@ $:.unshift(lib_path) unless $:.include?(lib_path)
|
|
4
4
|
load './tasks/bower.rake'
|
5
5
|
|
6
6
|
require 'rake/testtask'
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
Rake::TestTask.new do |t|
|
8
|
+
t.libs << 'test'
|
9
|
+
t.test_files = FileList['test/**/*_test.rb']
|
10
|
+
t.verbose = true
|
11
|
+
end
|
12
|
+
|
13
|
+
desc 'Test all Gemfiles from test/*.gemfile'
|
14
|
+
task :test_all_gemfiles do
|
15
|
+
require 'term/ansicolor'
|
16
|
+
require 'pty'
|
17
|
+
require 'shellwords'
|
18
|
+
cmd = 'bundle install --quiet && bundle exec rake --trace'
|
19
|
+
statuses = Dir.glob('./test/gemfiles/*{[!.lock]}').map do |gemfile|
|
20
|
+
env = {'BUNDLE_GEMFILE' => gemfile}
|
21
|
+
cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})"
|
22
|
+
$stderr.puts Term::ANSIColor.cyan("Testing\n#{cmd_with_env}")
|
23
|
+
PTY.spawn(env, cmd) do |r, _w, pid|
|
24
|
+
begin
|
25
|
+
r.each_line { |l| puts l }
|
26
|
+
rescue Errno::EIO
|
27
|
+
# Errno:EIO error means that the process has finished giving output.
|
28
|
+
ensure
|
29
|
+
::Process.wait pid
|
30
|
+
end
|
31
|
+
end
|
32
|
+
[$? && $?.exitstatus == 0, cmd_with_env]
|
33
|
+
end
|
34
|
+
failed_cmds = statuses.reject(&:first).map { |(_status, cmd_with_env)| cmd_with_env }
|
35
|
+
if failed_cmds.empty?
|
36
|
+
$stderr.puts Term::ANSIColor.green('Tests pass with all gemfiles')
|
37
|
+
else
|
38
|
+
$stderr.puts Term::ANSIColor.red("Failing (#{failed_cmds.size} / #{statuses.size})\n#{failed_cmds * "\n"}")
|
39
|
+
exit 1
|
40
|
+
end
|
10
41
|
end
|
11
42
|
|
12
43
|
desc 'Dumps output to a CSS file for testing'
|
@@ -40,7 +71,7 @@ task :compile, :css_path do |t, args|
|
|
40
71
|
css_path = args.with_defaults(css_path: 'tmp')[:css_path]
|
41
72
|
puts Term::ANSIColor.bold "Compiling SCSS in #{path}"
|
42
73
|
Dir.mkdir(css_path) unless File.directory?(css_path)
|
43
|
-
%w(
|
74
|
+
%w(_bootstrap bootstrap/_theme).each do |file|
|
44
75
|
save_path = "#{css_path}/#{file.sub(/(^|\/)?_+/, '\1').sub('/', '-')}.css"
|
45
76
|
puts Term::ANSIColor.cyan(" #{save_path}") + '...'
|
46
77
|
engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
|
@@ -49,4 +80,15 @@ task :compile, :css_path do |t, args|
|
|
49
80
|
end
|
50
81
|
end
|
51
82
|
|
83
|
+
desc 'Start a dummy (test) Rails app server'
|
84
|
+
task :dummy_rails do
|
85
|
+
require 'rack'
|
86
|
+
require 'term/ansicolor'
|
87
|
+
port = ENV['PORT'] || 9292
|
88
|
+
puts %Q(Starting on #{Term::ANSIColor.cyan "http://localhost:#{port}"})
|
89
|
+
Rack::Server.start(
|
90
|
+
config: 'test/dummy_rails/config.ru',
|
91
|
+
Port: port)
|
92
|
+
end
|
93
|
+
|
52
94
|
task default: :test
|
Binary file
|