bootstrap-sass 3.3.5 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +8 -12
- data/CHANGELOG.md +20 -0
- data/Gemfile +1 -4
- data/LICENSE +2 -1
- data/README.md +79 -74
- data/Rakefile +46 -11
- data/assets/javascripts/bootstrap/affix.js +7 -5
- data/assets/javascripts/bootstrap/alert.js +6 -5
- data/assets/javascripts/bootstrap/button.js +14 -9
- data/assets/javascripts/bootstrap/carousel.js +16 -7
- data/assets/javascripts/bootstrap/collapse.js +7 -6
- data/assets/javascripts/bootstrap/dropdown.js +7 -7
- data/assets/javascripts/bootstrap/modal.js +44 -23
- data/assets/javascripts/bootstrap/popover.js +25 -10
- data/assets/javascripts/bootstrap/scrollspy.js +4 -4
- data/assets/javascripts/bootstrap/tab.js +10 -10
- data/assets/javascripts/bootstrap/tooltip.js +177 -14
- data/assets/javascripts/bootstrap/transition.js +5 -5
- data/assets/javascripts/bootstrap-sprockets.js +2 -2
- data/assets/javascripts/bootstrap.js +326 -109
- data/assets/javascripts/bootstrap.min.js +3 -4
- data/assets/stylesheets/_bootstrap-mincer.scss +2 -2
- data/assets/stylesheets/_bootstrap.scss +2 -2
- data/assets/stylesheets/bootstrap/_alerts.scss +3 -3
- data/assets/stylesheets/bootstrap/_badges.scss +3 -3
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +3 -1
- data/assets/stylesheets/bootstrap/_button-groups.scss +8 -8
- data/assets/stylesheets/bootstrap/_buttons.scss +4 -4
- data/assets/stylesheets/bootstrap/_carousel.scss +33 -31
- data/assets/stylesheets/bootstrap/_close.scss +1 -0
- data/assets/stylesheets/bootstrap/_code.scss +3 -3
- data/assets/stylesheets/bootstrap/_component-animations.scss +1 -0
- data/assets/stylesheets/bootstrap/_dropdowns.scss +20 -23
- data/assets/stylesheets/bootstrap/_forms.scss +56 -60
- data/assets/stylesheets/bootstrap/_glyphicons.scss +11 -11
- data/assets/stylesheets/bootstrap/_grid.scss +10 -0
- data/assets/stylesheets/bootstrap/_input-groups.scss +9 -5
- data/assets/stylesheets/bootstrap/_jumbotron.scss +5 -3
- data/assets/stylesheets/bootstrap/_labels.scss +1 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +30 -32
- data/assets/stylesheets/bootstrap/_media.scss +1 -1
- data/assets/stylesheets/bootstrap/_modals.scss +8 -8
- data/assets/stylesheets/bootstrap/_navbar.scss +75 -81
- data/assets/stylesheets/bootstrap/_navs.scss +4 -4
- data/assets/stylesheets/bootstrap/_normalize.scss +5 -2
- data/assets/stylesheets/bootstrap/_pager.scss +2 -2
- data/assets/stylesheets/bootstrap/_pagination.scss +13 -16
- data/assets/stylesheets/bootstrap/_panels.scss +5 -5
- data/assets/stylesheets/bootstrap/_popovers.scss +47 -52
- data/assets/stylesheets/bootstrap/_print.scss +90 -92
- data/assets/stylesheets/bootstrap/_progress-bars.scss +3 -3
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +2 -2
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +3 -3
- data/assets/stylesheets/bootstrap/_scaffolding.scss +7 -7
- data/assets/stylesheets/bootstrap/_tables.scss +23 -23
- data/assets/stylesheets/bootstrap/_theme.scss +21 -17
- data/assets/stylesheets/bootstrap/_thumbnails.scss +1 -1
- data/assets/stylesheets/bootstrap/_tooltip.scss +38 -27
- data/assets/stylesheets/bootstrap/_type.scss +11 -11
- data/assets/stylesheets/bootstrap/_variables.scss +9 -7
- data/assets/stylesheets/bootstrap/_wells.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_alerts.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +7 -14
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +6 -8
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +7 -7
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_image.scss +5 -10
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +2 -3
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -4
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +3 -3
- data/bootstrap-sass.gemspec +10 -9
- data/bower.json +4 -3
- data/composer.json +2 -2
- data/eyeglass-exports.js +7 -0
- data/lib/bootstrap-sass/engine.rb +6 -1
- data/lib/bootstrap-sass/version.rb +2 -2
- data/lib/bootstrap-sass.rb +17 -10
- data/package-lock.json +1611 -0
- data/package.json +20 -6
- data/sache.json +1 -1
- data/tasks/converter/less_conversion.rb +12 -8
- data/tasks/converter/network.rb +2 -2
- data/templates/project/_bootstrap-variables.sass +10 -8
- data/test/compilation_test.rb +24 -12
- data/test/dummy_rails/config/application.rb +2 -1
- data/test/dummy_rails/config/boot.rb +1 -1
- data/test/dummy_sass_only/Gemfile +1 -1
- data/test/dummy_sass_only/compile.rb +14 -7
- data/test/dummy_sass_only/import_all.scss +2 -0
- data/test/gemfiles/default.gemfile +3 -0
- data/test/node_mincer_test.rb +2 -3
- data/test/node_sass_compile_test.sh +4 -3
- data/test/sass_test.rb +10 -7
- data/test/sprockets_rails_test.rb +12 -8
- data/test/support/dummy_rails_integration.rb +1 -1
- data/test/support/reporting.rb +10 -0
- data/test/test_helper.rb +3 -2
- metadata +37 -28
- data/test/compass_test.rb +0 -9
- data/test/dummy_sass_only/import_all.sass +0 -2
- data/test/gemfiles/sass_3_2.gemfile +0 -6
- data/test/gemfiles/sass_3_3.gemfile +0 -6
- data/test/gemfiles/sass_3_4.gemfile +0 -7
- data/test/gemfiles/sass_head.gemfile +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 58feea8410ac26aa16a8887d49c39915f01053fac4d547549f22ad09cca903a2
|
|
4
|
+
data.tar.gz: ab2888314daa99c23c67034bb52e89cab7ad5c80fc94cafa2aa000964e6ac4a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 524b345c929bbd2013145b9d0efff1e9a9ae40dd92bf10084bbed4d00f1cd4a629258d337d497131be7d386badf3a512951a82670a6e6e1fc82ff34a1d6002ca
|
|
7
|
+
data.tar.gz: cf05215a71378dcd0f25293cd32095d947b7b748113c3e89c1d65c6f5030dc50ad6b5ecc2817695f8d530ba0ec7ef388e819c4b232c68ad2d03a564718896051
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
+
dist: xenial
|
|
1
2
|
language: ruby
|
|
3
|
+
cache: bundler
|
|
4
|
+
bundler_args: --path ../../vendor/bundle --without debug
|
|
2
5
|
rvm:
|
|
3
|
-
- 2.1
|
|
6
|
+
- 2.5.1
|
|
4
7
|
gemfile:
|
|
5
|
-
- test/gemfiles/
|
|
6
|
-
- test/gemfiles/sass_3_3.gemfile
|
|
7
|
-
- test/gemfiles/sass_3_4.gemfile
|
|
8
|
-
- test/gemfiles/sass_head.gemfile
|
|
8
|
+
- test/gemfiles/default.gemfile
|
|
9
9
|
before_install:
|
|
10
|
+
- "nvm install stable"
|
|
10
11
|
- "npm install"
|
|
11
|
-
matrix:
|
|
12
|
-
allow_failures:
|
|
13
|
-
# rbx has issues https://github.com/rubinius/rubinius/issues/3060
|
|
14
|
-
- rvm: rbx-2
|
|
15
|
-
- gemfile: test/gemfiles/sass_head.gemfile
|
|
16
12
|
notifications:
|
|
17
13
|
slack: heybb:3n88HHilXn76ji9vV4gL819Y
|
|
18
14
|
env:
|
|
19
15
|
global:
|
|
20
16
|
- VERBOSE=1
|
|
21
17
|
script:
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
bundle exec rake && bash test/*.sh
|
|
19
|
+
sudo: false
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.0
|
|
4
|
+
|
|
5
|
+
* Bootstrap rubygem now depends on SassC instead of Sass.
|
|
6
|
+
* Compass no longer supported.
|
|
7
|
+
|
|
8
|
+
## 3.3.7
|
|
9
|
+
|
|
10
|
+
* Allows jQuery 3.x in bower.json. [#1048](https://github.com/twbs/bootstrap-sass/issues/1048)
|
|
11
|
+
* Adds the `style` and `sass` fields to package.json. [#1045](https://github.com/twbs/bootstrap-sass/issues/1045)
|
|
12
|
+
* Adds Eyeglass support. [#1007](https://github.com/twbs/bootstrap-sass/pull/1007)
|
|
13
|
+
|
|
14
|
+
## 3.3.6
|
|
15
|
+
|
|
16
|
+
* Bumps Sass dependency to 3.3.4+ to avoid compatibility issues with @at-root.
|
|
17
|
+
* Bumps node-sass dependency to ~3.4.2 for Node.js v5 compatibility. [#986](https://github.com/twbs/bootstrap-sass/issues/986)
|
|
18
|
+
* Fixes breadcrumb content issues on libsass. [#919](https://github.com/twbs/bootstrap-sass/issues/919)
|
|
19
|
+
* Fixes a Rails 5 compatibility issue. [#965](https://github.com/twbs/bootstrap-sass/pull/965)
|
|
20
|
+
|
|
21
|
+
Framework version: Bootstrap **v3.3.6**
|
|
22
|
+
|
|
3
23
|
## 3.3.5
|
|
4
24
|
|
|
5
25
|
Fix for standalone Compass extension compatibility. [#914](https://github.com/twbs/bootstrap-sass/issues/914)
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2011-2016 Twitter, Inc
|
|
4
|
+
Copyright (c) 2011-2016 The Bootstrap Authors
|
|
4
5
|
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
7
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
# Bootstrap for Sass
|
|
1
|
+
# Bootstrap 3 for Sass
|
|
2
2
|
[](http://badge.fury.io/rb/bootstrap-sass)
|
|
3
3
|
[](https://www.npmjs.com/package/bootstrap-sass)
|
|
4
4
|
[](http://badge.fury.io/bo/bootstrap-sass)
|
|
5
|
-
[](https://travis-ci.org/twbs/bootstrap-sass)
|
|
6
6
|
|
|
7
|
-
`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 rubygem](https://github.com/twbs/bootstrap-rubygem) if you use Ruby, and the [main repo](https://github.com/twbs/bootstrap) otherwise.
|
|
8
10
|
|
|
9
11
|
## Installation
|
|
10
12
|
|
|
11
13
|
Please see the appropriate guide for your environment of choice:
|
|
12
14
|
|
|
13
15
|
* [Ruby on Rails](#a-ruby-on-rails).
|
|
14
|
-
* [
|
|
15
|
-
* [
|
|
16
|
+
* [Bower](#b-bower).
|
|
17
|
+
* [npm / Node.js](#c-npm--nodejs).
|
|
16
18
|
|
|
17
19
|
### a. Ruby on Rails
|
|
18
20
|
|
|
@@ -21,8 +23,8 @@ Please see the appropriate guide for your environment of choice:
|
|
|
21
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.
|
|
22
24
|
|
|
23
25
|
```ruby
|
|
24
|
-
gem 'bootstrap-sass', '~> 3.
|
|
25
|
-
gem '
|
|
26
|
+
gem 'bootstrap-sass', '~> 3.4.1'
|
|
27
|
+
gem 'sassc-rails', '>= 2.1.0'
|
|
26
28
|
```
|
|
27
29
|
|
|
28
30
|
`bundle install` and restart your server to make the files available through the pipeline.
|
|
@@ -44,9 +46,20 @@ it may come with a `.css` file instead. If this file exists, it will be served i
|
|
|
44
46
|
$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
|
|
45
47
|
```
|
|
46
48
|
|
|
47
|
-
Then, remove all the
|
|
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.
|
|
52
|
+
|
|
53
|
+
Bootstrap JavaScript depends on jQuery.
|
|
54
|
+
If you're using Rails 5.1+, add the `jquery-rails` gem to your Gemfile:
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
```ruby
|
|
57
|
+
gem 'jquery-rails'
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```console
|
|
61
|
+
$ bundle install
|
|
62
|
+
```
|
|
50
63
|
|
|
51
64
|
Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
|
|
52
65
|
|
|
@@ -98,49 +111,7 @@ Please make sure `sprockets-rails` is at least v2.1.4.
|
|
|
98
111
|
|
|
99
112
|
bootstrap-sass is no longer compatible with Rails 3. The latest version of bootstrap-sass compatible with Rails 3.2 is v3.1.1.0.
|
|
100
113
|
|
|
101
|
-
### b.
|
|
102
|
-
|
|
103
|
-
Install the gem:
|
|
104
|
-
|
|
105
|
-
```console
|
|
106
|
-
$ gem install bootstrap-sass
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
If you have an existing Compass project:
|
|
110
|
-
|
|
111
|
-
1. Require `bootstrap-sass` in `config.rb`:
|
|
112
|
-
|
|
113
|
-
```ruby
|
|
114
|
-
require 'bootstrap-sass'
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
2. Install Bootstrap with:
|
|
118
|
-
|
|
119
|
-
```console
|
|
120
|
-
$ bundle exec compass install bootstrap -r bootstrap-sass
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
If you are creating a new Compass project, you can generate it with bootstrap-sass support:
|
|
124
|
-
|
|
125
|
-
```console
|
|
126
|
-
$ bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
or, alternatively, if you're not using a Gemfile for your dependencies:
|
|
130
|
-
|
|
131
|
-
```console
|
|
132
|
-
$ compass create my-new-project -r bootstrap-sass --using bootstrap
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
This will create a new Compass project with the following files in it:
|
|
136
|
-
|
|
137
|
-
* [styles.sass](/templates/project/styles.sass) - main project Sass file, imports Bootstrap and variables.
|
|
138
|
-
* [_bootstrap-variables.sass](/templates/project/_bootstrap-variables.sass) - all of Bootstrap variables, override them here.
|
|
139
|
-
|
|
140
|
-
Some bootstrap-sass mixins may conflict with the Compass ones.
|
|
141
|
-
If this happens, change the import order so that Compass mixins are loaded later.
|
|
142
|
-
|
|
143
|
-
### c. Bower
|
|
114
|
+
### b. Bower
|
|
144
115
|
|
|
145
116
|
bootstrap-sass Bower package is compatible with node-sass 3.2.0+. You can install it with:
|
|
146
117
|
|
|
@@ -155,7 +126,7 @@ This is compatible by default with asset managers such as [wiredep](https://gith
|
|
|
155
126
|
|
|
156
127
|
#### Node.js Mincer
|
|
157
128
|
|
|
158
|
-
If you use [mincer][mincer] with node-sass, import
|
|
129
|
+
If you use [mincer][mincer] with node-sass, import Bootstrap like so:
|
|
159
130
|
|
|
160
131
|
In `application.css.ejs.scss` (NB **.css.ejs.scss**):
|
|
161
132
|
|
|
@@ -173,10 +144,15 @@ In `application.js`:
|
|
|
173
144
|
|
|
174
145
|
See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer.
|
|
175
146
|
|
|
147
|
+
### c. npm / Node.js
|
|
148
|
+
```console
|
|
149
|
+
$ npm install bootstrap-sass
|
|
150
|
+
```
|
|
176
151
|
|
|
177
|
-
### Configuration
|
|
178
152
|
|
|
179
|
-
|
|
153
|
+
## Configuration
|
|
154
|
+
|
|
155
|
+
### Sass
|
|
180
156
|
|
|
181
157
|
By default all of Bootstrap is imported.
|
|
182
158
|
|
|
@@ -189,25 +165,39 @@ In the application Sass file, replace `@import 'bootstrap'` with:
|
|
|
189
165
|
@import 'bootstrap-custom';
|
|
190
166
|
```
|
|
191
167
|
|
|
192
|
-
|
|
168
|
+
### Sass: Number Precision
|
|
193
169
|
|
|
194
170
|
bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 8 (default is 5).
|
|
195
171
|
|
|
196
|
-
Precision is set for
|
|
197
|
-
When using
|
|
172
|
+
Precision is set for Ruby automatically when using the `sassc-rails` gem.
|
|
173
|
+
When using the npm or Bower version with Ruby, you can set it with:
|
|
198
174
|
|
|
199
175
|
```ruby
|
|
200
176
|
::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
|
|
201
177
|
```
|
|
202
178
|
|
|
203
|
-
|
|
179
|
+
### Sass: Autoprefixer
|
|
204
180
|
|
|
205
181
|
Bootstrap requires the use of [Autoprefixer][autoprefixer].
|
|
206
|
-
[Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](
|
|
182
|
+
[Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](https://caniuse.com/).
|
|
183
|
+
|
|
184
|
+
To match [upstream Bootstrap's level of browser compatibility](https://getbootstrap.com/getting-started/#support), set Autoprefixer's `browsers` option to:
|
|
185
|
+
```json
|
|
186
|
+
[
|
|
187
|
+
"Android 2.3",
|
|
188
|
+
"Android >= 4",
|
|
189
|
+
"Chrome >= 20",
|
|
190
|
+
"Firefox >= 24",
|
|
191
|
+
"Explorer >= 8",
|
|
192
|
+
"iOS >= 6",
|
|
193
|
+
"Opera >= 12",
|
|
194
|
+
"Safari >= 6"
|
|
195
|
+
]
|
|
196
|
+
```
|
|
207
197
|
|
|
208
|
-
|
|
198
|
+
### JavaScript
|
|
209
199
|
|
|
210
|
-
[`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap JavaScript,
|
|
200
|
+
[`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap's JavaScript,
|
|
211
201
|
concatenated in the [correct order](/assets/javascripts/bootstrap-sprockets.js).
|
|
212
202
|
|
|
213
203
|
|
|
@@ -229,7 +219,7 @@ You can check dependencies in the [Bootstrap JS documentation][jsdocs].
|
|
|
229
219
|
//= require bootstrap/dropdown
|
|
230
220
|
```
|
|
231
221
|
|
|
232
|
-
|
|
222
|
+
### Fonts
|
|
233
223
|
|
|
234
224
|
The fonts are referenced as:
|
|
235
225
|
|
|
@@ -250,19 +240,19 @@ When using bootstrap-sass with Compass, Sprockets, or Mincer, you **must** impor
|
|
|
250
240
|
|
|
251
241
|
### Sass
|
|
252
242
|
|
|
253
|
-
Import Bootstrap into a Sass file (for example, application.scss) to get all of Bootstrap's styles, mixins and variables!
|
|
243
|
+
Import Bootstrap into a Sass file (for example, `application.scss`) to get all of Bootstrap's styles, mixins and variables!
|
|
254
244
|
|
|
255
245
|
```scss
|
|
256
246
|
@import "bootstrap";
|
|
257
247
|
```
|
|
258
248
|
|
|
259
|
-
You can also include optional
|
|
249
|
+
You can also include optional Bootstrap theme:
|
|
260
250
|
|
|
261
251
|
```scss
|
|
262
252
|
@import "bootstrap/theme";
|
|
263
253
|
```
|
|
264
254
|
|
|
265
|
-
The full list of
|
|
255
|
+
The full list of Bootstrap variables can be found [here](https://getbootstrap.com/customize/#less-variables). You can override these by simply redefining the variable before the `@import` directive, e.g.:
|
|
266
256
|
|
|
267
257
|
```scss
|
|
268
258
|
$navbar-default-bg: #312312;
|
|
@@ -272,10 +262,26 @@ $navbar-default-color: $light-orange;
|
|
|
272
262
|
@import "bootstrap";
|
|
273
263
|
```
|
|
274
264
|
|
|
265
|
+
### Eyeglass
|
|
266
|
+
|
|
267
|
+
Bootstrap is available as an [Eyeglass](https://github.com/sass-eyeglass/eyeglass) module. After installing Bootstrap via NPM you can import the Bootstrap library via:
|
|
268
|
+
|
|
269
|
+
```scss
|
|
270
|
+
@import "bootstrap-sass/bootstrap"
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
or import only the parts of Bootstrap you need:
|
|
274
|
+
|
|
275
|
+
```scss
|
|
276
|
+
@import "bootstrap-sass/bootstrap/variables";
|
|
277
|
+
@import "bootstrap-sass/bootstrap/mixins";
|
|
278
|
+
@import "bootstrap-sass/bootstrap/carousel";
|
|
279
|
+
```
|
|
280
|
+
|
|
275
281
|
## Version
|
|
276
282
|
|
|
277
283
|
Bootstrap for Sass version may differ from the upstream version in the last number, known as
|
|
278
|
-
[PATCH](
|
|
284
|
+
[PATCH](https://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
|
|
279
285
|
This happens when we need to release Sass-specific changes.
|
|
280
286
|
|
|
281
287
|
Before v3.3.2, Bootstrap for Sass version used to reflect the upstream version, with an additional number for
|
|
@@ -285,8 +291,7 @@ The upstream versions vs the Bootstrap for Sass versions are:
|
|
|
285
291
|
|
|
286
292
|
| Upstream | Sass |
|
|
287
293
|
|---------:|--------:|
|
|
288
|
-
| 3.3.
|
|
289
|
-
| 3.3.4 | 3.3.4 |
|
|
294
|
+
| 3.3.4+ | same |
|
|
290
295
|
| 3.3.2 | 3.3.3 |
|
|
291
296
|
| <= 3.3.1 | 3.3.1.x |
|
|
292
297
|
|
|
@@ -317,7 +322,7 @@ To convert a specific branch or version, pass the branch name or the commit hash
|
|
|
317
322
|
|
|
318
323
|
The latest converter script is located [here][converter] and does the following:
|
|
319
324
|
|
|
320
|
-
* Converts upstream
|
|
325
|
+
* Converts upstream Bootstrap LESS files to its matching SCSS file.
|
|
321
326
|
* 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`.
|
|
322
327
|
* Copies all upstream font files into `assets/fonts/bootstrap`.
|
|
323
328
|
* Sets `Bootstrap::BOOTSTRAP_SHA` in [version.rb][version] to the branch sha.
|
|
@@ -340,14 +345,14 @@ and a [significant number of other contributors][contrib].
|
|
|
340
345
|
## You're in good company
|
|
341
346
|
bootstrap-sass is used to build some awesome projects all over the web, including
|
|
342
347
|
[Diaspora](https://diasporafoundation.org/), [rails_admin](https://github.com/sferik/rails_admin),
|
|
343
|
-
Michael Hartl's [Rails Tutorial](
|
|
344
|
-
[kandan](http://
|
|
348
|
+
Michael Hartl's [Rails Tutorial](https://www.railstutorial.org/), [gitlabhq](http://gitlabhq.com/) and
|
|
349
|
+
[kandan](http://getkandan.com/).
|
|
345
350
|
|
|
346
351
|
[converter]: https://github.com/twbs/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb
|
|
347
352
|
[version]: https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb
|
|
348
353
|
[contrib]: https://github.com/twbs/bootstrap-sass/graphs/contributors
|
|
349
354
|
[antirequire]: https://github.com/twbs/bootstrap-sass/issues/79#issuecomment-4428595
|
|
350
|
-
[jsdocs]:
|
|
355
|
+
[jsdocs]: https://getbootstrap.com/javascript/#transitions
|
|
351
356
|
[sass-precision]: http://sass-lang.com/documentation/Sass/Script/Value/Number.html#precision%3D-class_method
|
|
352
357
|
[mincer]: https://github.com/nodeca/mincer
|
|
353
|
-
[autoprefixer]: https://github.com/
|
|
358
|
+
[autoprefixer]: https://github.com/postcss/autoprefixer
|
data/Rakefile
CHANGED
|
@@ -1,21 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
2
|
+
|
|
3
|
+
lib_path = File.join(__dir__, 'lib')
|
|
2
4
|
$:.unshift(lib_path) unless $:.include?(lib_path)
|
|
3
5
|
|
|
4
6
|
load './tasks/bower.rake'
|
|
5
7
|
|
|
6
8
|
require 'rake/testtask'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
Rake::TestTask.new do |t|
|
|
10
|
+
t.libs << 'test'
|
|
11
|
+
t.test_files = FileList['test/**/*_test.rb']
|
|
12
|
+
t.verbose = true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
desc 'Test all Gemfiles from test/*.gemfile'
|
|
16
|
+
task :test_all_gemfiles do
|
|
17
|
+
require 'term/ansicolor'
|
|
18
|
+
require 'pty'
|
|
19
|
+
require 'shellwords'
|
|
20
|
+
cmd = 'bundle install --quiet && bundle exec rake --trace'
|
|
21
|
+
statuses = Dir.glob('./test/gemfiles/*{[!.lock]}').map do |gemfile|
|
|
22
|
+
env = {'BUNDLE_GEMFILE' => gemfile}
|
|
23
|
+
cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})"
|
|
24
|
+
$stderr.puts Term::ANSIColor.cyan("Testing\n#{cmd_with_env}")
|
|
25
|
+
PTY.spawn(env, cmd) do |r, _w, pid|
|
|
26
|
+
begin
|
|
27
|
+
r.each_line { |l| puts l }
|
|
28
|
+
rescue Errno::EIO
|
|
29
|
+
# Errno:EIO error means that the process has finished giving output.
|
|
30
|
+
ensure
|
|
31
|
+
::Process.wait pid
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
[$? && $?.exitstatus == 0, cmd_with_env]
|
|
35
|
+
end
|
|
36
|
+
failed_cmds = statuses.reject(&:first).map { |(_status, cmd_with_env)| cmd_with_env }
|
|
37
|
+
if failed_cmds.empty?
|
|
38
|
+
$stderr.puts Term::ANSIColor.green('Tests pass with all gemfiles')
|
|
39
|
+
else
|
|
40
|
+
$stderr.puts Term::ANSIColor.red("Failing (#{failed_cmds.size} / #{statuses.size})\n#{failed_cmds * "\n"}")
|
|
41
|
+
exit 1
|
|
42
|
+
end
|
|
10
43
|
end
|
|
11
44
|
|
|
12
45
|
desc 'Dumps output to a CSS file for testing'
|
|
13
46
|
task :debug do
|
|
14
|
-
require '
|
|
47
|
+
require 'sassc'
|
|
48
|
+
require 'bootstrap-sass'
|
|
15
49
|
path = Bootstrap.stylesheets_path
|
|
16
|
-
%w(
|
|
17
|
-
engine =
|
|
18
|
-
File.open("
|
|
50
|
+
%w(_bootstrap).each do |file|
|
|
51
|
+
engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: ['.', path])
|
|
52
|
+
File.open("tmp/#{file}.css", 'w') { |f| f.write(engine.render) }
|
|
19
53
|
end
|
|
20
54
|
end
|
|
21
55
|
|
|
@@ -33,7 +67,8 @@ end
|
|
|
33
67
|
|
|
34
68
|
desc 'Compile bootstrap-sass to tmp/ (or first arg)'
|
|
35
69
|
task :compile, :css_path do |t, args|
|
|
36
|
-
require '
|
|
70
|
+
require 'sassc'
|
|
71
|
+
require 'bootstrap-sass'
|
|
37
72
|
require 'term/ansicolor'
|
|
38
73
|
|
|
39
74
|
path = 'assets/stylesheets'
|
|
@@ -43,8 +78,8 @@ task :compile, :css_path do |t, args|
|
|
|
43
78
|
%w(_bootstrap bootstrap/_theme).each do |file|
|
|
44
79
|
save_path = "#{css_path}/#{file.sub(/(^|\/)?_+/, '\1').sub('/', '-')}.css"
|
|
45
80
|
puts Term::ANSIColor.cyan(" #{save_path}") + '...'
|
|
46
|
-
engine
|
|
47
|
-
css
|
|
81
|
+
engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: ['.', path])
|
|
82
|
+
css = engine.render
|
|
48
83
|
File.open(save_path, 'w') { |f| f.write css }
|
|
49
84
|
end
|
|
50
85
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* ========================================================================
|
|
2
|
-
* Bootstrap: affix.js v3.
|
|
3
|
-
*
|
|
2
|
+
* Bootstrap: affix.js v3.4.1
|
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#affix
|
|
4
4
|
* ========================================================================
|
|
5
|
-
* Copyright 2011-
|
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
7
7
|
* ======================================================================== */
|
|
8
8
|
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
var Affix = function (element, options) {
|
|
17
17
|
this.options = $.extend({}, Affix.DEFAULTS, options)
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)
|
|
20
|
+
|
|
21
|
+
this.$target = target
|
|
20
22
|
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
|
|
21
23
|
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
|
22
24
|
|
|
@@ -28,7 +30,7 @@
|
|
|
28
30
|
this.checkPosition()
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
Affix.VERSION = '3.
|
|
33
|
+
Affix.VERSION = '3.4.1'
|
|
32
34
|
|
|
33
35
|
Affix.RESET = 'affix affix-top affix-bottom'
|
|
34
36
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* ========================================================================
|
|
2
|
-
* Bootstrap: alert.js v3.
|
|
3
|
-
*
|
|
2
|
+
* Bootstrap: alert.js v3.4.1
|
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#alerts
|
|
4
4
|
* ========================================================================
|
|
5
|
-
* Copyright 2011-
|
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
7
7
|
* ======================================================================== */
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
$(el).on('click', dismiss, this.close)
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
Alert.VERSION = '3.
|
|
21
|
+
Alert.VERSION = '3.4.1'
|
|
22
22
|
|
|
23
23
|
Alert.TRANSITION_DURATION = 150
|
|
24
24
|
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
selector = selector === '#' ? [] : selector
|
|
35
|
+
var $parent = $(document).find(selector)
|
|
35
36
|
|
|
36
37
|
if (e) e.preventDefault()
|
|
37
38
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* ========================================================================
|
|
2
|
-
* Bootstrap: button.js v3.
|
|
3
|
-
*
|
|
2
|
+
* Bootstrap: button.js v3.4.1
|
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#buttons
|
|
4
4
|
* ========================================================================
|
|
5
|
-
* Copyright 2011-
|
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
7
7
|
* ======================================================================== */
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
this.isLoading = false
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
Button.VERSION = '3.
|
|
22
|
+
Button.VERSION = '3.4.1'
|
|
23
23
|
|
|
24
24
|
Button.DEFAULTS = {
|
|
25
25
|
loadingText: 'loading...'
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
|
|
42
42
|
if (state == 'loadingText') {
|
|
43
43
|
this.isLoading = true
|
|
44
|
-
$el.addClass(d).attr(d, d)
|
|
44
|
+
$el.addClass(d).attr(d, d).prop(d, true)
|
|
45
45
|
} else if (this.isLoading) {
|
|
46
46
|
this.isLoading = false
|
|
47
|
-
$el.removeClass(d).removeAttr(d)
|
|
47
|
+
$el.removeClass(d).removeAttr(d).prop(d, false)
|
|
48
48
|
}
|
|
49
49
|
}, this), 0)
|
|
50
50
|
}
|
|
@@ -108,10 +108,15 @@
|
|
|
108
108
|
|
|
109
109
|
$(document)
|
|
110
110
|
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
|
111
|
-
var $btn = $(e.target)
|
|
112
|
-
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
|
111
|
+
var $btn = $(e.target).closest('.btn')
|
|
113
112
|
Plugin.call($btn, 'toggle')
|
|
114
|
-
if (!($(e.target).is('input[type="radio"]
|
|
113
|
+
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
|
|
114
|
+
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
|
|
115
|
+
e.preventDefault()
|
|
116
|
+
// The target component still receive the focus
|
|
117
|
+
if ($btn.is('input,button')) $btn.trigger('focus')
|
|
118
|
+
else $btn.find('input:visible,button:visible').first().trigger('focus')
|
|
119
|
+
}
|
|
115
120
|
})
|
|
116
121
|
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
|
117
122
|
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* ========================================================================
|
|
2
|
-
* Bootstrap: carousel.js v3.
|
|
3
|
-
*
|
|
2
|
+
* Bootstrap: carousel.js v3.4.1
|
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#carousel
|
|
4
4
|
* ========================================================================
|
|
5
|
-
* Copyright 2011-
|
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
7
7
|
* ======================================================================== */
|
|
8
8
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
Carousel.VERSION = '3.
|
|
33
|
+
Carousel.VERSION = '3.4.1'
|
|
34
34
|
|
|
35
35
|
Carousel.TRANSITION_DURATION = 600
|
|
36
36
|
|
|
@@ -144,7 +144,9 @@
|
|
|
144
144
|
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
|
145
145
|
if ($.support.transition && this.$element.hasClass('slide')) {
|
|
146
146
|
$next.addClass(type)
|
|
147
|
-
$next
|
|
147
|
+
if (typeof $next === 'object' && $next.length) {
|
|
148
|
+
$next[0].offsetWidth // force reflow
|
|
149
|
+
}
|
|
148
150
|
$active.addClass(direction)
|
|
149
151
|
$next.addClass(direction)
|
|
150
152
|
$active
|
|
@@ -206,10 +208,17 @@
|
|
|
206
208
|
// =================
|
|
207
209
|
|
|
208
210
|
var clickHandler = function (e) {
|
|
209
|
-
var href
|
|
210
211
|
var $this = $(this)
|
|
211
|
-
var
|
|
212
|
+
var href = $this.attr('href')
|
|
213
|
+
if (href) {
|
|
214
|
+
href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
var target = $this.attr('data-target') || href
|
|
218
|
+
var $target = $(document).find(target)
|
|
219
|
+
|
|
212
220
|
if (!$target.hasClass('carousel')) return
|
|
221
|
+
|
|
213
222
|
var options = $.extend({}, $target.data(), $this.data())
|
|
214
223
|
var slideIndex = $this.attr('data-slide-to')
|
|
215
224
|
if (slideIndex) options.interval = false
|