Commit 25f57ee1 authored by Thomas Park's avatar Thomas Park

update bootstrap to 3.3.2

parent 0a7f9e5b
{
"name": "bootstrap-sass",
"version": "3.3.1",
"version": "3.3.3",
"homepage": "https://github.com/twbs/bootstrap-sass",
"authors": [
"Thomas McDonald",
......@@ -15,18 +15,8 @@
"assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
"assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
"assets/fonts/bootstrap/glyphicons-halflings-regular.woff",
"assets/javascripts/bootstrap/affix.js",
"assets/javascripts/bootstrap/alert.js",
"assets/javascripts/bootstrap/button.js",
"assets/javascripts/bootstrap/carousel.js",
"assets/javascripts/bootstrap/collapse.js",
"assets/javascripts/bootstrap/dropdown.js",
"assets/javascripts/bootstrap/tab.js",
"assets/javascripts/bootstrap/transition.js",
"assets/javascripts/bootstrap/scrollspy.js",
"assets/javascripts/bootstrap/modal.js",
"assets/javascripts/bootstrap/tooltip.js",
"assets/javascripts/bootstrap/popover.js"
"assets/fonts/bootstrap/glyphicons-halflings-regular.woff2",
"assets/javascripts/bootstrap.js"
],
"keywords": [
"twbs",
......@@ -47,13 +37,13 @@
"dependencies": {
"jquery": ">= 1.9.0"
},
"_release": "3.3.1",
"_release": "3.3.3",
"_resolution": {
"type": "version",
"tag": "v3.3.1",
"commit": "cdad0d4b5d17e6bc84863b2907b82d45e856be22"
"tag": "v3.3.3",
"commit": "ed0a2bfdc9e33c3f350306252ee8da9da47d6107"
},
"_source": "git://github.com/twbs/bootstrap-sass.git",
"_target": "~3.3.1",
"_target": "~3.3.2",
"_originalSource": "bootstrap-sass-official"
}
\ No newline at end of file
# Changelog
## 3.3.3
This is a re-packaged release of 3.3.2.1 (v3.3.2+1).
Versions are now strictly semver.
The PATCH version may be ahead of the upstream.
Framework version: Bootstrap **v3.3.2**.
## 3.3.2.1
* Fix glyphicons regression (revert 443d5b49eac84aec1cb2f8ea173554327bfc8c14)
## 3.3.2.0
* Autoprefixer is now required, and `autoprefixer-rails` is now a dependency for the ruby gem. [#824](https://github.com/twbs/bootstrap-sass/issues/824)
* Minimum precision reduced from 10 to 8 [#821](https://github.com/twbs/bootstrap-sass/issues/821)
* Requiring bootstrap JS from npm now works [#812](https://github.com/twbs/bootstrap-sass/issues/812)
* Fix Sass 3.4.x + IE10 compatibility issue [#803](https://github.com/twbs/bootstrap-sass/issues/803)
* Provide minified JS bundle [#777](https://github.com/twbs/bootstrap-sass/issues/777)
* Bower package is now at bootstrap-sass [#813](https://github.com/twbs/bootstrap-sass/issues/813)
## 3.3.1.0
* Variables override template at templates/project/_bootstrap-variables.sass
......
......@@ -57,7 +57,11 @@ Example:
**We will not accept pull requests that modify the SCSS beyond fixing bugs caused by *our* code!**
Most pull requests should go to [twbs/bootstrap](https://github.com/twbs/bootstrap) or [jlong/sass-twitter-bootstrap](https://github.com/jlong/sass-twitter-bootstrap)
We use a [converter script][converter-readme] to automatically convert upstream bootstrap, written in LESS, to Sass.
Issues related to styles or javascript but unrelated to the conversion process should go to [twbs/bootstrap][upstream].
Pull requests that fix bugs caused by our code should not modify the SCSS directly, but should patch the converter instead.
Good pull requests - patches, improvements, new features - are a fantastic
help. They should remain focused in scope and avoid containing unrelated
......@@ -77,3 +81,6 @@ Please **do not** derail or troll issues. Keep the
discussion on topic and respect the opinions of others.
*props [html5-boilerplate](https://github.com/h5bp/html5-boilerplate/blob/master/CONTRIBUTING.md)*
[upstream]: https://github.com/twbs/bootstrap
[converter-readme]: https://github.com/twbs/bootstrap-sass/blob/master/README.md#upstream-converter
# Bootstrap for Sass [![Gem Version](https://badge.fury.io/rb/bootstrap-sass.svg)](http://badge.fury.io/rb/bootstrap-sass) [![Bower Version](https://badge.fury.io/bo/bootstrap-sass-official.svg)](http://badge.fury.io/bo/bootstrap-sass-official) [![Build Status](http://img.shields.io/travis/twbs/bootstrap-sass.svg)](http://travis-ci.org/twbs/bootstrap-sass)
# Bootstrap for Sass [![Gem Version](https://badge.fury.io/rb/bootstrap-sass.svg)](http://badge.fury.io/rb/bootstrap-sass) [![Bower Version](https://badge.fury.io/bo/bootstrap-sass.svg)](http://badge.fury.io/bo/bootstrap-sass) [![Build Status](http://img.shields.io/travis/twbs/bootstrap-sass.svg)](http://travis-ci.org/twbs/bootstrap-sass)
`bootstrap-sass` is a Sass-powered version of [Bootstrap](http://github.com/twbs/bootstrap), ready to drop right into your Sass powered applications.
......@@ -17,17 +17,10 @@ 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.1'
gem 'bootstrap-sass', '~> 3.3.3'
gem 'sass-rails', '>= 3.2'
```
It is also recommended to use [Autoprefixer](https://github.com/ai/autoprefixer-rails) with Bootstrap
to add browser vendor prefixes automatically. Simply add the gem:
```ruby
gem 'autoprefixer-rails'
```
`bundle install` and restart your server to make the files available through the pipeline.
Import Bootstrap styles in `app/assets/stylesheets/application.css.scss`:
......@@ -41,12 +34,14 @@ Import Bootstrap styles in `app/assets/stylesheets/application.css.scss`:
`bootstrap-sprockets` must be imported before `bootstrap` for the icon fonts to work.
Make sure the file has `.css.scss` extension (or `.css.sass` for Sass syntax). If you have just generated a new Rails app,
it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so remove it:
it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so rename it:
```console
$ rm app/assets/stylesheets/application.css
$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.css.scss
```
Then, remove all the `//= require` and `//= require_tree` statements from the file. Instead, use `@import` to import Sass files.
Do not use `//= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
......@@ -67,9 +62,9 @@ root.join('vendor', 'assets', 'bower_components').to_s.tap do |bower_path|
config.assets.paths << bower_path
end
# Precompile Bootstrap fonts
config.assets.precompile << %r(bootstrap-sass/assets/fonts/bootstrap/[\w-]+\.(?:eot|svg|ttf|woff)$)
config.assets.precompile << %r(bootstrap-sass/assets/fonts/bootstrap/[\w-]+\.(?:eot|svg|ttf|woff2?)$)
# Minimum Sass number precision required by bootstrap-sass
::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
```
Replace Bootstrap `@import` statements in `application.css.scss` with:
......@@ -92,35 +87,29 @@ Please make sure `sprockets-rails` is at least v2.1.4.
#### Rails 3.2.x
Rails 3.2 is [no longer maintained for bugfixes](http://guides.rubyonrails.org/maintenance_policy.html), and you should upgrade as soon as possible.
Starting with bootstrap-sass v3.1.1.1, due to the structural changes from upstream you will need these
backported asset pipeline gems on Rails 3.2. There is more on why this is necessary in
https://github.com/twbs/bootstrap-sass/issues/523 and https://github.com/twbs/bootstrap-sass/issues/578.
```ruby
gem 'sprockets-rails', '=2.0.0.backport1'
gem 'sprockets', '=2.2.2.backport2'
gem 'sass-rails', github: 'guilleiguaran/sass-rails', branch: 'backport'
```
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
```sh
gem install bootstrap-sass
Install the gem:
```console
$ gem install bootstrap-sass
```
If you have an existing Compass project:
```ruby
# config.rb:
require 'bootstrap-sass'
```
1. Require `bootstrap-sass` in `config.rb`:
```console
$ bundle exec compass install bootstrap
```
```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:
......@@ -144,24 +133,22 @@ If this happens, change the import order so that Compass mixins are loaded later
### c. Bower
Using bootstrap-sass as a Bower package is still being tested. It is compatible with node-sass 0.8.3+. You can install it with:
bootstrap-sass Bower package is compatible with node-sass 1.2.3+. You can install it with:
```console
$ bower install bootstrap-sass-official
$ bower install bootstrap-sass
```
`bootstrap-sass` is taken so make sure you use the command above.
Sass, JS, and all other assets are located at [assets](/assets).
By default, `bower.json` main field list only the main `bootstrap.scss` and all the static assets (fonts and JS).
By default, `bower.json` main field list only the main `_bootstrap.scss` and all the static assets (fonts and JS).
This is compatible by default with asset managers such as [wiredep](https://github.com/taptapship/wiredep).
#### Node.js Mincer
If you use [mincer][mincer] with node-sass, import bootstrap into like so:
If you use [mincer][mincer] with node-sass, import bootstrap like so:
In `application.css.ejs.scss` (NB **.css.ejs.css**):
In `application.css.ejs.scss` (NB **.css.ejs.scss**):
```scss
// Import mincer asset paths helper integration
......@@ -195,21 +182,18 @@ In the application Sass file, replace `@import 'bootstrap'` with:
#### Sass: Number Precision
bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 10 (default is 5).
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:
```ruby
::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
```
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.
#### Sass: Autoprefixer
Using [Autoprefixer][autoprefixer] with Bootstrap is recommended.
Bootstrap requires the use of [Autoprefixer][autoprefixer].
[Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](http://caniuse.com/).
#### JavaScript
......
/* ========================================================================
* Bootstrap: affix.js v3.3.1
* Bootstrap: affix.js v3.3.2
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -28,7 +28,7 @@
this.checkPosition()
}
Affix.VERSION = '3.3.1'
Affix.VERSION = '3.3.2'
Affix.RESET = 'affix affix-top affix-bottom'
......@@ -53,7 +53,7 @@
var colliderTop = initializing ? scrollTop : position.top
var colliderHeight = initializing ? targetHeight : height
if (offsetTop != null && colliderTop <= offsetTop) return 'top'
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
return false
......
/* ========================================================================
* Bootstrap: alert.js v3.3.1
* Bootstrap: alert.js v3.3.2
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -18,7 +18,7 @@
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.3.1'
Alert.VERSION = '3.3.2'
Alert.TRANSITION_DURATION = 150
......
/* ========================================================================
* Bootstrap: button.js v3.3.1
* Bootstrap: button.js v3.3.2
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -19,7 +19,7 @@
this.isLoading = false
}
Button.VERSION = '3.3.1'
Button.VERSION = '3.3.2'
Button.DEFAULTS = {
loadingText: 'loading...'
......
/* ========================================================================
* Bootstrap: carousel.js v3.3.1
* Bootstrap: carousel.js v3.3.2
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -30,7 +30,7 @@
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.3.1'
Carousel.VERSION = '3.3.2'
Carousel.TRANSITION_DURATION = 600
......@@ -70,8 +70,11 @@
}
Carousel.prototype.getItemForDirection = function (direction, active) {
var delta = direction == 'prev' ? -1 : 1
var activeIndex = this.getItemIndex(active)
var willWrap = (direction == 'prev' && activeIndex === 0)
|| (direction == 'next' && activeIndex == (this.$items.length - 1))
if (willWrap && !this.options.wrap) return active
var delta = direction == 'prev' ? -1 : 1
var itemIndex = (activeIndex + delta) % this.$items.length
return this.$items.eq(itemIndex)
}
......@@ -116,14 +119,8 @@
var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
var fallback = type == 'next' ? 'first' : 'last'
var that = this
if (!$next.length) {
if (!this.options.wrap) return
$next = this.$element.find('.item')[fallback]()
}
if ($next.hasClass('active')) return (this.sliding = false)
var relatedTarget = $next[0]
......
/* ========================================================================
* Bootstrap: collapse.js v3.3.1
* Bootstrap: collapse.js v3.3.2
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -28,7 +28,7 @@
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.3.1'
Collapse.VERSION = '3.3.2'
Collapse.TRANSITION_DURATION = 350
......@@ -46,7 +46,7 @@
if (this.transitioning || this.$element.hasClass('in')) return
var activesData
var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
if (actives && actives.length) {
activesData = actives.data('bs.collapse')
......
/* ========================================================================
* Bootstrap: dropdown.js v3.3.1
* Bootstrap: dropdown.js v3.3.2
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -19,7 +19,7 @@
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.3.1'
Dropdown.VERSION = '3.3.2'
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
......
/* ========================================================================
* Bootstrap: modal.js v3.3.1
* Bootstrap: modal.js v3.3.2
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -30,7 +30,7 @@
}
}
Modal.VERSION = '3.3.1'
Modal.VERSION = '3.3.2'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
......
/* ========================================================================
* Bootstrap: popover.js v3.3.1
* Bootstrap: popover.js v3.3.2
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -19,7 +19,7 @@
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.3.1'
Popover.VERSION = '3.3.2'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
......@@ -86,18 +86,12 @@
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.popover')
var options = typeof option == 'object' && option
var selector = options && options.selector
var $this = $(this)
var data = $this.data('bs.popover')
var options = typeof option == 'object' && option
if (!data && option == 'destroy') return
if (selector) {
if (!data) $this.data('bs.popover', (data = {}))
if (!data[selector]) data[selector] = new Popover(this, options)
} else {
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
}
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
......
/* ========================================================================
* Bootstrap: scrollspy.js v3.3.1
* Bootstrap: scrollspy.js v3.3.2
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -30,7 +30,7 @@
this.process()
}
ScrollSpy.VERSION = '3.3.1'
ScrollSpy.VERSION = '3.3.2'
ScrollSpy.DEFAULTS = {
offset: 10
......
/* ========================================================================
* Bootstrap: tab.js v3.3.1
* Bootstrap: tab.js v3.3.2
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -17,7 +17,7 @@
this.element = $(element)
}
Tab.VERSION = '3.3.1'
Tab.VERSION = '3.3.2'
Tab.TRANSITION_DURATION = 150
......
/* ========================================================================
* Bootstrap: tooltip.js v3.3.1
* Bootstrap: tooltip.js v3.3.2
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......@@ -25,7 +25,7 @@
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.3.1'
Tooltip.VERSION = '3.3.2'
Tooltip.TRANSITION_DURATION = 150
......@@ -346,10 +346,10 @@
}
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
}
......@@ -445,18 +445,12 @@
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option
var selector = options && options.selector
var $this = $(this)
var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option
if (!data && option == 'destroy') return
if (selector) {
if (!data) $this.data('bs.tooltip', (data = {}))
if (!data[selector]) data[selector] = new Tooltip(this, options)
} else {
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
}
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
......
/* ========================================================================
* Bootstrap: transition.js v3.3.1
* Bootstrap: transition.js v3.3.2
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......
......@@ -5,3 +5,5 @@
@function twbs-image-path($path) {
@return image-url($path, true);
}
$bootstrap-sass-asset-helper: true;
......@@ -15,3 +15,5 @@
@function twbs-image-path($file) {
@return "<%- asset_path('#{$file}') %>";
}
$bootstrap-sass-asset-helper: true;