bootstrap-sass-rails 3.0.0.3 → 3.1.0.0

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.
Files changed (72) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +24 -113
  3. data/app/assets/javascripts/twitter/bootstrap/affix.js +1 -126
  4. data/app/assets/javascripts/twitter/bootstrap/alert.js +1 -98
  5. data/app/assets/javascripts/twitter/bootstrap/button.js +1 -109
  6. data/app/assets/javascripts/twitter/bootstrap/carousel.js +1 -217
  7. data/app/assets/javascripts/twitter/bootstrap/collapse.js +1 -179
  8. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +1 -154
  9. data/app/assets/javascripts/twitter/bootstrap/modal.js +1 -246
  10. data/app/assets/javascripts/twitter/bootstrap/popover.js +1 -117
  11. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +1 -158
  12. data/app/assets/javascripts/twitter/bootstrap/tab.js +1 -135
  13. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +1 -386
  14. data/app/assets/javascripts/twitter/bootstrap/transition.js +1 -56
  15. data/app/assets/javascripts/twitter/bootstrap.js +1 -12
  16. data/app/assets/stylesheets/twitter/bootstrap/_alerts.scss +1 -67
  17. data/app/assets/stylesheets/twitter/bootstrap/_badges.scss +1 -51
  18. data/app/assets/stylesheets/twitter/bootstrap/_breadcrumbs.scss +1 -23
  19. data/app/assets/stylesheets/twitter/bootstrap/_button-groups.scss +1 -248
  20. data/app/assets/stylesheets/twitter/bootstrap/_buttons.scss +1 -160
  21. data/app/assets/stylesheets/twitter/bootstrap/_carousel.scss +1 -209
  22. data/app/assets/stylesheets/twitter/bootstrap/_close.scss +1 -33
  23. data/app/assets/stylesheets/twitter/bootstrap/_code.scss +1 -56
  24. data/app/assets/stylesheets/twitter/bootstrap/_component-animations.scss +1 -29
  25. data/app/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +1 -193
  26. data/app/assets/stylesheets/twitter/bootstrap/_forms.scss +1 -350
  27. data/app/assets/stylesheets/twitter/bootstrap/_glyphicons.scss +1 -232
  28. data/app/assets/stylesheets/twitter/bootstrap/_grid.scss +1 -346
  29. data/app/assets/stylesheets/twitter/bootstrap/_input-groups.scss +1 -127
  30. data/app/assets/stylesheets/twitter/bootstrap/_jumbotron.scss +1 -40
  31. data/app/assets/stylesheets/twitter/bootstrap/_labels.scss +1 -58
  32. data/app/assets/stylesheets/twitter/bootstrap/_list-group.scss +1 -89
  33. data/app/assets/stylesheets/twitter/bootstrap/_media.scss +1 -56
  34. data/app/assets/stylesheets/twitter/bootstrap/_mixins.scss +1 -736
  35. data/app/assets/stylesheets/twitter/bootstrap/_modals.scss +1 -145
  36. data/app/assets/stylesheets/twitter/bootstrap/_navbar.scss +1 -625
  37. data/app/assets/stylesheets/twitter/bootstrap/_navs.scss +1 -229
  38. data/app/assets/stylesheets/twitter/bootstrap/_normalize.scss +1 -396
  39. data/app/assets/stylesheets/twitter/bootstrap/_pager.scss +1 -55
  40. data/app/assets/stylesheets/twitter/bootstrap/_pagination.scss +1 -83
  41. data/app/assets/stylesheets/twitter/bootstrap/_panels.scss +1 -148
  42. data/app/assets/stylesheets/twitter/bootstrap/_popovers.scss +1 -133
  43. data/app/assets/stylesheets/twitter/bootstrap/_print.scss +1 -100
  44. data/app/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +1 -95
  45. data/app/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +1 -209
  46. data/app/assets/stylesheets/twitter/bootstrap/_scaffolding.scss +1 -130
  47. data/app/assets/stylesheets/twitter/bootstrap/_tables.scss +1 -236
  48. data/app/assets/stylesheets/twitter/bootstrap/_theme.scss +1 -232
  49. data/app/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +1 -31
  50. data/app/assets/stylesheets/twitter/bootstrap/_tooltip.scss +1 -95
  51. data/app/assets/stylesheets/twitter/bootstrap/_type.scss +1 -238
  52. data/app/assets/stylesheets/twitter/bootstrap/_utilities.scss +1 -42
  53. data/app/assets/stylesheets/twitter/bootstrap/_variables.scss +1 -620
  54. data/app/assets/stylesheets/twitter/bootstrap/_wells.scss +1 -29
  55. data/app/assets/stylesheets/twitter/bootstrap.css.scss +1 -59
  56. data/lib/bootstrap/sass/rails/engine.rb +4 -1
  57. data/lib/bootstrap/sass/rails/version.rb +2 -1
  58. data/lib/bootstrap-sass-rails.rb +1 -1
  59. data/lib/generators/bootstrap/customize_generator.rb +37 -0
  60. data/lib/generators/bootstrap/templates/USAGE +23 -0
  61. data/lib/generators/bootstrap/templates/bootstrap-custom.css.scss +18 -0
  62. data/lib/generators/bootstrap/templates/bootstrap-custom.js +3 -0
  63. data/test/cases/less_to_sass_spec.rb +1 -1
  64. data/test/cases/usage_css_spec.rb +0 -3
  65. metadata +60 -18
  66. checksums.yaml +0 -15
  67. data/app/assets/fonts/twitter/bootstrap/glyphicons-halflings-regular.eot +0 -0
  68. data/app/assets/fonts/twitter/bootstrap/glyphicons-halflings-regular.svg +0 -228
  69. data/app/assets/fonts/twitter/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  70. data/app/assets/fonts/twitter/bootstrap/glyphicons-halflings-regular.woff +0 -0
  71. data/lib/bootstrap/sass/extensions/functions.rb +0 -15
  72. data/lib/bootstrap/sass/extensions.rb +0 -5
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2011-2013 Morton Jonuschat
1
+ Copyright 2011-2014 Morton Jonuschat
2
2
  Twitter Bootstrap Copyright 2011-2013 Twitter, Inc.
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
data/README.md CHANGED
@@ -1,123 +1,34 @@
1
- # Bootstrap::Sass::Rails
1
+ # DEPRECATION NOTICE
2
2
 
