twitter-bootstrap-rails 2.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of twitter-bootstrap-rails might be problematic. Click here for more details.
- data/README.md +27 -27
- data/Rakefile +1 -1
- data/lib/generators/bootstrap/install/install_generator.rb +1 -1
- data/lib/generators/bootstrap/install/templates/bootstrap.coffee +5 -15
- data/lib/generators/bootstrap/install/templates/bootstrap.less +4 -3
- data/lib/generators/bootstrap/layout/layout_generator.rb +14 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +112 -49
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +90 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +77 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +1 -1
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +11 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +3 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +3 -0
- data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -2
- data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
- data/lib/generators/bootstrap/themed/templates/index.html.slim +25 -0
- data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -0
- data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -0
- data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -4
- data/lib/generators/bootstrap/themed/templates/show.html.haml +9 -0
- data/lib/generators/bootstrap/themed/templates/show.html.slim +9 -0
- data/lib/generators/bootstrap/themed/themed_generator.rb +13 -13
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +9 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +6 -4
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +15 -6
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +7 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +3 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +10 -5
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +39 -20
- data/vendor/toolkit/twitter/bootstrap/accordion.less +5 -4
- data/vendor/toolkit/twitter/bootstrap/alerts.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +10 -8
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +48 -18
- data/vendor/toolkit/twitter/bootstrap/buttons.less +137 -88
- data/vendor/toolkit/twitter/bootstrap/carousel.less +12 -5
- data/vendor/toolkit/twitter/bootstrap/code.less +44 -0
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +23 -2
- data/vendor/toolkit/twitter/bootstrap/forms.less +83 -64
- data/vendor/toolkit/twitter/bootstrap/grid.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +20 -0
- data/vendor/toolkit/twitter/bootstrap/labels.less +4 -4
- data/vendor/toolkit/twitter/bootstrap/layouts.less +17 -0
- data/vendor/toolkit/twitter/bootstrap/mixins.less +202 -38
- data/vendor/toolkit/twitter/bootstrap/modals.less +9 -2
- data/vendor/toolkit/twitter/bootstrap/navbar.less +70 -29
- data/vendor/toolkit/twitter/bootstrap/navs.less +70 -64
- data/vendor/toolkit/twitter/bootstrap/pager.less +7 -2
- data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +25 -25
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +14 -18
- data/vendor/toolkit/twitter/bootstrap/reset.less +2 -3
- data/vendor/toolkit/twitter/bootstrap/responsive.less +219 -164
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +6 -89
- data/vendor/toolkit/twitter/bootstrap/sprites.less +137 -99
- data/vendor/toolkit/twitter/bootstrap/tables.less +1 -54
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +2 -0
- data/vendor/toolkit/twitter/bootstrap/type.less +12 -42
- data/vendor/toolkit/twitter/bootstrap/variables.less +23 -14
- metadata +34 -18
- data/vendor/toolkit/twitter/bootstrap/patterns.less +0 -30
- data/vendor/toolkit/twitter/bootstrap/print.less +0 -18
@@ -46,7 +46,7 @@ html {
|
|
46
46
|
}
|
47
47
|
// Focus states
|
48
48
|
a:focus {
|
49
|
-
|
49
|
+
.tab-focus();
|
50
50
|
}
|
51
51
|
// Hover & Active
|
52
52
|
a:hover,
|
@@ -91,8 +91,7 @@ select,
|
|
91
91
|
textarea {
|
92
92
|
margin: 0;
|
93
93
|
font-size: 100%;
|
94
|
-
vertical-align:
|
95
|
-
*vertical-align: middle;
|
94
|
+
vertical-align: middle;
|
96
95
|
}
|
97
96
|
button,
|
98
97
|
input {
|
@@ -1,3 +1,13 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap Responsive v2.0.0
|
3
|
+
*
|
4
|
+
* Copyright 2012 Twitter, Inc
|
5
|
+
* Licensed under the Apache License v2.0
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
*
|
8
|
+
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
9
|
+
*/
|
10
|
+
|
1
11
|
// Responsive.less
|
2
12
|
// For phone and tablet devices
|
3
13
|
// -------------------------------------------------------------
|
@@ -15,72 +25,54 @@
|
|
15
25
|
// ------------------
|
16
26
|
|
17
27
|
// Hide from screenreaders and browsers
|
18
|
-
// Credit:
|
28
|
+
// Credit: HTML5 Boilerplate
|
19
29
|
.hidden {
|
20
30
|
display: none;
|
21
31
|
visibility: hidden;
|
22
32
|
}
|
23
33
|
|
24
34
|
|
35
|
+
|
25
36
|
// UP TO LANDSCAPE PHONE
|
26
37
|
// ---------------------
|
27
38
|
|
28
39
|
@media (max-width: 480px) {
|
29
40
|
|
30
|
-
//
|
31
|
-
.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
display: inline-block;
|
66
|
-
width: 0;
|
67
|
-
height: 0;
|
68
|
-
margin-top: 8px;
|
69
|
-
margin-left: 6px;
|
70
|
-
text-indent: -99999px;
|
71
|
-
vertical-align: top;
|
72
|
-
border-left: 4px solid transparent;
|
73
|
-
border-right: 4px solid transparent;
|
74
|
-
border-top: 4px solid @white;
|
75
|
-
.opacity(100);
|
76
|
-
content: "↓";
|
77
|
-
}
|
78
|
-
.nav:hover > li {
|
79
|
-
display: block;
|
80
|
-
}
|
81
|
-
.nav:hover > li > a:hover {
|
82
|
-
background-color: #333;
|
83
|
-
}
|
41
|
+
// Smooth out the collapsing/expanding nav
|
42
|
+
.nav-collapse {
|
43
|
+
-webkit-transform: translate3d(0, 0, 0); // activate the GPU
|
44
|
+
}
|
45
|
+
|
46
|
+
// Block level the page header small tag for readability
|
47
|
+
.page-header h1 small {
|
48
|
+
display: block;
|
49
|
+
line-height: @baseLineHeight;
|
50
|
+
}
|
51
|
+
|
52
|
+
// Make span* classes full width
|
53
|
+
input[class*="span"],
|
54
|
+
select[class*="span"],
|
55
|
+
textarea[class*="span"],
|
56
|
+
.uneditable-input {
|
57
|
+
display: block;
|
58
|
+
width: 100%;
|
59
|
+
height: 28px; /* Make inputs at least the height of their button counterpart */
|
60
|
+
/* Makes inputs behave like true block-level elements */
|
61
|
+
-webkit-box-sizing: border-box; /* Older Webkit */
|
62
|
+
-moz-box-sizing: border-box; /* Older FF */
|
63
|
+
-ms-box-sizing: border-box; /* IE8 */
|
64
|
+
box-sizing: border-box; /* CSS3 spec*/
|
65
|
+
}
|
66
|
+
// But don't let it screw up prepend/append inputs
|
67
|
+
.input-prepend input[class*="span"],
|
68
|
+
.input-append input[class*="span"] {
|
69
|
+
width: auto;
|
70
|
+
}
|
71
|
+
|
72
|
+
// Update checkboxes for iOS
|
73
|
+
input[type="checkbox"],
|
74
|
+
input[type="radio"] {
|
75
|
+
border: 1px solid #ccc;
|
84
76
|
}
|
85
77
|
|
86
78
|
// Remove the horizontal form styles
|
@@ -100,169 +92,232 @@
|
|
100
92
|
}
|
101
93
|
// Move over buttons in .form-actions to align with .controls
|
102
94
|
.form-horizontal .form-actions {
|
103
|
-
padding-left:
|
95
|
+
padding-left: 10px;
|
96
|
+
padding-right: 10px;
|
104
97
|
}
|
105
98
|
|
106
99
|
// Modals
|
107
100
|
.modal {
|
108
101
|
position: absolute;
|
109
|
-
top:
|
110
|
-
left:
|
111
|
-
right:
|
102
|
+
top: 10px;
|
103
|
+
left: 10px;
|
104
|
+
right: 10px;
|
112
105
|
width: auto;
|
113
106
|
margin: 0;
|
114
107
|
&.fade.in { top: auto; }
|
115
108
|
}
|
116
109
|
.modal-header .close {
|
117
110
|
padding: 10px;
|
111
|
+
margin: -10px;
|
112
|
+
}
|
113
|
+
|
114
|
+
// Carousel
|
115
|
+
.carousel-caption {
|
116
|
+
position: static;
|
118
117
|
}
|
119
118
|
|
120
119
|
}
|
121
120
|
|
122
121
|
|
122
|
+
|
123
123
|
// LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
|
124
124
|
// --------------------------------------------------
|
125
125
|
|
126
126
|
@media (max-width: 768px) {
|
127
|
-
|
128
|
-
//
|
129
|
-
.navbar-fixed {
|
130
|
-
position: absolute;
|
131
|
-
}
|
132
|
-
.navbar-fixed .nav {
|
133
|
-
float: none;
|
134
|
-
}
|
135
|
-
|
127
|
+
// GRID & CONTAINERS
|
128
|
+
// -----------------
|
136
129
|
// Remove width from containers
|
137
130
|
.container {
|
138
131
|
width: auto;
|
139
132
|
padding: 0 20px;
|
140
133
|
}
|
134
|
+
// Fluid rows
|
135
|
+
.row-fluid {
|
136
|
+
width: 100%;
|
137
|
+
}
|
141
138
|
// Undo negative margin on rows
|
142
139
|
.row {
|
143
140
|
margin-left: 0;
|
144
141
|
}
|
145
142
|
// Make all columns even
|
146
|
-
.row > [class*="span"]
|
143
|
+
.row > [class*="span"],
|
144
|
+
.row-fluid > [class*="span"] {
|
147
145
|
float: none;
|
148
146
|
display: block;
|
149
147
|
width: auto;
|
150
148
|
margin: 0;
|
151
149
|
}
|
152
|
-
|
153
150
|
}
|
154
151
|
|
155
152
|
|
153
|
+
|
156
154
|
// PORTRAIT TABLET TO DEFAULT DESKTOP
|
157
155
|
// ----------------------------------
|
158
156
|
|
159
|
-
@media (min-width: 768px) and (max-width:
|
157
|
+
@media (min-width: 768px) and (max-width: 980px) {
|
158
|
+
|
159
|
+
// Fixed grid
|
160
|
+
#gridSystem > .generate(12, 42px, 20px);
|
161
|
+
|
162
|
+
// Fluid grid
|
163
|
+
#fluidGridSystem > .generate(12, 5.801104972%, 2.762430939%);
|
164
|
+
|
165
|
+
// Input grid
|
166
|
+
#inputGridSystem > .generate(12, 42px, 20px);
|
167
|
+
|
168
|
+
}
|
160
169
|
|
161
|
-
// Reset grid variables
|
162
|
-
@gridColumns: 16;
|
163
|
-
@gridColumnWidth: 44px;
|
164
|
-
@gridGutterWidth: 20px;
|
165
|
-
@siteWidth: 748px;
|
166
170
|
|
167
|
-
|
168
|
-
|
169
|
-
|
171
|
+
|
172
|
+
// TABLETS AND BELOW
|
173
|
+
// -----------------
|
174
|
+
@media (max-width: 980px) {
|
175
|
+
|
176
|
+
// UNFIX THE TOPBAR
|
177
|
+
// ----------------
|
178
|
+
// Remove any padding from the body
|
179
|
+
body {
|
180
|
+
padding-top: 0;
|
181
|
+
}
|
182
|
+
// Unfix the navbar
|
183
|
+
.navbar-fixed-top {
|
184
|
+
position: static;
|
185
|
+
margin-bottom: @baseLineHeight;
|
186
|
+
}
|
187
|
+
.navbar-fixed-top .navbar-inner {
|
188
|
+
padding: 5px;
|
189
|
+
}
|
190
|
+
.navbar .container {
|
191
|
+
width: auto;
|
192
|
+
padding: 0;
|
193
|
+
}
|
194
|
+
// Account for brand name
|
195
|
+
.navbar .brand {
|
196
|
+
padding-left: 10px;
|
197
|
+
padding-right: 10px;
|
198
|
+
margin: 0 0 0 -5px;
|
170
199
|
}
|
171
|
-
|
172
|
-
|
200
|
+
// Nav collapse clears brand
|
201
|
+
.navbar .nav-collapse {
|
202
|
+
clear: left;
|
203
|
+
}
|
204
|
+
// Block-level the nav
|
205
|
+
.navbar .nav {
|
206
|
+
float: none;
|
207
|
+
margin: 0 0 (@baseLineHeight / 2);
|
208
|
+
}
|
209
|
+
.navbar .nav > li {
|
210
|
+
float: none;
|
211
|
+
}
|
212
|
+
.navbar .nav > li > a {
|
213
|
+
margin-bottom: 2px;
|
214
|
+
}
|
215
|
+
.navbar .nav > .divider-vertical {
|
216
|
+
display: none;
|
217
|
+
}
|
218
|
+
// Nav and dropdown links in navbar
|
219
|
+
.navbar .nav > li > a,
|
220
|
+
.navbar .dropdown-menu a {
|
221
|
+
padding: 6px 15px;
|
222
|
+
font-weight: bold;
|
223
|
+
color: @navbarLinkColor;
|
224
|
+
.border-radius(3px);
|
225
|
+
}
|
226
|
+
.navbar .dropdown-menu li + li a {
|
227
|
+
margin-bottom: 2px;
|
228
|
+
}
|
229
|
+
.navbar .nav > li > a:hover,
|
230
|
+
.navbar .dropdown-menu a:hover {
|
231
|
+
background-color: @navbarBackground;
|
232
|
+
}
|
233
|
+
// Dropdowns in the navbar
|
234
|
+
.navbar .dropdown-menu {
|
235
|
+
position: static;
|
236
|
+
top: auto;
|
237
|
+
left: auto;
|
238
|
+
float: none;
|
239
|
+
display: block;
|
240
|
+
max-width: none;
|
241
|
+
margin: 0 15px;
|
242
|
+
padding: 0;
|
243
|
+
background-color: transparent;
|
244
|
+
border: none;
|
245
|
+
.border-radius(0px);
|
246
|
+
.box-shadow(none);
|
247
|
+
}
|
248
|
+
.navbar .dropdown-menu:before,
|
249
|
+
.navbar .dropdown-menu:after {
|
250
|
+
display: none;
|
251
|
+
}
|
252
|
+
.navbar .dropdown-menu .divider {
|
253
|
+
display: none;
|
254
|
+
}
|
255
|
+
// Forms in navbar
|
256
|
+
.navbar-form,
|
257
|
+
.navbar-search {
|
258
|
+
float: none;
|
259
|
+
padding: (@baseLineHeight / 2) 15px;
|
260
|
+
margin: (@baseLineHeight / 2) 0;
|
261
|
+
border-top: 1px solid @navbarBackground;
|
262
|
+
border-bottom: 1px solid @navbarBackground;
|
263
|
+
@shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
|
264
|
+
.box-shadow(@shadow);
|
265
|
+
}
|
266
|
+
// Pull right (secondary) nav content
|
267
|
+
.navbar .nav.pull-right {
|
268
|
+
float: none;
|
269
|
+
margin-left: 0;
|
270
|
+
}
|
271
|
+
// Static navbar
|
272
|
+
.navbar-static .navbar-inner {
|
273
|
+
padding-left: 10px;
|
274
|
+
padding-right: 10px;
|
275
|
+
}
|
276
|
+
// Navbar button
|
277
|
+
.btn-navbar {
|
278
|
+
display: block;
|
173
279
|
}
|
174
280
|
|
175
|
-
//
|
176
|
-
.
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
.span3 { .columns(3); }
|
184
|
-
.span4 { .columns(4); }
|
185
|
-
.span5 { .columns(5); }
|
186
|
-
.span6 { .columns(6); }
|
187
|
-
.span7 { .columns(7); }
|
188
|
-
.span8 { .columns(8); }
|
189
|
-
.span9 { .columns(9); }
|
190
|
-
.span10 { .columns(10); }
|
191
|
-
.span11 { .columns(11); }
|
192
|
-
.span12 { .columns(12); }
|
193
|
-
|
194
|
-
// Offset column options
|
195
|
-
.offset1 { .offset(1); }
|
196
|
-
.offset2 { .offset(2); }
|
197
|
-
.offset3 { .offset(3); }
|
198
|
-
.offset4 { .offset(4); }
|
199
|
-
.offset5 { .offset(5); }
|
200
|
-
.offset6 { .offset(6); }
|
201
|
-
.offset7 { .offset(7); }
|
202
|
-
.offset8 { .offset(8); }
|
203
|
-
.offset9 { .offset(9); }
|
204
|
-
.offset10 { .offset(10); }
|
205
|
-
.offset11 { .offset(11); }
|
206
|
-
.offset12 { .offset(12); }
|
281
|
+
// Hide everything in the navbar save .brand and toggle button */
|
282
|
+
.nav-collapse {
|
283
|
+
overflow: hidden;
|
284
|
+
height: 0;
|
285
|
+
}
|
286
|
+
}
|
287
|
+
|
288
|
+
|
207
289
|
|
290
|
+
// DEFAULT DESKTOP
|
291
|
+
// ---------------
|
292
|
+
|
293
|
+
@media (min-width: 980px) {
|
294
|
+
.nav-collapse.collapse {
|
295
|
+
height: auto !important;
|
296
|
+
}
|
208
297
|
}
|
209
298
|
|
299
|
+
|
300
|
+
|
210
301
|
// LARGE DESKTOP & UP
|
211
302
|
// ------------------
|
212
|
-
/*
|
213
|
-
@media (min-width: 1210px) {
|
214
303
|
|
215
|
-
|
216
|
-
@gridColumns: 12;
|
217
|
-
@gridColumnWidth: 70px;
|
218
|
-
@gridGutterWidth: 30px;
|
219
|
-
@siteWidth: 1170px;
|
304
|
+
@media (min-width: 1200px) {
|
220
305
|
|
221
|
-
//
|
222
|
-
.
|
223
|
-
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
|
224
|
-
}
|
225
|
-
.offset(@columns: 1) {
|
226
|
-
margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
|
227
|
-
}
|
306
|
+
// Fixed grid
|
307
|
+
#gridSystem > .generate(12, 70px, 30px);
|
228
308
|
|
229
|
-
|
230
|
-
|
309
|
+
// Fluid grid
|
310
|
+
#fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%);
|
311
|
+
|
312
|
+
// Input grid
|
313
|
+
#inputGridSystem > .generate(12, 70px, 30px);
|
314
|
+
|
315
|
+
// Thumbnails
|
316
|
+
.thumbnails {
|
317
|
+
margin-left: -30px;
|
318
|
+
}
|
319
|
+
.thumbnails > li {
|
320
|
+
margin-left: 30px;
|
231
321
|
}
|
232
|
-
.row {
|
233
|
-
margin-left: @gridGutterWidth * -1;
|
234
|
-
}
|
235
|
-
[class*="span"] {
|
236
|
-
margin-left: @gridGutterWidth;
|
237
|
-
}
|
238
|
-
|
239
|
-
// Default columns
|
240
|
-
.span1 { .columns(1); }
|
241
|
-
.span2 { .columns(2); }
|
242
|
-
.span3 { .columns(3); }
|
243
|
-
.span4 { .columns(4); }
|
244
|
-
.span5 { .columns(5); }
|
245
|
-
.span6 { .columns(6); }
|
246
|
-
.span7 { .columns(7); }
|
247
|
-
.span8 { .columns(8); }
|
248
|
-
.span9 { .columns(9); }
|
249
|
-
.span10 { .columns(10); }
|
250
|
-
.span11 { .columns(11); }
|
251
|
-
.span12 { .columns(12); }
|
252
|
-
|
253
|
-
// Offset column options
|
254
|
-
.offset1 { .offset(1); }
|
255
|
-
.offset2 { .offset(2); }
|
256
|
-
.offset3 { .offset(3); }
|
257
|
-
.offset4 { .offset(4); }
|
258
|
-
.offset5 { .offset(5); }
|
259
|
-
.offset6 { .offset(6); }
|
260
|
-
.offset7 { .offset(7); }
|
261
|
-
.offset8 { .offset(8); }
|
262
|
-
.offset9 { .offset(9); }
|
263
|
-
.offset10 { .offset(10); }
|
264
|
-
.offset11 { .offset(11); }
|
265
|
-
.offset12 { .offset(12); }
|
266
322
|
|
267
323
|
}
|
268
|
-
*/
|