sass-twitter-bootstrap 2.2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/lib/sass/twitter/bootstrap/version.rb +1 -1
  2. data/vendor/assets/javascripts/twitter/bootstrap-affix.js +1 -1
  3. data/vendor/assets/javascripts/twitter/bootstrap-alert.js +1 -1
  4. data/vendor/assets/javascripts/twitter/bootstrap-button.js +1 -1
  5. data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +31 -9
  6. data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +4 -4
  7. data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +14 -10
  8. data/vendor/assets/javascripts/twitter/bootstrap-modal.js +13 -11
  9. data/vendor/assets/javascripts/twitter/bootstrap-popover.js +5 -5
  10. data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +2 -2
  11. data/vendor/assets/javascripts/twitter/bootstrap-tab.js +1 -1
  12. data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +95 -29
  13. data/vendor/assets/javascripts/twitter/bootstrap-transition.js +1 -1
  14. data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +16 -4
  15. data/vendor/assets/stylesheets/tests/css-tests.css +12 -1
  16. data/vendor/assets/stylesheets/tests/css-tests.html +54 -0
  17. data/vendor/assets/stylesheets/twitter/_button-groups.scss +4 -2
  18. data/vendor/assets/stylesheets/twitter/_buttons.scss +8 -10
  19. data/vendor/assets/stylesheets/twitter/_carousel.scss +33 -6
  20. data/vendor/assets/stylesheets/twitter/_close.scss +2 -1
  21. data/vendor/assets/stylesheets/twitter/_dropdowns.scss +16 -12
  22. data/vendor/assets/stylesheets/twitter/_forms.scss +5 -2
  23. data/vendor/assets/stylesheets/twitter/_labels-badges.scss +4 -2
  24. data/vendor/assets/stylesheets/twitter/_media.scss +2 -2
  25. data/vendor/assets/stylesheets/twitter/_mixins.scss +8 -2
  26. data/vendor/assets/stylesheets/twitter/_modals.scss +3 -3
  27. data/vendor/assets/stylesheets/twitter/_navbar.scss +18 -11
  28. data/vendor/assets/stylesheets/twitter/_navs.scss +39 -21
  29. data/vendor/assets/stylesheets/twitter/_pager.scss +3 -1
  30. data/vendor/assets/stylesheets/twitter/_pagination.scss +3 -1
  31. data/vendor/assets/stylesheets/twitter/_popovers.scss +5 -1
  32. data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +6 -2
  33. data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +29 -13
  34. data/vendor/assets/stylesheets/twitter/_scaffolding.scss +2 -1
  35. data/vendor/assets/stylesheets/twitter/_sprites.scss +7 -3
  36. data/vendor/assets/stylesheets/twitter/_tables.scss +24 -17
  37. data/vendor/assets/stylesheets/twitter/_thumbnails.scss +3 -2
  38. data/vendor/assets/stylesheets/twitter/_tooltip.scss +6 -6
  39. data/vendor/assets/stylesheets/twitter/_type.scss +20 -8
  40. data/vendor/assets/stylesheets/twitter/_variables.scss +2 -2
  41. data/vendor/assets/stylesheets/twitter/bootstrap.scss +1 -1
  42. data/vendor/assets/stylesheets/twitter/responsive.scss +1 -10
  43. metadata +49 -50