3
- Bootstrap is Twitter's toolkit for kickstarting CSS for websites, apps, and more.
4
- It includes base CSS styles for typography, forms, buttons, tables, grids, navigation, alerts, and more.
3
+ The bootstrap-sass-rails is deprecated starting with version 3.1.0.0.
4
+ There is an official Sass port of Bootstrap now which can be found
5
+ within the twbs organization on GitHub:
5
6
 
6
- Twitter Bootstrap has been converted to Sass which makes it possible to use the default Rails Asset Pipeline
7
+ https://github.com/twbs/bootstrap-sass
7
8
 
8
- * All assets have been namespaced within twitter/bootstrap to avoid naming conflicts
9
- * Top level requires for sprockets to get the complete bundle with a
10
- simple = require twitter/bootstrap
11
- * Ability to import individually namespaced stylesheets or javascripts.
9
+ You are recommended to upgrade your Gemfile to directly use bootstrap-sass
10
+ from now on. Upgrading should be really simple, the differences between the
11
+ gems are mostly in the namespacing.
12
12
 
13
- ## Installation
13
+ UPGRADING
14
14
 
15
- Add these lines to your application's Gemfile:
15
+ Remove the twitter/ prefix from all your `@import` and `= require`
16
+ statements:
16
17
 
17
- gem 'bootstrap-sass-rails'
18
+ Before:
19
+ @import "twitter/bootstrap";
20
+ @import "twitter/bootstrap/modal";
18
21
 
19
- And then execute:
22
+ After:
23
+ @import "bootstrap";
24
+ @import "bootstrap/modal";
20
25
 
21
- $ bundle install
26
+ Before:
27
+ //= require "twitter/bootstrap";
28
+ //= require "twitter/bootstrap/modal";
22
29
 
23
- Or install it yourself as:
30
+ After:
31
+ //= require "bootstrap";
32
+ //= require "bootstrap/modal";
24
33
 
25
- $ gem install bootstrap-sass-rails
26
-
27
- ## Usage
28
-
29
- ### Stylesheets
30
-
31
- The easiest way to use Twitter Bootstrap is to require it in your `application.css` file.
32
-
33
- ```css
34
- /*
35
- *= require twitter/bootstrap
36
- */
37
-
38
- #example {
39
- /* Your styles... */
40
- }
41
- ```
42
-
43
- If you need access to the variables within the Twitter Bootstrap framework or want to use the mixins you
44
- will need to import it within an `.css.scss` file. This will still include the complete framework.
45
-
46
- ```css
47
- @import "twitter/bootstrap";
48
-
49
- #foo {
50
- @include border-radius(4px);
51
- }
52
- ```
53
-
54
- Using only parts of the framework like variables and mixin you can import all of these individually from
55
- within `.css.scss` files.
56
-
57
- ```css
58
- @import "twitter/bootstrap/variables";
59
- @import "twitter/bootstrap/mixins";
60
-
61
- @mixin myButton($radius: 5px) {
62
- @include border-radius($radius);
63
- }
64
-
65
- #foo {
66
- @include myButton(10px);
67
- }
68
- ```
69
-
70
- ### Javascripts
71
-
72
- Using the JavaScript works the same way. You can include them all with a
73
- single require directive from your `application.js`.
74
-
75
- ```javascript
76
- //= require twitter/bootstrap
77
-
78
- $(document).ready(function(){
79
- });
80
- ```
81
-
82
- If you only want a part of the javascripts require the individual files
83
- from your `.js` file.
84
-
85
- ```javascript
86
- //= require twitter/bootstrap/modal
87
-
88
- $(document).ready(function(){
89
- });
90
- ```
91
-
92
- ## Versioning
93
-
94
- This gem will directly track the semantic versioning releases of the Twitter Bootstrap project.
95
- If it should be necessary a build number will be added to the version to
96
- mark releases specific to this gem.
97
-
98
- ## Note on Patches / Pull Requests
99
-
100
- * Fork the project.
101
- * Make your feature addition or bug fix.
102
- * Add tests for it. This is important so I don't break it in a future version unintentionally.
103
- * Commit, do not mess with rakefile, version, or history.
104
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
105
- * Send me a pull request. Bonus points for topic branches.
106
-
107
- ## Credits
108
-
109
- This work incorporates [Twitter Bootstrap](https://github.com/twitter/bootstrap) by Twitter, Inc.
110
- This gem has been inspired by [less-rails-bootstrap](https://github.com/metaskills/less-rails-bootstrap) by Ken Collins
111
-
112
- ## Maintainers
113
-
114
- * [Morton Jonuschat](https://github.com/yabawock)
115
-
116
- ## License
117
-
118
- Apache License, Version 2.0
119
-
120
- ## Copyright
121
-
122
- Copyright 2011-2013 Morton Jonuschat
123
- Twitter Bootstrap copyright 2011-2013 Twitter, Inc
34
+ Thank you for using bootstrap-sass-rails!
@@ -1,126 +1 @@
1
- /* ========================================================================
2
- * Bootstrap: affix.js v3.0.0
3
- * http://twbs.github.com/bootstrap/javascript.html#affix
4
- * ========================================================================
5
- * Copyright 2012 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ======================================================================== */
19
-
20
-
21
- +function ($) { "use strict";
22
-
23
- // AFFIX CLASS DEFINITION
24
- // ======================
25
-
26
- var Affix = function (element, options) {
27
- this.options = $.extend({}, Affix.DEFAULTS, options)
28
- this.$window = $(window)
29
- .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
30
- .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
31
-
32
- this.$element = $(element)
33
- this.affixed =
34
- this.unpin = null
35
-
36
- this.checkPosition()
37
- }
38
-
39
- Affix.RESET = 'affix affix-top affix-bottom'
40
-
41
- Affix.DEFAULTS = {
42
- offset: 0
43
- }
44
-
45
- Affix.prototype.checkPositionWithEventLoop = function () {
46
- setTimeout($.proxy(this.checkPosition, this), 1)
47
- }
48
-
49
- Affix.prototype.checkPosition = function () {
50
- if (!this.$element.is(':visible')) return
51
-
52
- var scrollHeight = $(document).height()
53
- var scrollTop = this.$window.scrollTop()
54
- var position = this.$element.offset()
55
- var offset = this.options.offset
56
- var offsetTop = offset.top
57
- var offsetBottom = offset.bottom
58
-
59
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
60
- if (typeof offsetTop == 'function') offsetTop = offset.top()
61
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
62
-
63
- var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
64
- offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
65
- offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
66
-
67
- if (this.affixed === affix) return
68
- if (this.unpin) this.$element.css('top', '')
69
-
70
- this.affixed = affix
71
- this.unpin = affix == 'bottom' ? position.top - scrollTop : null
72
-
73
- this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
74
-
75
- if (affix == 'bottom') {
76
- this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
77
- }
78
- }
79
-
80
-
81
- // AFFIX PLUGIN DEFINITION
82
- // =======================
83
-
84
- var old = $.fn.affix
85
-
86
- $.fn.affix = function (option) {
87
- return this.each(function () {
88
- var $this = $(this)
89
- var data = $this.data('bs.affix')
90
- var options = typeof option == 'object' && option
91
-
92
- if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
93
- if (typeof option == 'string') data[option]()
94
- })
95
- }
96
-
97
- $.fn.affix.Constructor = Affix
98
-
99
-
100
- // AFFIX NO CONFLICT
101
- // =================
102
-
103
- $.fn.affix.noConflict = function () {
104
- $.fn.affix = old
105
- return this
106
- }
107
-
108
-
109
- // AFFIX DATA-API
110
- // ==============
111
-
112
- $(window).on('load', function () {
113
- $('[data-spy="affix"]').each(function () {
114
- var $spy = $(this)
115
- var data = $spy.data()
116
-
117
- data.offset = data.offset || {}
118
-
119
- if (data.offsetBottom) data.offset.bottom = data.offsetBottom
120
- if (data.offsetTop) data.offset.top = data.offsetTop
121
-
122
- $spy.affix(data)
123
- })
124
- })
125
-
126
- }(window.jQuery);
1
+ //= require bootstrap/affix
@@ -1,98 +1 @@
1
- /* ========================================================================
2
- * Bootstrap: alert.js v3.0.0
3
- * http://twbs.github.com/bootstrap/javascript.html#alerts
4
- * ========================================================================
5
- * Copyright 2013 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ======================================================================== */
19
-
20
-
21
- +function ($) { "use strict";
22
-
23
- // ALERT CLASS DEFINITION
24
- // ======================
25
-
26
- var dismiss = '[data-dismiss="alert"]'
27
- var Alert = function (el) {
28
- $(el).on('click', dismiss, this.close)
29
- }
30
-
31
- Alert.prototype.close = function (e) {
32
- var $this = $(this)
33
- var selector = $this.attr('data-target')
34
-
35
- if (!selector) {
36
- selector = $this.attr('href')
37
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
38
- }
39
-
40
- var $parent = $(selector)
41
-
42
- if (e) e.preventDefault()
43
-
44
- if (!$parent.length) {
45
- $parent = $this.hasClass('alert') ? $this : $this.parent()
46
- }
47
-
48
- $parent.trigger(e = $.Event('close.bs.alert'))
49
-
50
- if (e.isDefaultPrevented()) return
51
-
52
- $parent.removeClass('in')
53
-
54
- function removeElement() {
55
- $parent.trigger('closed.bs.alert').remove()
56
- }
57
-
58
- $.support.transition && $parent.hasClass('fade') ?
59
- $parent
60
- .one($.support.transition.end, removeElement)
61
- .emulateTransitionEnd(150) :
62
- removeElement()
63
- }
64
-
65
-
66
- // ALERT PLUGIN DEFINITION
67
- // =======================
68
-
69
- var old = $.fn.alert
70
-
71
- $.fn.alert = function (option) {
72
- return this.each(function () {
73
- var $this = $(this)
74
- var data = $this.data('bs.alert')
75
-
76
- if (!data) $this.data('bs.alert', (data = new Alert(this)))
77
- if (typeof option == 'string') data[option].call($this)
78
- })
79
- }
80
-
81
- $.fn.alert.Constructor = Alert
82
-
83
-
84
- // ALERT NO CONFLICT
85
- // =================
86
-
87
- $.fn.alert.noConflict = function () {
88
- $.fn.alert = old
89
- return this
90
- }
91
-
92
-
93
- // ALERT DATA-API
94
- // ==============
95
-
96
- $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
97
-
98
- }(window.jQuery);
1
+ //= require bootstrap/alert
@@ -1,109 +1 @@
1
- /* ========================================================================
2
- * Bootstrap: button.js v3.0.0
3
- * http://twbs.github.com/bootstrap/javascript.html#buttons
4
- * ========================================================================
5
- * Copyright 2013 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ======================================================================== */
19
-
20
-
21
- +function ($) { "use strict";
22
-
23
- // BUTTON PUBLIC CLASS DEFINITION
24
- // ==============================
25
-
26
- var Button = function (element, options) {
27
- this.$element = $(element)
28
- this.options = $.extend({}, Button.DEFAULTS, options)
29
- }
30
-
31
- Button.DEFAULTS = {
32
- loadingText: 'loading...'
33
- }
34
-
35
- Button.prototype.setState = function (state) {
36
- var d = 'disabled'
37
- var $el = this.$element
38
- var val = $el.is('input') ? 'val' : 'html'
39
- var data = $el.data()
40
-
41
- state = state + 'Text'
42
-
43
- if (!data.resetText) $el.data('resetText', $el[val]())
44
-
45
- $el[val](data[state] || this.options[state])
46
-
47
- // push to event loop to allow forms to submit
48
- setTimeout(function () {
49
- state == 'loadingText' ?
50
- $el.addClass(d).attr(d, d) :
51
- $el.removeClass(d).removeAttr(d);
52
- }, 0)
53
- }
54
-
55
- Button.prototype.toggle = function () {
56
- var $parent = this.$element.closest('[data-toggle="buttons"]')
57
-
58
- if ($parent.length) {
59
- var $input = this.$element.find('input')
60
- .prop('checked', !this.$element.hasClass('active'))
61
- .trigger('change')
62
- if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
63
- }
64
-
65
- this.$element.toggleClass('active')
66
- }
67
-
68
-
69
- // BUTTON PLUGIN DEFINITION
70
- // ========================
71
-
72
- var old = $.fn.button
73
-
74
- $.fn.button = function (option) {
75
- return this.each(function () {
76
- var $this = $(this)
77
- var data = $this.data('bs.button')
78
- var options = typeof option == 'object' && option
79
-
80
- if (!data) $this.data('bs.button', (data = new Button(this, options)))
81
-
82
- if (option == 'toggle') data.toggle()
83
- else if (option) data.setState(option)
84
- })
85
- }
86
-
87
- $.fn.button.Constructor = Button
88
-
89
-
90
- // BUTTON NO CONFLICT
91
- // ==================
92
-
93
- $.fn.button.noConflict = function () {
94
- $.fn.button = old
95
- return this
96
- }
97
-
98
-
99
- // BUTTON DATA-API
100
- // ===============
101
-
102
- $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
103
- var $btn = $(e.target)
104
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
105
- $btn.button('toggle')
106
- e.preventDefault()
107
- })
108
-
109
- }(window.jQuery);
1
+ //= require bootstrap/button