twitter-bootstrap-rails 2.1.1 → 2.1.2

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.

Files changed (71) hide show
  1. data/README.md +14 -3
  2. data/app/helpers/bootstrap_flash_helper.rb +12 -0
  3. data/lib/generators/bootstrap/layout/templates/layout.html.erb +1 -0
  4. data/lib/generators/bootstrap/layout/templates/layout.html.haml +1 -0
  5. data/lib/generators/bootstrap/layout/templates/layout.html.slim +1 -0
  6. data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
  7. data/lib/generators/bootstrap/partial/templates/_login.html.erb +29 -0
  8. data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +13 -0
  9. data/lib/generators/bootstrap/themed/templates/index.html.erb +1 -1
  10. data/lib/generators/bootstrap/themed/templates/index.html.haml +1 -1
  11. data/lib/generators/bootstrap/themed/templates/index.html.slim +1 -1
  12. data/lib/generators/bootstrap/themed/templates/show.html.erb +1 -1
  13. data/lib/generators/bootstrap/themed/templates/show.html.haml +1 -1
  14. data/lib/generators/bootstrap/themed/templates/show.html.slim +1 -1
  15. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  16. data/vendor/assets/javascripts/twitter/bootstrap.js +1 -0
  17. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +104 -0
  18. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +1 -1
  19. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +1 -1
  20. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +12 -5
  21. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +4 -3
  22. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +66 -16
  23. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +95 -74
  24. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +9 -4
  25. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +9 -9
  26. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +2 -2
  27. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +15 -15
  28. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +2 -3
  29. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +51 -40
  30. data/vendor/toolkit/fontawesome.less +5 -5
  31. data/vendor/toolkit/twitter/bootstrap/accordion.less +3 -2
  32. data/vendor/toolkit/twitter/bootstrap/alerts.less +16 -9
  33. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +1 -1
  34. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +10 -10
  35. data/vendor/toolkit/twitter/bootstrap/button-groups.less +76 -23
  36. data/vendor/toolkit/twitter/bootstrap/buttons.less +85 -65
  37. data/vendor/toolkit/twitter/bootstrap/carousel.less +13 -3
  38. data/vendor/toolkit/twitter/bootstrap/close.less +4 -2
  39. data/vendor/toolkit/twitter/bootstrap/code.less +6 -5
  40. data/vendor/toolkit/twitter/bootstrap/component-animations.less +5 -2
  41. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +81 -14
  42. data/vendor/toolkit/twitter/bootstrap/forms.less +100 -48
  43. data/vendor/toolkit/twitter/bootstrap/grid.less +17 -1
  44. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +4 -2
  45. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +19 -2
  46. data/vendor/toolkit/twitter/bootstrap/layouts.less +1 -2
  47. data/vendor/toolkit/twitter/bootstrap/mixins.less +98 -73
  48. data/vendor/toolkit/twitter/bootstrap/modals.less +9 -2
  49. data/vendor/toolkit/twitter/bootstrap/navbar.less +238 -127
  50. data/vendor/toolkit/twitter/bootstrap/navs.less +38 -17
  51. data/vendor/toolkit/twitter/bootstrap/pager.less +5 -4
  52. data/vendor/toolkit/twitter/bootstrap/pagination.less +16 -8
  53. data/vendor/toolkit/twitter/bootstrap/popovers.less +101 -33
  54. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +18 -13
  55. data/vendor/toolkit/twitter/bootstrap/reset.less +6 -3
  56. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +9 -7
  57. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +86 -68
  58. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +7 -5
  59. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +18 -5
  60. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +17 -15
  61. data/vendor/toolkit/twitter/bootstrap/responsive.less +5 -5
  62. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +26 -4
  63. data/vendor/toolkit/twitter/bootstrap/sprites.less +15 -19
  64. data/vendor/toolkit/twitter/bootstrap/tables.less +60 -11
  65. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +9 -4
  66. data/vendor/toolkit/twitter/bootstrap/tooltip.less +47 -12
  67. data/vendor/toolkit/twitter/bootstrap/type.less +57 -92
  68. data/vendor/toolkit/twitter/bootstrap/utilities.less +9 -2
  69. data/vendor/toolkit/twitter/bootstrap/variables.less +100 -29
  70. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -5
  71. metadata +16 -22