@@ -1,5 +1,5 @@
1
1
  /* ===================================================
2
- * bootstrap-transition.js v2.2.2
2
+ * bootstrap-transition.js v2.3.0
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.2.2
2
+ * bootstrap-typeahead.js v2.3.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -172,6 +172,7 @@
172
172
 
173
173
  , listen: function () {
174
174
  this.$element
175
+ .on('focus', $.proxy(this.focus, this))
175
176
  .on('blur', $.proxy(this.blur, this))
176
177
  .on('keypress', $.proxy(this.keypress, this))
177
178
  .on('keyup', $.proxy(this.keyup, this))
@@ -183,6 +184,7 @@
183
184
  this.$menu
184
185
  .on('click', $.proxy(this.click, this))
185
186
  .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
187
+ .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
186
188
  }
187
189
 
188
190
  , eventSupported: function(eventName) {
@@ -256,22 +258,33 @@
256
258
  e.preventDefault()
257
259
  }
258
260
 
261
+ , focus: function (e) {
262
+ this.focused = true
263
+ }
264
+
259
265
  , blur: function (e) {
260
- var that = this
261
- setTimeout(function () { that.hide() }, 150)
266
+ this.focused = false
267
+ if (!this.mousedover && this.shown) this.hide()
262
268
  }
263
269
 
264
270
  , click: function (e) {
265
271
  e.stopPropagation()
266
272
  e.preventDefault()
267
273
  this.select()
274
+ this.$element.focus()
268
275
  }
269
276
 
270
277
  , mouseenter: function (e) {
278
+ this.mousedover = true
271
279
  this.$menu.find('.active').removeClass('active')
272
280
  $(e.currentTarget).addClass('active')
273
281
  }
274
282
 
283
+ , mouseleave: function (e) {
284
+ this.mousedover = false
285
+ if (!this.focused && this.shown) this.hide()
286
+ }
287
+
275
288
  }
276
289
 
277
290
 
@@ -316,7 +329,6 @@
316
329
  $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
317
330
  var $this = $(this)
318
331
  if ($this.data('typeahead')) return
319
- e.preventDefault()
320
332
  $this.typeahead($this.data())
321
333
  })
322
334
 
@@ -136,4 +136,15 @@ body {
136
136
  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
137
137
  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
138
138
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
139
- }
139
+ }
140
+
141
+ .gradient-horizontal-three {
142
+ background-color: #00b3ee;
143
+ background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(#00b3ee), color-stop(50%, #7a43b6), to(#c3325f));
144
+ background-image: -webkit-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f);
145
+ background-image: -moz-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f);
146
+ background-image: -o-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f);
147
+ background-image: linear-gradient(to right, #00b3ee, #7a43b6 50%, #c3325f);
148
+ background-repeat: no-repeat;
149
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00b3ee', endColorstr='#c3325f', GradientType=0);
150
+ }
@@ -1291,10 +1291,64 @@
1291
1291
  <h4>Striped</h4>
1292
1292
  <div class="gradient-striped"></div>
1293
1293
 
1294
+ <h4>Horizontal three colors</h4>
1295
+ <div class="gradient-horizontal-three"></div>
1294
1296
 
1295
1297
 
1296
1298
 
1299
+ <div class="page-header">
1300
+ <h1>Alerts</h1>
1301
+ </div>
1302
+
1303
+ <h4>Alert default</h4>
1304
+ <div class="alert">
1305
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1306
+ <strong>Alert!</strong> Best check yourself, you're not looking too good.
1307
+ </div>
1308
+ <div class="alert alert-block">
1309
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1310
+ <p><strong>Alert!</strong> Best check yourself, you're not looking too good.</p>
1311
+ </div>
1312
+
1313
+ <h4>Success</h4>
1314
+ <div class="alert alert-success">
1315
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1316
+ <strong>Success!</strong> Best check yourself, you're not looking too good.
1317
+ </div>
1318
+ <div class="alert alert-block alert-success">
1319
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1320
+ <p><strong>Success!</strong> Best check yourself, you're not looking too good.</p>
1321
+ </div>
1297
1322
 
1323
+ <h4>Info</h4>
1324
+ <div class="alert alert-info">
1325
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1326
+ <strong>Info!</strong> Best check yourself, you're not looking too good.
1327
+ </div>
1328
+ <div class="alert alert-block alert-info">
1329
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1330
+ <p><strong>Info!</strong> Best check yourself, you're not looking too good.</p>
1331
+ </div>
1332
+
1333
+ <h4>Warning</h4>
1334
+ <div class="alert ">
1335
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1336
+ <strong>Warning!</strong> Best check yourself, you're not looking too good.
1337
+ </div>
1338
+ <div class="alert alert-block alert-warning">
1339
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1340
+ <p><strong>Warning!</strong> Best check yourself, you're not looking too good.</p>
1341
+ </div>
1342
+
1343
+ <h4>Error</h4>
1344
+ <div class="alert alert-error">
1345
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1346
+ <strong>Error!</strong> Best check yourself, you're not looking too good.
1347
+ </div>
1348
+ <div class="alert alert-block alert-error">
1349
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
1350
+ <p><strong>Error!</strong> Best check yourself, you're not looking too good.</p>
1351
+ </div>
1298
1352
 
1299
1353
 
1300
1354
  </div><!-- /container -->
@@ -164,8 +164,6 @@
164
164
  margin-left: 0;
165
165
  }
166
166
  // Carets in other button sizes
167
- .btn-mini .caret,
168
- .btn-small .caret,
169
167
  .btn-large .caret {
170
168
  margin-top: 6px;
171
169
  }
@@ -174,6 +172,10 @@
174
172
  border-right-width: 5px;
175
173
  border-top-width: 5px;
176
174
  }
175
+ .btn-mini .caret,
176
+ .btn-small .caret {
177
+ margin-top: 8px;
178
+ }
177
179
  // Upside down carets for .dropup
178
180
  .dropup .btn-large .caret {
179
181
  border-bottom-width: 5px;
@@ -25,13 +25,14 @@
25
25
  @include ie7-restore-left-whitespace(); // Give IE7 some love
26
26
  @include box-shadow(inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05));
27
27
 
28
- // Hover state
29
- &:hover {
28
+ // Hover/focus state
29
+ &:hover,
30
+ &:focus {
30
31
  color: $grayDark;
31
32
  text-decoration: none;
32
33
  background-position: 0 -15px;
33
34
 
34
- // transition is only when going to hover, otherwise the background
35
+ // transition is only when going to hover/focus, otherwise the background
35
36
  // behind the gradient (there for IE<=9 fallback) gets mismatched
36
37
  @include transition(background-position .1s linear);
37
38
  }
@@ -141,11 +142,6 @@ input[type="button"] {
141
142
 
142
143
  // Set the backgrounds
143
144
  // -------------------------
144
- .btn {
145
- // reset here as of 2.0.3 due to Recess property order
146
- border-color: #c5c5c5;
147
- border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
148
- }
149
145
  .btn-primary {
150
146
  @include buttonBackground($btnPrimaryBackground, $btnPrimaryBackgroundHighlight);
151
147
  }
@@ -219,12 +215,14 @@ input[type="submit"].btn {
219
215
  color: $linkColor;
220
216
  @include border-radius(0);
221
217
  }
222
- .btn-link:hover {
218
+ .btn-link:hover,
219
+ .btn-link:focus {
223
220
  color: $linkColorHover;
224
221
  text-decoration: underline;
225
222
  background-color: transparent;
226
223
  }
227
- .btn-link[disabled]:hover {
224
+ .btn-link[disabled]:hover,
225
+ .btn-link[disabled]:focus {
228
226
  color: $grayDark;
229
227
  text-decoration: none;
230
228
  }
@@ -21,12 +21,13 @@
21
21
  display: none;
22
22
  position: relative;
23
23
  @include transition(.6s ease-in-out left);
24
- }
25
24
 
26
25
  // Account for jankitude on images
27
- > .item > img {
28
- display: block;
29
- line-height: 1;
26
+ > img,
27
+ > a > img {
28
+ display: block;
29
+ line-height: 1;
30
+ }
30
31
  }
31
32
 
32
33
  > .active,
@@ -97,14 +98,40 @@
97
98
  right: 15px;
98
99
  }
99
100
 
100
- // Hover state
101
- &:hover {
101
+ // Hover/focus state
102
+ &:hover,
103
+ &:focus {
102
104
  color: $white;
103
105
  text-decoration: none;
104
106
  @include opacity(90);
105
107
  }
106
108
  }
107
109
 
110
+ // Carousel indicator pips
111
+ // -----------------------------
112
+ .carousel-indicators {
113
+ position: absolute;
114
+ top: 15px;
115
+ right: 15px;
116
+ z-index: 5;
117
+ margin: 0;
118
+ list-style: none;
119
+
120
+ li {
121
+ display: block;
122
+ float: left;
123
+ width: 10px;
124
+ height: 10px;
125
+ margin-left: 5px;
126
+ text-indent: -999px;
127
+ background-color: #ccc;
128
+ background-color: rgba(255,255,255,.25);
129
+ border-radius: 5px;
130
+ }
131
+ .active {
132
+ background-color: #fff;
133
+ }
134
+ }
108
135
 
109
136
  // Caption for text below images
110
137
  // -----------------------------
@@ -11,7 +11,8 @@
11
11
  color: $black;
12
12
  text-shadow: 0 1px 0 rgba(255,255,255,1);
13
13
  @include opacity(20);
14
- &:hover {
14
+ &:hover,
15
+ &:focus {
15
16
  color: $black;
16
17
  text-decoration: none;
17
18
  cursor: pointer;
@@ -72,7 +72,7 @@
72
72
  }
73
73
 
74
74
  // Links within the dropdown menu
75
- li > a {
75
+ > li > a {
76
76
  display: block;
77
77
  padding: 3px 20px;
78
78
  clear: both;
@@ -83,11 +83,12 @@
83
83
  }
84
84
  }
85
85
 
86
- // Hover state
86
+ // Hover/Focus state
87
87
  // -----------
88
- .dropdown-menu li > a:hover,
89
- .dropdown-menu li > a:focus,
90
- .dropdown-submenu:hover > a {
88
+ .dropdown-menu > li > a:hover,
89
+ .dropdown-menu > li > a:focus,
90
+ .dropdown-submenu:hover > a,
91
+ .dropdown-submenu:focus > a {
91
92
  text-decoration: none;
92
93
  color: $dropdownLinkColorHover;
93
94
  @include gradient-vertical($dropdownLinkBackgroundHover, darken($dropdownLinkBackgroundHover, 5%));
@@ -95,8 +96,9 @@
95
96
 
96
97
  // Active state
97
98
  // ------------
98
- .dropdown-menu .active > a,
99
- .dropdown-menu .active > a:hover {
99
+ .dropdown-menu > .active > a,
100
+ .dropdown-menu > .active > a:hover,
101
+ .dropdown-menu > .active > a:focus {
100
102
  color: $dropdownLinkColorActive;
101
103
  text-decoration: none;
102
104
  outline: 0;
@@ -105,13 +107,15 @@
105
107
 
106
108
  // Disabled state
107
109
  // --------------
108
- // Gray out text and ensure the hover state remains gray
109
- .dropdown-menu .disabled > a,
110
- .dropdown-menu .disabled > a:hover {
110
+ // Gray out text and ensure the hover/focus state remains gray
111
+ .dropdown-menu > .disabled > a,
112
+ .dropdown-menu > .disabled > a:hover,
113
+ .dropdown-menu > .disabled > a:focus {
111
114
  color: $grayLight;
112
115
  }
113
- // Nuke hover effects
114
- .dropdown-menu .disabled > a:hover {
116
+ // Nuke hover/focus effects
117
+ .dropdown-menu > .disabled > a:hover,
118
+ .dropdown-menu > .disabled > a:focus {
115
119
  text-decoration: none;
116
120
  background-color: transparent;
117
121
  background-image: none; // Remove CSS gradient
@@ -421,7 +421,9 @@ select:focus:invalid {
421
421
  // Allow us to put symbols and text within the input field for a cleaner look
422
422
  .input-append,
423
423
  .input-prepend {
424
- margin-bottom: 5px;
424
+ display: inline-block;
425
+ margin-bottom: $baseLineHeight / 2;
426
+ vertical-align: middle;
425
427
  font-size: 0; // white space collapse hack
426
428
  white-space: nowrap; // Prevent span and input from separating
427
429
 
@@ -429,7 +431,8 @@ select:focus:invalid {
429
431
  input,
430
432
  select,
431
433
  .uneditable-input,
432
- .dropdown-menu {
434
+ .dropdown-menu,
435
+ .popover {
433
436
  font-size: $baseFontSize;
434
437
  }
435
438
 
@@ -35,10 +35,12 @@
35
35
  }
36
36
  }
37
37
 
38
- // Hover state, but only for links
38
+ // Hover/focus state, but only for links
39
39
  a {
40
40
  &.label:hover,
41
- &.badge:hover {
41
+ &.label:focus,
42
+ &.badge:hover,
43
+ &.badge:focus {
42
44
  color: $white;
43
45
  text-decoration: none;
44
46
  cursor: pointer;
@@ -37,10 +37,10 @@
37
37
  // Media image alignment
38
38
  // -------------------------
39
39
 
40
- .media .pull-left {
40
+ .media > .pull-left {
41
41
  margin-right: 10px;
42
42
  }
43
- .media .pull-right {
43
+ .media > .pull-right {
44
44
  margin-left: 10px;
45
45
  }
46
46
 
@@ -244,7 +244,7 @@
244
244
  }
245
245
 
246
246
  // Drop shadows
247
- @mixin box-shadow($shadow...) {
247
+ @mixin box-shadow($shadow...) {
248
248
  -webkit-box-shadow: $shadow;
249
249
  -moz-box-shadow: $shadow;
250
250
  box-shadow: $shadow;
@@ -263,6 +263,12 @@
263
263
  -o-transition-delay: $transition-delay;
264
264
  transition-delay: $transition-delay;
265
265
  }
266
+ @mixin transition-duration($transition-duration) {
267
+ -webkit-transition-duration: $transition-duration;
268
+ -moz-transition-duration: $transition-duration;
269
+ -o-transition-duration: $transition-duration;
270
+ transition-duration: $transition-duration;
271
+ }
266
272
 
267
273
  // Transformations
268
274
  @mixin rotate($degrees) {
@@ -493,7 +499,7 @@
493
499
  @include reset-filter();
494
500
 
495
501
  // in these cases the gradient won't cover the background, so we override
496
- &:hover, &:active, &.active, &.disabled, &[disabled] {
502
+ &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
497
503
  color: $textColor;
498
504
  background-color: $endColor;
499
505
  *background-color: darken($endColor, 5%);
@@ -23,11 +23,11 @@
23
23
  // Base modal
24
24
  .modal {
25
25
  position: fixed;
26
- top: 50%;
26
+ top: 10%;
27
27
  left: 50%;
28
28
  z-index: $zindexModal;
29
29
  width: 560px;
30
- margin: -250px 0 0 -280px;
30
+ margin-left: -280px;
31
31
  background-color: $white;
32
32
  border: 1px solid #999;
33
33
  border: 1px solid rgba(0,0,0,.3);
@@ -42,7 +42,7 @@
42
42
  @include transition(opacity .3s linear, top .3s ease-out);
43
43
  top: -25%;
44
44
  }
45
- &.fade.in { top: 50%; }
45
+ &.fade.in { top: 10%; }
46
46
  }
47
47
  .modal-header {
48
48
  padding: 9px 15px;