less-rails-bootstrap 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/README.md +3 -35
- data/lib/less/rails/bootstrap/version.rb +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/alert.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/button.js +4 -2
- data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +7 -3
- data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +4 -2
- data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/modal.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/popover.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/tab.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/transition.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +7 -7
- data/vendor/frameworks/twitter/bootstrap/alerts.less +2 -14
- data/vendor/frameworks/twitter/bootstrap/badges.less +36 -0
- data/vendor/frameworks/twitter/bootstrap/bootstrap.less +2 -1
- data/vendor/frameworks/twitter/bootstrap/breadcrumbs.less +2 -0
- data/vendor/frameworks/twitter/bootstrap/button-groups.less +31 -7
- data/vendor/frameworks/twitter/bootstrap/buttons.less +17 -13
- data/vendor/frameworks/twitter/bootstrap/code.less +2 -2
- data/vendor/frameworks/twitter/bootstrap/component-animations.less +4 -2
- data/vendor/frameworks/twitter/bootstrap/dropdowns.less +45 -27
- data/vendor/frameworks/twitter/bootstrap/forms.less +78 -45
- data/vendor/frameworks/twitter/bootstrap/grid.less +2 -5
- data/vendor/frameworks/twitter/bootstrap/hero-unit.less +3 -1
- data/vendor/frameworks/twitter/bootstrap/labels.less +8 -2
- data/vendor/frameworks/twitter/bootstrap/mixins.less +189 -165
- data/vendor/frameworks/twitter/bootstrap/modals.less +12 -5
- data/vendor/frameworks/twitter/bootstrap/navbar.less +77 -35
- data/vendor/frameworks/twitter/bootstrap/navs.less +19 -9
- data/vendor/frameworks/twitter/bootstrap/pager.less +6 -0
- data/vendor/frameworks/twitter/bootstrap/pagination.less +1 -0
- data/vendor/frameworks/twitter/bootstrap/progress-bars.less +15 -1
- data/vendor/frameworks/twitter/bootstrap/reset.less +1 -1
- data/vendor/frameworks/twitter/bootstrap/responsive.less +72 -28
- data/vendor/frameworks/twitter/bootstrap/scaffolding.less +4 -4
- data/vendor/frameworks/twitter/bootstrap/sprites.less +3 -3
- data/vendor/frameworks/twitter/bootstrap/tables.less +26 -17
- data/vendor/frameworks/twitter/bootstrap/type.less +22 -6
- data/vendor/frameworks/twitter/bootstrap/variables.less +100 -6
- data/vendor/frameworks/twitter/bootstrap/wells.less +10 -0
- metadata +6 -7
- data/vendor/frameworks/twitter/bootstrap/patterns.less +0 -13
- data/vendor/frameworks/twitter/bootstrap/print.less +0 -18
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -26,44 +26,12 @@ gem 'less-rails-bootstrap'
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
-
|
29
|
+
Please see the [less-rails-bootstrap-test](http://github.com/metaskills/less-rails-bootstrap-test) project for working examples of how to use less.rb, less-rails, and less-rails-bootstrap in any way possible. The "CSS Tests Suites" section of the README and code is what you want to focus on.
|
30
30
|
|
31
|
-
```css
|
32
|
-
/*
|
33
|
-
*= require twitter/bootstrap
|
34
|
-
*/
|
35
31
|
|
36
|
-
|
37
|
-
/* Your styles... */
|
38
|
-
}
|
39
|
-
```
|
40
|
-
|
41
|
-
In a file with the `.css.less` extension, you can import the entire Bootstrap LESS framework. This will allow you to use Bootstrap's variables and mixins in your CSS that follows. Remember, unlike other CSS frameworks, requiring or importing Bootstrap will include all the CSS for building a bootstrapped website. If you only want variables or mixins, you will have to import those discreet files.
|
42
|
-
|
43
|
-
```css
|
44
|
-
@import "twitter/bootstrap";
|
45
|
-
|
46
|
-
#foo {
|
47
|
-
.border-radius(4px);
|
48
|
-
}
|
49
|
-
```
|
50
|
-
|
51
|
-
Maybe all you want to use is the variables and mixins that come with Twitter Bootstrap. No problem, just import them individually from you own `.css.less` file. In this case only the `#foo` selector is output.
|
52
|
-
|
53
|
-
```css
|
54
|
-
@import "twitter/bootstrap/variables";
|
55
|
-
@import "twitter/bootstrap/mixins";
|
56
|
-
|
57
|
-
.myButton(@radius: 5px) {
|
58
|
-
.border-radius(@radius);
|
59
|
-
}
|
60
|
-
|
61
|
-
#foo {
|
62
|
-
.myButton(10px);
|
63
|
-
}
|
64
|
-
```
|
32
|
+
### JavaScript Usage
|
65
33
|
|
66
|
-
Using the JavaScript files is just as easy.
|
34
|
+
Using the JavaScript files is just as easy. You can include all them with a single directive from your `application.js` file. Optionally, you can require only the files you need like `require twitter/bootstrap/modal`.
|
67
35
|
|
68
36
|
```javascript
|
69
37
|
//= require twitter/bootstrap
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-alert.js v2.0.
|
2
|
+
* bootstrap-alert.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrap-button.js v2.0.
|
2
|
+
* bootstrap-button.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
4
4
|
* ============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -91,7 +91,9 @@
|
|
91
91
|
|
92
92
|
$(function () {
|
93
93
|
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
94
|
-
$(e.
|
94
|
+
var $btn = $(e.target)
|
95
|
+
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
96
|
+
$btn.button('toggle')
|
95
97
|
})
|
96
98
|
})
|
97
99
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-carousel.js v2.0.
|
2
|
+
* bootstrap-carousel.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -29,6 +29,9 @@
|
|
29
29
|
this.$element = $(element)
|
30
30
|
this.options = $.extend({}, $.fn.carousel.defaults, options)
|
31
31
|
this.options.slide && this.slide(this.options.slide)
|
32
|
+
this.options.pause == 'hover' && this.$element
|
33
|
+
.on('mouseenter', $.proxy(this.pause, this))
|
34
|
+
.on('mouseleave', $.proxy(this.cycle, this))
|
32
35
|
}
|
33
36
|
|
34
37
|
Carousel.prototype = {
|
@@ -83,14 +86,14 @@
|
|
83
86
|
, fallback = type == 'next' ? 'first' : 'last'
|
84
87
|
, that = this
|
85
88
|
|
86
|
-
if (!$next.length) return
|
87
|
-
|
88
89
|
this.sliding = true
|
89
90
|
|
90
91
|
isCycling && this.pause()
|
91
92
|
|
92
93
|
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
93
94
|
|
95
|
+
if ($next.hasClass('active')) return
|
96
|
+
|
94
97
|
if (!$.support.transition && this.$element.hasClass('slide')) {
|
95
98
|
this.$element.trigger('slide')
|
96
99
|
$active.removeClass('active')
|
@@ -136,6 +139,7 @@
|
|
136
139
|
|
137
140
|
$.fn.carousel.defaults = {
|
138
141
|
interval: 5000
|
142
|
+
, pause: 'hover'
|
139
143
|
}
|
140
144
|
|
141
145
|
$.fn.carousel.Constructor = Carousel
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-collapse.js v2.0.
|
2
|
+
* bootstrap-collapse.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -74,7 +74,9 @@
|
|
74
74
|
[dimension](size || 'auto')
|
75
75
|
[0].offsetWidth
|
76
76
|
|
77
|
-
this.$element
|
77
|
+
this.$element[size ? 'addClass' : 'removeClass']('collapse')
|
78
|
+
|
79
|
+
return this
|
78
80
|
}
|
79
81
|
|
80
82
|
, transition: function ( method, startEvent, completeEvent ) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrap-dropdown.js v2.0.
|
2
|
+
* bootstrap-dropdown.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
4
4
|
* ============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =========================================================
|
2
|
-
* bootstrap-modal.js v2.0.
|
2
|
+
* bootstrap-modal.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
4
4
|
* =========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-popover.js v2.0.
|
2
|
+
* bootstrap-popover.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
4
4
|
* ===========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-scrollspy.js v2.0.
|
2
|
+
* bootstrap-scrollspy.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ========================================================
|
2
|
-
* bootstrap-tab.js v2.0.
|
2
|
+
* bootstrap-tab.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
4
4
|
* ========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-tooltip.js v2.0.
|
2
|
+
* bootstrap-tooltip.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
4
4
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
5
5
|
* ===========================================================
|
@@ -206,7 +206,7 @@
|
|
206
206
|
title = $e.attr('data-original-title')
|
207
207
|
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
208
208
|
|
209
|
-
title = title.toString().replace(/(^\s*|\s*$)/, "")
|
209
|
+
title = (title || '').toString().replace(/(^\s*|\s*$)/, "")
|
210
210
|
|
211
211
|
return title
|
212
212
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===================================================
|
2
|
-
* bootstrap-transition.js v2.0.
|
2
|
+
* bootstrap-transition.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
4
4
|
* ===================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-typeahead.js v2.0.
|
2
|
+
* bootstrap-typeahead.js v2.0.2
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -40,6 +40,7 @@
|
|
40
40
|
, select: function () {
|
41
41
|
var val = this.$menu.find('.active').attr('data-value')
|
42
42
|
this.$element.val(val)
|
43
|
+
this.$element.change();
|
43
44
|
return this.hide()
|
44
45
|
}
|
45
46
|
|
@@ -165,9 +166,6 @@
|
|
165
166
|
}
|
166
167
|
|
167
168
|
, keyup: function (e) {
|
168
|
-
e.stopPropagation()
|
169
|
-
e.preventDefault()
|
170
|
-
|
171
169
|
switch(e.keyCode) {
|
172
170
|
case 40: // down arrow
|
173
171
|
case 38: // up arrow
|
@@ -180,6 +178,7 @@
|
|
180
178
|
break
|
181
179
|
|
182
180
|
case 27: // escape
|
181
|
+
if (!this.shown) return
|
183
182
|
this.hide()
|
184
183
|
break
|
185
184
|
|
@@ -187,10 +186,11 @@
|
|
187
186
|
this.lookup()
|
188
187
|
}
|
189
188
|
|
189
|
+
e.stopPropagation()
|
190
|
+
e.preventDefault()
|
190
191
|
}
|
191
192
|
|
192
193
|
, keypress: function (e) {
|
193
|
-
e.stopPropagation()
|
194
194
|
if (!this.shown) return
|
195
195
|
|
196
196
|
switch(e.keyCode) {
|
@@ -210,12 +210,12 @@
|
|
210
210
|
this.next()
|
211
211
|
break
|
212
212
|
}
|
213
|
+
|
214
|
+
e.stopPropagation()
|
213
215
|
}
|
214
216
|
|
215
217
|
, blur: function (e) {
|
216
218
|
var that = this
|
217
|
-
e.stopPropagation()
|
218
|
-
e.preventDefault()
|
219
219
|
setTimeout(function () { that.hide() }, 150)
|
220
220
|
}
|
221
221
|
|
@@ -9,10 +9,10 @@
|
|
9
9
|
background-color: @warningBackground;
|
10
10
|
border: 1px solid @warningBorder;
|
11
11
|
.border-radius(4px);
|
12
|
+
color: @warningText;
|
12
13
|
}
|
13
|
-
.alert,
|
14
14
|
.alert-heading {
|
15
|
-
color:
|
15
|
+
color: inherit;
|
16
16
|
}
|
17
17
|
|
18
18
|
// Adjust close link position
|
@@ -29,32 +29,20 @@
|
|
29
29
|
.alert-success {
|
30
30
|
background-color: @successBackground;
|
31
31
|
border-color: @successBorder;
|
32
|
-
}
|
33
|
-
.alert-success,
|
34
|
-
.alert-success .alert-heading {
|
35
32
|
color: @successText;
|
36
33
|
}
|
37
34
|
.alert-danger,
|
38
35
|
.alert-error {
|
39
36
|
background-color: @errorBackground;
|
40
37
|
border-color: @errorBorder;
|
41
|
-
}
|
42
|
-
.alert-danger,
|
43
|
-
.alert-error,
|
44
|
-
.alert-danger .alert-heading,
|
45
|
-
.alert-error .alert-heading {
|
46
38
|
color: @errorText;
|
47
39
|
}
|
48
40
|
.alert-info {
|
49
41
|
background-color: @infoBackground;
|
50
42
|
border-color: @infoBorder;
|
51
|
-
}
|
52
|
-
.alert-info,
|
53
|
-
.alert-info .alert-heading {
|
54
43
|
color: @infoText;
|
55
44
|
}
|
56
45
|
|
57
|
-
|
58
46
|
// Block alerts
|
59
47
|
// ------------------------
|
60
48
|
.alert-block {
|
@@ -0,0 +1,36 @@
|
|
1
|
+
// BADGES
|
2
|
+
// ------
|
3
|
+
|
4
|
+
// Base
|
5
|
+
.badge {
|
6
|
+
padding: 1px 9px 2px;
|
7
|
+
font-size: @baseFontSize * .925;
|
8
|
+
font-weight: bold;
|
9
|
+
white-space: nowrap;
|
10
|
+
color: @white;
|
11
|
+
background-color: @grayLight;
|
12
|
+
.border-radius(9px);
|
13
|
+
}
|
14
|
+
|
15
|
+
// Hover state
|
16
|
+
.badge:hover {
|
17
|
+
color: @white;
|
18
|
+
text-decoration: none;
|
19
|
+
cursor: pointer;
|
20
|
+
}
|
21
|
+
|
22
|
+
// Colors
|
23
|
+
.badge-error { background-color: @errorText; }
|
24
|
+
.badge-error:hover { background-color: darken(@errorText, 10%); }
|
25
|
+
|
26
|
+
.badge-warning { background-color: @orange; }
|
27
|
+
.badge-warning:hover { background-color: darken(@orange, 10%); }
|
28
|
+
|
29
|
+
.badge-success { background-color: @successText; }
|
30
|
+
.badge-success:hover { background-color: darken(@successText, 10%); }
|
31
|
+
|
32
|
+
.badge-info { background-color: @infoText; }
|
33
|
+
.badge-info:hover { background-color: darken(@infoText, 10%); }
|
34
|
+
|
35
|
+
.badge-inverse { background-color: @grayDark; }
|
36
|
+
.badge-inverse:hover { background-color: darken(@grayDark, 10%); }
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap v2.0.
|
2
|
+
* Bootstrap v2.0.2
|
3
3
|
*
|
4
4
|
* Copyright 2012 Twitter, Inc
|
5
5
|
* Licensed under the Apache License v2.0
|
@@ -53,6 +53,7 @@
|
|
53
53
|
// Components: Misc
|
54
54
|
@import "thumbnails.less";
|
55
55
|
@import "labels.less";
|
56
|
+
@import "badges.less";
|
56
57
|
@import "progress-bars.less";
|
57
58
|
@import "accordion.less";
|
58
59
|
@import "carousel.less";
|
@@ -4,12 +4,14 @@
|
|
4
4
|
.breadcrumb {
|
5
5
|
padding: 7px 14px;
|
6
6
|
margin: 0 0 @baseLineHeight;
|
7
|
+
list-style: none;
|
7
8
|
#gradient > .vertical(@white, #f5f5f5);
|
8
9
|
border: 1px solid #ddd;
|
9
10
|
.border-radius(3px);
|
10
11
|
.box-shadow(inset 0 1px 0 @white);
|
11
12
|
li {
|
12
13
|
display: inline-block;
|
14
|
+
.ie7-inline-block();
|
13
15
|
text-shadow: 0 1px 0 @white;
|
14
16
|
}
|
15
17
|
.divider {
|
@@ -95,8 +95,22 @@
|
|
95
95
|
padding-right: 8px;
|
96
96
|
@shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
97
97
|
.box-shadow(@shadow);
|
98
|
-
*padding-top:
|
99
|
-
*padding-bottom:
|
98
|
+
*padding-top: 3px;
|
99
|
+
*padding-bottom: 3px;
|
100
|
+
}
|
101
|
+
.btn-group .btn-mini.dropdown-toggle {
|
102
|
+
padding-left: 5px;
|
103
|
+
padding-right: 5px;
|
104
|
+
*padding-top: 1px;
|
105
|
+
*padding-bottom: 1px;
|
106
|
+
}
|
107
|
+
.btn-group .btn-small.dropdown-toggle {
|
108
|
+
*padding-top: 4px;
|
109
|
+
*padding-bottom: 4px;
|
110
|
+
}
|
111
|
+
.btn-group .btn-large.dropdown-toggle {
|
112
|
+
padding-left: 12px;
|
113
|
+
padding-right: 12px;
|
100
114
|
}
|
101
115
|
|
102
116
|
.btn-group.open {
|
@@ -127,22 +141,32 @@
|
|
127
141
|
.open.btn-group .caret {
|
128
142
|
.opacity(100);
|
129
143
|
}
|
144
|
+
// Carets in other button sizes
|
145
|
+
.btn-mini .caret {
|
146
|
+
margin-top: 5px;
|
147
|
+
}
|
148
|
+
.btn-small .caret {
|
149
|
+
margin-top: 6px;
|
150
|
+
}
|
151
|
+
.btn-large .caret {
|
152
|
+
margin-top: 6px;
|
153
|
+
border-left: 5px solid transparent;
|
154
|
+
border-right: 5px solid transparent;
|
155
|
+
border-top: 5px solid @black;
|
156
|
+
}
|
130
157
|
|
131
158
|
|
132
159
|
// Account for other colors
|
133
160
|
.btn-primary,
|
161
|
+
.btn-warning,
|
134
162
|
.btn-danger,
|
135
163
|
.btn-info,
|
136
164
|
.btn-success,
|
137
165
|
.btn-inverse {
|
138
166
|
.caret {
|
139
167
|
border-top-color: @white;
|
168
|
+
border-bottom-color: @white;
|
140
169
|
.opacity(75);
|
141
170
|
}
|
142
171
|
}
|
143
172
|
|
144
|
-
// Small button dropdowns
|
145
|
-
.btn-small .caret {
|
146
|
-
margin-top: 4px;
|
147
|
-
}
|
148
|
-
|