@@ -1,7 +1,6 @@
1
1
  //
2
- // Tables.less
3
- // Tables for, you guessed it, tabular data
4
- // ----------------------------------------
2
+ // Tables
3
+ // --------------------------------------------------
5
4
 
6
5
 
7
6
  // BASE TABLES
@@ -70,7 +69,7 @@ table {
70
69
  .table-bordered {
71
70
  border: 1px solid @tableBorder;
72
71
  border-collapse: separate; // Done so we can round those corners!
73
- *border-collapse: collapsed; // IE7 can't round corners anyway
72
+ *border-collapse: collapse; // IE7 can't round corners anyway
74
73
  border-left: 0;
75
74
  .border-radius(4px);
76
75
  th,
@@ -104,21 +103,44 @@ table {
104
103
  }
105
104
  // For first th or td in the first row in the first thead or tbody
106
105
  thead:last-child tr:last-child th:first-child,
107
- tbody:last-child tr:last-child td:first-child {
106
+ tbody:last-child tr:last-child td:first-child,
107
+ tfoot:last-child tr:last-child td:first-child {
108
108
  .border-radius(0 0 0 4px);
109
109
  -webkit-border-bottom-left-radius: 4px;
110
110
  border-bottom-left-radius: 4px;
111
111
  -moz-border-radius-bottomleft: 4px;
112
112
  }
113
113
  thead:last-child tr:last-child th:last-child,
114
- tbody:last-child tr:last-child td:last-child {
114
+ tbody:last-child tr:last-child td:last-child,
115
+ tfoot:last-child tr:last-child td:last-child {
115
116
  -webkit-border-bottom-right-radius: 4px;
116
117
  border-bottom-right-radius: 4px;
117
118
  -moz-border-radius-bottomright: 4px;
118
119
  }
120
+
121
+ // Special fixes to round the left border on the first td/th
122
+ caption + thead tr:first-child th:first-child,
123
+ caption + tbody tr:first-child td:first-child,
124
+ colgroup + thead tr:first-child th:first-child,
125
+ colgroup + tbody tr:first-child td:first-child {
126
+ -webkit-border-top-left-radius: 4px;
127
+ border-top-left-radius: 4px;
128
+ -moz-border-radius-topleft: 4px;
129
+ }
130
+ caption + thead tr:first-child th:last-child,
131
+ caption + tbody tr:first-child td:last-child,
132
+ colgroup + thead tr:first-child th:last-child,
133
+ colgroup + tbody tr:first-child td:last-child {
134
+ -webkit-border-top-right-radius: 4px;
135
+ border-top-right-radius: 4px;
136
+ -moz-border-right-topleft: 4px;
137
+ }
138
+
119
139
  }
120
140
 
121
141
 
142
+
143
+
122
144
  // ZEBRA-STRIPING
123
145
  // --------------
124
146
 
@@ -136,10 +158,12 @@ table {
136
158
  // HOVER EFFECT
137
159
  // ------------
138
160
  // Placed here since it has to come after the potential zebra striping
139
- .table {
140
- tbody tr:hover td,
141
- tbody tr:hover th {
142
- background-color: @tableBackgroundHover;
161
+ .table-hover {
162
+ tbody {
163
+ tr:hover td,
164
+ tr:hover th {
165
+ background-color: @tableBackgroundHover;
166
+ }
143
167
  }
144
168
  }
145
169
 
@@ -147,7 +171,15 @@ table {
147
171
  // TABLE CELL SIZING
148
172
  // -----------------
149
173
 
150
- // Change the columns
174
+ // Reset default grid behavior
175
+ table [class*=span],
176
+ .row-fluid table [class*=span] {
177
+ display: table-cell;
178
+ float: none; // undo default grid column styles
179
+ margin-left: 0; // undo default grid column styles
180
+ }
181
+
182
+ // Change the column widths to account for td/th padding
151
183
  table {
152
184
  .span1 { .tableColumns(1); }
153
185
  .span2 { .tableColumns(2); }
@@ -174,3 +206,20 @@ table {
174
206
  .span23 { .tableColumns(23); }
175
207
  .span24 { .tableColumns(24); }
176
208
  }
209
+
210
+
211
+ // TABLE BACKGROUNDS
212
+ // -----------------
213
+ // Exact selectors below required to override .table-striped
214
+
215
+ .table {
216
+ tbody tr.success td {
217
+ background-color: @successBackground;
218
+ }
219
+ tbody tr.error td {
220
+ background-color: @errorBackground;
221
+ }
222
+ tbody tr.info td {
223
+ background-color: @infoBackground;
224
+ }
225
+ }
@@ -1,5 +1,8 @@
1
- // THUMBNAILS
2
- // ----------
1
+ //
2
+ // Thumbnails
3
+ // --------------------------------------------------
4
+
5
+
3
6
  // Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files
4
7
 
5
8
  // Make wrapper ul behave like the grid
@@ -24,10 +27,11 @@
24
27
  .thumbnail {
25
28
  display: block;
26
29
  padding: 4px;
27
- line-height: 1;
30
+ line-height: @baseLineHeight;
28
31
  border: 1px solid #ddd;
29
32
  .border-radius(4px);
30
- .box-shadow(0 1px 1px rgba(0,0,0,.075));
33
+ .box-shadow(0 1px 3px rgba(0,0,0,.055));
34
+ .transition(all .2s ease-in-out);
31
35
  }
32
36
  // Add a hover state for linked versions only
33
37
  a.thumbnail:hover {
@@ -44,4 +48,5 @@ a.thumbnail:hover {
44
48
  }
45
49
  .thumbnail .caption {
46
50
  padding: 9px;
51
+ color: @gray;
47
52
  }
@@ -1,6 +1,9 @@
1
- // TOOLTIP
2
- // ------=
1
+ //
2
+ // Tooltips
3
+ // --------------------------------------------------
3
4
 
5
+
6
+ // Base class
4
7
  .tooltip {
5
8
  position: absolute;
6
9
  z-index: @zindexTooltip;
@@ -10,26 +13,58 @@
10
13
  font-size: 11px;
11
14
  .opacity(0);
12
15
  &.in { .opacity(80); }
13
- &.top { margin-top: -2px; }
14
- &.right { margin-left: 2px; }
15
- &.bottom { margin-top: 2px; }
16
- &.left { margin-left: -2px; }
17
- &.top .tooltip-arrow { #popoverArrow > .top(); }
18
- &.left .tooltip-arrow { #popoverArrow > .left(); }
19
- &.bottom .tooltip-arrow { #popoverArrow > .bottom(); }
20
- &.right .tooltip-arrow { #popoverArrow > .right(); }
16
+ &.top { margin-top: -3px; }
17
+ &.right { margin-left: 3px; }
18
+ &.bottom { margin-top: 3px; }
19
+ &.left { margin-left: -3px; }
21
20
  }
21
+
22
+ // Wrapper for the tooltip content
22
23
  .tooltip-inner {
23
24
  max-width: 200px;
24
25
  padding: 3px 8px;
25
- color: @white;
26
+ color: @tooltipColor;
26
27
  text-align: center;
27
28
  text-decoration: none;
28
- background-color: @black;
29
+ background-color: @tooltipBackground;
29
30
  .border-radius(4px);
30
31
  }
32
+
33
+ // Arrows
31
34
  .tooltip-arrow {
32
35
  position: absolute;
33
36
  width: 0;
34
37
  height: 0;
38
+ border-color: transparent;
39
+ border-style: solid;
40
+ }
41
+ .tooltip {
42
+ &.top .tooltip-arrow {
43
+ bottom: 0;
44
+ left: 50%;
45
+ margin-left: -@tooltipArrowWidth;
46
+ border-width: @tooltipArrowWidth @tooltipArrowWidth 0;
47
+ border-top-color: @tooltipArrowColor;
48
+ }
49
+ &.right .tooltip-arrow {
50
+ top: 50%;
51
+ left: 0;
52
+ margin-top: -@tooltipArrowWidth;
53
+ border-width: @tooltipArrowWidth @tooltipArrowWidth @tooltipArrowWidth 0;
54
+ border-right-color: @tooltipArrowColor;
55
+ }
56
+ &.left .tooltip-arrow {
57
+ top: 50%;
58
+ right: 0;
59
+ margin-top: -@tooltipArrowWidth;
60
+ border-width: @tooltipArrowWidth 0 @tooltipArrowWidth @tooltipArrowWidth;
61
+ border-left-color: @tooltipArrowColor;
62
+ }
63
+ &.bottom .tooltip-arrow {
64
+ top: 0;
65
+ left: 50%;
66
+ margin-left: -@tooltipArrowWidth;
67
+ border-width: 0 @tooltipArrowWidth @tooltipArrowWidth;
68
+ border-bottom-color: @tooltipArrowColor;
69
+ }
35
70
  }
@@ -1,17 +1,13 @@
1
- // Typography.less
2
- // Headings, body text, lists, code, and more for a versatile and durable typography system
3
- // ----------------------------------------------------------------------------------------
1
+ //
2
+ // Typography
3
+ // --------------------------------------------------
4
4
 
5
5
 
6
- // BODY TEXT
7
- // ---------
6
+ // Body text
7
+ // -------------------------
8
8
 
9
9
  p {
10
10
  margin: 0 0 @baseLineHeight / 2;
11
- small {
12
- font-size: @baseFontSize - 2;
13
- color: @grayLight;
14
- }
15
11
  }
16
12
  .lead {
17
13
  margin-bottom: @baseLineHeight;
@@ -20,73 +16,69 @@ p {
20
16
  line-height: @baseLineHeight * 1.5;
21
17
  }
22
18
 
23
- // HEADINGS
24
- // --------
19
+
20
+ // Emphasis & misc
21
+ // -------------------------
22
+
23
+ small {
24
+ font-size: 85%; // Ex: 14px base font * 85% = about 12px
25
+ }
26
+ strong {
27
+ font-weight: bold;
28
+ }
29
+ em {
30
+ font-style: italic;
31
+ }
32
+ cite {
33
+ font-style: normal;
34
+ }
35
+ .muted {
36
+ color: @grayLight;
37
+ }
38
+
39
+
40
+ // Headings
41
+ // -------------------------
25
42
 
26
43
  h1, h2, h3, h4, h5, h6 {
27
- margin: 0;
44
+ margin: (@baseLineHeight / 2) 0;
28
45
  font-family: @headingsFontFamily;
29
46
  font-weight: @headingsFontWeight;
47
+ line-height: 1;
30
48
  color: @headingsColor;
31
49
  text-rendering: optimizelegibility; // Fix the character spacing for headings
32
50
  small {
33
51
  font-weight: normal;
52
+ line-height: 1;
34
53
  color: @grayLight;
35
54
  }
36
55
  }
37
- h1 {
38
- font-size: 30px;
39
- line-height: @baseLineHeight * 2;
40
- small {
41
- font-size: 18px;
42
- }
43
- }
44
- h2 {
45
- font-size: 24px;
46
- line-height: @baseLineHeight * 2;
47
- small {
48
- font-size: 18px;
49
- }
50
- }
51
- h3 {
52
- font-size: 18px;
53
- line-height: @baseLineHeight * 1.5;
54
- small {
55
- font-size: 14px;
56
- }
57
- }
58
- h4, h5, h6 {
59
- line-height: @baseLineHeight;
60
- }
61
- h4 {
62
- font-size: 14px;
63
- small {
64
- font-size: 12px;
65
- }
66
- }
67
- h5 {
68
- font-size: 12px;
69
- }
70
- h6 {
71
- font-size: 11px;
72
- color: @grayLight;
73
- text-transform: uppercase;
74
- }
56
+ h1 { font-size: 36px; line-height: 40px; }
57
+ h2 { font-size: 30px; line-height: 40px; }
58
+ h3 { font-size: 24px; line-height: 40px; }
59
+ h4 { font-size: 18px; line-height: 20px; }
60
+ h5 { font-size: 14px; line-height: 20px; }
61
+ h6 { font-size: 12px; line-height: 20px; }
62
+
63
+ h1 small { font-size: 24px; }
64
+ h2 small { font-size: 18px; }
65
+ h3 small { font-size: 14px; }
66
+ h4 small { font-size: 14px; }
67
+
75
68
 
76
69
  // Page header
70
+ // -------------------------
71
+
77
72
  .page-header {
78
- padding-bottom: @baseLineHeight - 1;
79
- margin: @baseLineHeight 0;
73
+ padding-bottom: (@baseLineHeight / 2) - 1;
74
+ margin: @baseLineHeight 0 (@baseLineHeight * 1.5);
80
75
  border-bottom: 1px solid @grayLighter;
81
76
  }
82
- .page-header h1 {
83
- line-height: 1;
84
- }
85
77
 
86
78
 
87
79
 
88
- // LISTS
89
- // -----
80
+ // Lists
81
+ // --------------------------------------------------
90
82
 
91
83
  // Unordered and Ordered lists
92
84
  ul, ol {
@@ -99,12 +91,6 @@ ol ol,
99
91
  ol ul {
100
92
  margin-bottom: 0;
101
93
  }
102
- ul {
103
- list-style: disc;
104
- }
105
- ol {
106
- list-style: decimal;
107
- }
108
94
  li {
109
95
  line-height: @baseLineHeight;
110
96
  }
@@ -124,11 +110,6 @@ dd {
124
110
  }
125
111
  dt {
126
112
  font-weight: bold;
127
- // The following fix causes the issue: https://github.com/twitter/bootstrap/issues/3806
128
- // which is a problem in the bootstrap:themed show view as noted here:
129
- // https://github.com/seyhunak/twitter-bootstrap-rails/issues/274
130
- // so we're commenting it out.
131
- //line-height: @baseLineHeight - 1; // fix jank Helvetica Neue font bug
132
113
  }
133
114
  dd {
134
115
  margin-left: @baseLineHeight / 2;
@@ -145,11 +126,6 @@ dd {
145
126
  dd {
146
127
  margin-left: 130px;
147
128
  }
148
- &:after {
149
- display: table;
150
- content: "";
151
- clear: both;
152
- }
153
129
  }
154
130
 
155
131
  // MISC
@@ -163,17 +139,6 @@ hr {
163
139
  border-bottom: 1px solid @white;
164
140
  }
165
141
 
166
- // Emphasis
167
- strong {
168
- font-weight: bold;
169
- }
170
- em {
171
- font-style: italic;
172
- }
173
- .muted {
174
- color: @grayLight;
175
- }
176
-
177
142
  // Abbreviations and acronyms
178
143
  abbr[title] {
179
144
  cursor: help;
@@ -213,6 +178,14 @@ blockquote {
213
178
  small {
214
179
  text-align: right;
215
180
  }
181
+ small {
182
+ &:before {
183
+ content: '';
184
+ }
185
+ &:after {
186
+ content: '\00A0 \2014';
187
+ }
188
+ }
216
189
  }
217
190
  }
218
191
 
@@ -231,11 +204,3 @@ address {
231
204
  font-style: normal;
232
205
  line-height: @baseLineHeight;
233
206
  }
234
-
235
- // Misc
236
- small {
237
- font-size: 100%;
238
- }
239
- cite {
240
- font-style: normal;
241
- }