Update bower dependencies.
This commit is contained in:
parent
818bdad5af
commit
2beab45f32
185 changed files with 21480 additions and 8110 deletions
|
@ -1,4 +1,4 @@
|
|||
# Bootstrap for Sass
|
||||
# Bootstrap 3 for Sass
|
||||
[](http://badge.fury.io/rb/bootstrap-sass)
|
||||
[](https://www.npmjs.com/package/bootstrap-sass)
|
||||
[](http://badge.fury.io/bo/bootstrap-sass)
|
||||
|
@ -6,16 +6,15 @@
|
|||
|
||||
`bootstrap-sass` is a Sass-powered version of [Bootstrap](https://github.com/twbs/bootstrap) 3, ready to drop right into your Sass powered applications.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
## Installation
|
||||
|
||||
Please see the appropriate guide for your environment of choice:
|
||||
|
||||
* [Ruby on Rails](#a-ruby-on-rails).
|
||||
* [Compass](#b-compass-without-rails) not on Rails.
|
||||
* [Bower](#c-bower).
|
||||
* [npm / Node.js](#d-npm--nodejs).
|
||||
* [Bower](#b-bower).
|
||||
* [npm / Node.js](#c-npm--nodejs).
|
||||
|
||||
### a. Ruby on Rails
|
||||
|
||||
|
@ -24,8 +23,8 @@ Please see the appropriate guide for your environment of choice:
|
|||
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.
|
||||
|
||||
```ruby
|
||||
gem 'bootstrap-sass', '~> 3.3.6'
|
||||
gem 'sass-rails', '>= 3.2'
|
||||
gem 'bootstrap-sass', '~> 3.4.1'
|
||||
gem 'sassc-rails', '>= 2.1.0'
|
||||
```
|
||||
|
||||
`bundle install` and restart your server to make the files available through the pipeline.
|
||||
|
@ -51,6 +50,17 @@ Then, remove all the `*= require_self` and `*= require_tree .` statements from t
|
|||
|
||||
Do not use `*= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
|
||||
|
||||
Bootstrap JavaScript depends on jQuery.
|
||||
If you're using Rails 5.1+, add the `jquery-rails` gem to your Gemfile:
|
||||
|
||||
```ruby
|
||||
gem 'jquery-rails'
|
||||
```
|
||||
|
||||
```console
|
||||
$ bundle install
|
||||
```
|
||||
|
||||
Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
|
||||
|
||||
```js
|
||||
|
@ -101,49 +111,7 @@ Please make sure `sprockets-rails` is at least v2.1.4.
|
|||
|
||||
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.
|
||||
|
||||
### b. Compass without Rails
|
||||
|
||||
Install the gem:
|
||||
|
||||
```console
|
||||
$ gem install bootstrap-sass
|
||||
```
|
||||
|
||||
If you have an existing Compass project:
|
||||
|
||||
1. Require `bootstrap-sass` in `config.rb`:
|
||||
|
||||
```ruby
|
||||
require 'bootstrap-sass'
|
||||
```
|
||||
|
||||
2. Install Bootstrap with:
|
||||
|
||||
```console
|
||||
$ bundle exec compass install bootstrap -r bootstrap-sass
|
||||
```
|
||||
|
||||
If you are creating a new Compass project, you can generate it with bootstrap-sass support:
|
||||
|
||||
```console
|
||||
$ bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap
|
||||
```
|
||||
|
||||
or, alternatively, if you're not using a Gemfile for your dependencies:
|
||||
|
||||
```console
|
||||
$ compass create my-new-project -r bootstrap-sass --using bootstrap
|
||||
```
|
||||
|
||||
This will create a new Compass project with the following files in it:
|
||||
|
||||
* [styles.sass](/templates/project/styles.sass) - main project Sass file, imports Bootstrap and variables.
|
||||
* [_bootstrap-variables.sass](/templates/project/_bootstrap-variables.sass) - all of Bootstrap variables, override them here.
|
||||
|
||||
Some bootstrap-sass mixins may conflict with the Compass ones.
|
||||
If this happens, change the import order so that Compass mixins are loaded later.
|
||||
|
||||
### c. Bower
|
||||
### b. Bower
|
||||
|
||||
bootstrap-sass Bower package is compatible with node-sass 3.2.0+. You can install it with:
|
||||
|
||||
|
@ -176,7 +144,7 @@ In `application.js`:
|
|||
|
||||
See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer.
|
||||
|
||||
### d. npm / Node.js
|
||||
### c. npm / Node.js
|
||||
```console
|
||||
$ npm install bootstrap-sass
|
||||
```
|
||||
|
@ -201,8 +169,8 @@ In the application Sass file, replace `@import 'bootstrap'` with:
|
|||
|
||||
bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 8 (default is 5).
|
||||
|
||||
Precision is set for Rails and Compass automatically.
|
||||
When using Ruby Sass compiler standalone or with the Bower version you can set it with:
|
||||
Precision is set for Ruby automatically when using the `sassc-rails` gem.
|
||||
When using the npm or Bower version with Ruby, you can set it with:
|
||||
|
||||
```ruby
|
||||
::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
|
||||
|
@ -211,9 +179,9 @@ When using Ruby Sass compiler standalone or with the Bower version you can set i
|
|||
### Sass: Autoprefixer
|
||||
|
||||
Bootstrap requires the use of [Autoprefixer][autoprefixer].
|
||||
[Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](http://caniuse.com/).
|
||||
[Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](https://caniuse.com/).
|
||||
|
||||
To match [upstream Bootstrap's level of browser compatibility](http://getbootstrap.com/getting-started/#support), set Autoprefixer's `browsers` option to:
|
||||
To match [upstream Bootstrap's level of browser compatibility](https://getbootstrap.com/getting-started/#support), set Autoprefixer's `browsers` option to:
|
||||
```json
|
||||
[
|
||||
"Android 2.3",
|
||||
|
@ -284,7 +252,7 @@ You can also include optional Bootstrap theme:
|
|||
@import "bootstrap/theme";
|
||||
```
|
||||
|
||||
The full list of Bootstrap variables can be found [here](http://getbootstrap.com/customize/#less-variables). You can override these by simply redefining the variable before the `@import` directive, e.g.:
|
||||
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.:
|
||||
|
||||
```scss
|
||||
$navbar-default-bg: #312312;
|
||||
|
@ -313,7 +281,7 @@ or import only the parts of Bootstrap you need:
|
|||
## Version
|
||||
|
||||
Bootstrap for Sass version may differ from the upstream version in the last number, known as
|
||||
[PATCH](http://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
|
||||
[PATCH](https://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
|
||||
This happens when we need to release Sass-specific changes.
|
||||
|
||||
Before v3.3.2, Bootstrap for Sass version used to reflect the upstream version, with an additional number for
|
||||
|
@ -384,7 +352,7 @@ Michael Hartl's [Rails Tutorial](https://www.railstutorial.org/), [gitlabhq](htt
|
|||
[version]: https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb
|
||||
[contrib]: https://github.com/twbs/bootstrap-sass/graphs/contributors
|
||||
[antirequire]: https://github.com/twbs/bootstrap-sass/issues/79#issuecomment-4428595
|
||||
[jsdocs]: http://getbootstrap.com/javascript/#transitions
|
||||
[jsdocs]: https://getbootstrap.com/javascript/#transitions
|
||||
[sass-precision]: http://sass-lang.com/documentation/Sass/Script/Value/Number.html#precision%3D-class_method
|
||||
[mincer]: https://github.com/nodeca/mincer
|
||||
[autoprefixer]: https://github.com/postcss/autoprefixer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue