anjlab-bootstrap-rails 2.0.4.4 → 2.1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/README.md +21 -20
  2. data/Rakefile +39 -26
  3. data/lib/bootstrap-rails/engine.rb +3 -0
  4. data/lib/bootstrap-rails/version.rb +1 -1
  5. data/vendor/assets/images/{glyphicons-halflings-white.png → twitter/glyphicons-halflings-white.png} +0 -0
  6. data/vendor/assets/images/twitter/glyphicons-halflings.png +0 -0
  7. data/vendor/assets/javascripts/twitter/bootstrap.js +13 -0
  8. data/vendor/assets/javascripts/twitter/bootstrap/affix.js +104 -0
  9. data/vendor/assets/javascripts/{bootstrap-alert.js → twitter/bootstrap/alert.js} +1 -1
  10. data/vendor/assets/javascripts/{bootstrap-button.js → twitter/bootstrap/button.js} +1 -1
  11. data/vendor/assets/javascripts/{bootstrap-carousel.js → twitter/bootstrap/carousel.js} +12 -5
  12. data/vendor/assets/javascripts/{bootstrap-collapse.js → twitter/bootstrap/collapse.js} +4 -3
  13. data/vendor/assets/javascripts/{bootstrap-dropdown.js → twitter/bootstrap/dropdown.js} +66 -16
  14. data/vendor/assets/javascripts/{bootstrap-modal.js → twitter/bootstrap/modal.js} +95 -74
  15. data/vendor/assets/javascripts/{bootstrap-popover.js → twitter/bootstrap/popover.js} +9 -4
  16. data/vendor/assets/javascripts/{bootstrap-scrollspy.js → twitter/bootstrap/scrollspy.js} +9 -9
  17. data/vendor/assets/javascripts/{bootstrap-tab.js → twitter/bootstrap/tab.js} +2 -2
  18. data/vendor/assets/javascripts/{bootstrap-tooltip.js → twitter/bootstrap/tooltip.js} +15 -15
  19. data/vendor/assets/javascripts/{bootstrap-transition.js → twitter/bootstrap/transition.js} +2 -3
  20. data/vendor/assets/javascripts/{bootstrap-typeahead.js → twitter/bootstrap/typeahead.js} +50 -35
  21. data/vendor/assets/stylesheets/twitter/bootstrap-responsive.scss +1 -0
  22. data/vendor/assets/stylesheets/twitter/bootstrap.scss +1 -0
  23. data/vendor/frameworks/twitter/bootstrap.scss +1 -0
  24. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/accordion.scss +3 -2
  25. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/alerts.scss +15 -8
  26. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/bootstrap.scss +1 -1
  27. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/breadcrumbs.scss +10 -10
  28. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/button-groups.scss +76 -23
  29. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/buttons.scss +76 -56
  30. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/carousel.scss +13 -3
  31. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/close.scss +4 -2
  32. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/code.scss +6 -5
  33. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/component-animations.scss +5 -2
  34. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/dropdowns.scss +81 -14
  35. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/forms.scss +99 -46
  36. data/vendor/frameworks/twitter/bootstrap/grid.scss +21 -0
  37. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/hero-unit.scss +4 -2
  38. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/labels-badges.scss +19 -2
  39. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/layouts.scss +1 -2
  40. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/mixins.scss +105 -81
  41. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/modals.scss +9 -2
  42. data/vendor/frameworks/twitter/bootstrap/navbar.scss +468 -0
  43. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/navs.scss +38 -17
  44. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/pager.scss +5 -4
  45. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/pagination.scss +16 -8
  46. data/vendor/frameworks/twitter/bootstrap/popovers.scss +117 -0
  47. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/progress-bars.scss +18 -13
  48. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/reset.scss +6 -3
  49. data/vendor/frameworks/twitter/bootstrap/responsive-1200px-min.scss +28 -0
  50. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/responsive-767px-max.scss +83 -69
  51. data/vendor/frameworks/twitter/bootstrap/responsive-768px-979px.scss +19 -0
  52. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/responsive-navbar.scss +17 -4
  53. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/responsive-utilities.scss +17 -15
  54. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/responsive.scss +5 -5
  55. data/vendor/frameworks/twitter/bootstrap/scaffolding.scss +51 -0
  56. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/sprites.scss +17 -20
  57. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/tables.scss +60 -15
  58. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/thumbnails.scss +9 -4
  59. data/vendor/frameworks/twitter/bootstrap/tooltip.scss +70 -0
  60. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/type.scss +56 -83
  61. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/utilities.scss +9 -2
  62. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/variables.scss +109 -36
  63. data/vendor/{assets/stylesheets → frameworks/twitter/bootstrap}/wells.scss +7 -5
  64. metadata +63 -59
  65. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  66. data/vendor/assets/javascripts/bootstrap.js +0 -12
  67. data/vendor/assets/stylesheets/grid.scss +0 -5
  68. data/vendor/assets/stylesheets/navbar.scss +0 -358
  69. data/vendor/assets/stylesheets/popovers.scss +0 -49
  70. data/vendor/assets/stylesheets/responsive-1200px-min.scss +0 -26
  71. data/vendor/assets/stylesheets/responsive-768px-979px.scss +0 -17
  72. data/vendor/assets/stylesheets/scaffolding.scss +0 -29
  73. data/vendor/assets/stylesheets/tooltip.scss +0 -35
@@ -0,0 +1 @@
1
+ @import "twitter/bootstrap/responsive.scss";
@@ -0,0 +1 @@
1
+ @import "twitter/bootstrap/bootstrap.scss";
@@ -0,0 +1 @@
1
+ @import "bootstrap/bootstrap.scss";
@@ -1,5 +1,6 @@
1
- // ACCORDION
2
- // ---------
1
+ //
2
+ // Accordion
3
+ // --------------------------------------------------
3
4
 
4
5
 
5
6
  // Parent container
@@ -1,7 +1,11 @@
1
- // ALERT STYLES
2
- // ------------
1
+ //
2
+ // Alerts
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base styles
7
+ // -------------------------
3
8
 
4
- // Base alert styles
5
9
  .alert {
6
10
  padding: 8px 35px 8px 14px;
7
11
  margin-bottom: $baseLineHeight;
@@ -11,8 +15,8 @@
11
15
  @include border-radius(4px);
12
16
  color: $warningText;
13
17
  }
14
- .alert-heading {
15
- color: inherit;
18
+ .alert h4 {
19
+ margin: 0;
16
20
  }
17
21
 
18
22
  // Adjust close link position
@@ -20,11 +24,12 @@
20
24
  position: relative;
21
25
  top: -2px;
22
26
  right: -21px;
23
- line-height: 18px;
27
+ line-height: $baseLineHeight;
24
28
  }
25
29
 
30
+
26
31
  // Alternate styles
27
- // ----------------
32
+ // -------------------------
28
33
 
29
34
  .alert-success {
30
35
  background-color: $successBackground;
@@ -43,8 +48,10 @@
43
48
  color: $infoText;
44
49
  }
45
50
 
51
+
46
52
  // Block alerts
47
- // ------------------------
53
+ // -------------------------
54
+
48
55
  .alert-block {
49
56
  padding-top: 14px;
50
57
  padding-bottom: 14px;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v2.0.4
2
+ * Bootstrap v2.1.0
3
3
  *
4
4
  * Copyright 2012 Twitter, Inc
5
5
  * Licensed under the Apache License v2.0
@@ -1,14 +1,14 @@
1
- // BREADCRUMBS
2
- // -----------
1
+ //
2
+ // Breadcrumbs
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  .breadcrumb {
5
- padding: 7px 14px;
7
+ padding: 8px 15px;
6
8
  margin: 0 0 $baseLineHeight;
7
9
  list-style: none;
8
- @include gradient-vertical($white, #f5f5f5);
9
- border: 1px solid #ddd;
10
- @include border-radius(3px);
11
- @include box-shadow(inset 0 1px 0 $white);
10
+ background-color: #f5f5f5;
11
+ @include border-radius(4px);
12
12
  li {
13
13
  display: inline-block;
14
14
  @include ie7-inline-block();
@@ -16,9 +16,9 @@
16
16
  }
17
17
  .divider {
18
18
  padding: 0 5px;
19
- color: $grayLight;
19
+ color: #ccc;
20
20
  }
21
- .active a {
22
- color: $grayDark;
21
+ .active {
22
+ color: $grayLight;
23
23
  }
24
24
  }
@@ -1,11 +1,13 @@
1
- // BUTTON GROUPS
2
- // -------------
1
+ //
2
+ // Button groups
3
+ // --------------------------------------------------
3
4
 
4
5
 
5
6
  // Make the div behave like a button
6
7
  .btn-group {
7
8
  position: relative;
8
- @include clearfix(); // clears the floated buttons
9
+ font-size: 0; // remove as part 1 of font-size inline-block hack
10
+ white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
9
11
  @include ie7-restore-left-whitespace();
10
12
  }
11
13
 
@@ -16,21 +18,44 @@
16
18
 
17
19
  // Optional: Group multiple button groups together for a toolbar
18
20
  .btn-toolbar {
21
+ font-size: 0; // Hack to remove whitespace that results from using inline-block
19
22
  margin-top: $baseLineHeight / 2;
20
23
  margin-bottom: $baseLineHeight / 2;
21
24
  .btn-group {
22
25
  display: inline-block;
23
26
  @include ie7-inline-block();
24
27
  }
28
+ .btn + .btn,
29
+ .btn-group + .btn,
30
+ .btn + .btn-group {
31
+ margin-left: 5px;
32
+ }
25
33
  }
26
34
 
27
35
  // Float them, remove border radius, then re-add to first and last elements
28
36
  .btn-group > .btn {
29
37
  position: relative;
30
- float: left;
31
- margin-left: -1px;
32
38
  @include border-radius(0);
33
39
  }
40
+ .btn-group > .btn + .btn {
41
+ margin-left: -1px;
42
+ }
43
+ .btn-group > .btn,
44
+ .btn-group > .dropdown-menu {
45
+ font-size: $baseFontSize; // redeclare as part 2 of font-size inline-block hack
46
+ }
47
+
48
+ // Reset fonts for other sizes
49
+ .btn-group > .btn-mini {
50
+ font-size: 11px;
51
+ }
52
+ .btn-group > .btn-small {
53
+ font-size: 12px;
54
+ }
55
+ .btn-group > .btn-large {
56
+ font-size: 16px;
57
+ }
58
+
34
59
  // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
35
60
  .btn-group > .btn:first-child {
36
61
  margin-left: 0;
@@ -91,24 +116,28 @@
91
116
  // ----------------------
92
117
 
93
118
  // Give the line between buttons some depth
94
- .btn-group > .dropdown-toggle {
119
+ .btn-group > .btn + .dropdown-toggle {
95
120
  padding-left: 8px;
96
121
  padding-right: 8px;
97
122
  @include box-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)));
98
- *padding-top: 4px;
99
- *padding-bottom: 4px;
123
+ *padding-top: 5px;
124
+ *padding-bottom: 5px;
100
125
  }
101
- .btn-group > .btn-mini.dropdown-toggle {
126
+ .btn-group > .btn-mini + .dropdown-toggle {
102
127
  padding-left: 5px;
103
128
  padding-right: 5px;
129
+ *padding-top: 2px;
130
+ *padding-bottom: 2px;
104
131
  }
105
- .btn-group > .btn-small.dropdown-toggle {
106
- *padding-top: 4px;
132
+ .btn-group > .btn-small + .dropdown-toggle {
133
+ *padding-top: 5px;
107
134
  *padding-bottom: 4px;
108
135
  }
109
- .btn-group > .btn-large.dropdown-toggle {
136
+ .btn-group > .btn-large + .dropdown-toggle {
110
137
  padding-left: 12px;
111
138
  padding-right: 12px;
139
+ *padding-top: 7px;
140
+ *padding-bottom: 7px;
112
141
  }
113
142
 
114
143
  .btn-group.open {
@@ -147,22 +176,16 @@
147
176
 
148
177
  // Reposition the caret
149
178
  .btn .caret {
150
- margin-top: 7px;
179
+ margin-top: 8px;
151
180
  margin-left: 0;
152
181
  }
153
- .btn:hover .caret,
154
- .open.btn-group .caret {
155
- @include opacity(100);
156
- }
157
182
  // Carets in other button sizes
158
- .btn-mini .caret {
159
- margin-top: 5px;
160
- }
161
- .btn-small .caret {
183
+ .btn-mini .caret,
184
+ .btn-small .caret,
185
+ .btn-large .caret {
162
186
  margin-top: 6px;
163
187
  }
164
188
  .btn-large .caret {
165
- margin-top: 6px;
166
189
  border-left-width: 5px;
167
190
  border-right-width: 5px;
168
191
  border-top-width: 5px;
@@ -185,7 +208,37 @@
185
208
  .caret {
186
209
  border-top-color: $white;
187
210
  border-bottom-color: $white;
188
- @include opacity(75);
189
211
  }
190
212
  }
191
213
 
214
+
215
+
216
+ // Vertical button groups
217
+ // ----------------------
218
+
219
+ .btn-group-vertical {
220
+ display: inline-block; // makes buttons only take up the width they need
221
+ @include ie7-inline-block();
222
+ }
223
+ .btn-group-vertical .btn {
224
+ display: block;
225
+ float: none;
226
+ width: 100%;
227
+ @include border-radius(0);
228
+ }
229
+ .btn-group-vertical .btn + .btn {
230
+ margin-left: 0;
231
+ margin-top: -1px;
232
+ }
233
+ .btn-group-vertical .btn:first-child {
234
+ @include border-radius(4px 4px 0 0);
235
+ }
236
+ .btn-group-vertical .btn:last-child {
237
+ @include border-radius(0 0 4px 4px);
238
+ }
239
+ .btn-group-vertical .btn-large:first-child {
240
+ @include border-radius(6px 6px 0 0);
241
+ }
242
+ .btn-group-vertical .btn-large:last-child {
243
+ @include border-radius(0 0 6px 6px);
244
+ }
@@ -1,5 +1,6 @@
1
- // BUTTON STYLES
2
- // -------------
1
+ //
2
+ // Buttons
3
+ // --------------------------------------------------
3
4
 
4
5
 
5
6
  // Base styles
@@ -9,28 +10,25 @@
9
10
  .btn {
10
11
  display: inline-block;
11
12
  @include ie7-inline-block();
12
- padding: 4px 10px 4px;
13
+ padding: 4px 14px;
13
14
  margin-bottom: 0; // For input.btn
14
15
  font-size: $baseFontSize;
15
16
  line-height: $baseLineHeight;
16
- *line-height: 20px;
17
- color: $grayDark;
17
+ *line-height: $baseLineHeight;
18
18
  text-align: center;
19
- text-shadow: 0 1px 1px rgba(255,255,255,.75);
20
19
  vertical-align: middle;
21
20
  cursor: pointer;
22
- @include button-background($btnBackground, $btnBackgroundHighlight);
21
+ @include button-background($btnBackground, $btnBackgroundHighlight, $grayDark, 0 1px 1px rgba(255,255,255,.75));
23
22
  border: 1px solid $btnBorder;
24
23
  *border: 0; // Remove the border to prevent IE7's black border on input:focus
25
24
  border-bottom-color: darken($btnBorder, 10%);
26
25
  @include border-radius(4px);
27
26
  @include ie7-restore-left-whitespace(); // Give IE7 some love
28
27
  @include box-shadow((inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)));
29
- }
30
28
 
31
- // Hover state
32
- .btn:hover {
33
- color: $grayDark;
29
+ // Hover state
30
+ &:hover {
31
+ color: $grayDark;
34
32
  text-decoration: none;
35
33
  background-color: darken($white, 10%);
36
34
  *background-color: darken($white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
@@ -38,35 +36,38 @@
38
36
 
39
37
  // transition is only when going to hover, otherwise the background
40
38
  // behind the gradient (there for IE<=9 fallback) gets mismatched
41
- @include transition(background-position .1s linear);
42
- }
39
+ @include transition(background-position .1s linear);
40
+ }
43
41
 
44
- // Focus state for keyboard and accessibility
45
- .btn:focus {
46
- @include tab-focus();
47
- }
42
+ // Focus state for keyboard and accessibility
43
+ &:focus {
44
+ @include tab-focus();
45
+ }
48
46
 
49
- // Active state
50
- .btn.active,
51
- .btn:active {
52
- background-color: darken($white, 10%);
53
- background-color: darken($white, 15%) \9;
54
- background-image: none;
55
- outline: 0;
56
- @include box-shadow((inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)));
57
- }
47
+ // Active state
48
+ &.active,
49
+ &:active {
50
+ background-color: darken($white, 10%);
51
+ background-color: darken($white, 15%) \9;
52
+ background-image: none;
53
+ outline: 0;
54
+ @include box-shadow((inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)));
55
+ }
58
56
 
59
- // Disabled state
60
- .btn.disabled,
61
- .btn[disabled] {
57
+ // Disabled state
58
+ &.disabled,
59
+ &[disabled] {
62
60
  cursor: default;
63
61
  background-color: darken($white, 10%);
64
62
  background-image: none;
65
- @include opacity(65);
66
- @include box-shadow(none);
63
+ @include opacity(65);
64
+ @include box-shadow(none);
65
+ }
66
+
67
67
  }
68
68
 
69
69
 
70
+
70
71
  // Button Sizes
71
72
  // --------------------------------------------------
72
73
 
@@ -78,47 +79,42 @@
78
79
  @include border-radius(5px);
79
80
  }
80
81
  .btn-large [class^="icon-"] {
81
- margin-top: 1px;
82
+ margin-top: 2px;
82
83
  }
83
84
 
84
85
  // Small
85
86
  .btn-small {
86
- padding: 5px 9px;
87
+ padding: 3px 9px;
87
88
  font-size: $baseFontSize - 2px;
88
89
  line-height: $baseLineHeight - 2px;
89
90
  }
90
91
  .btn-small [class^="icon-"] {
91
- margin-top: -1px;
92
+ margin-top: 0;
92
93
  }
93
94
 
94
95
  // Mini
95
96
  .btn-mini {
96
97
  padding: 2px 6px;
97
- font-size: $baseFontSize - 2px;
98
+ font-size: $baseFontSize - 3px;
98
99
  line-height: $baseLineHeight - 4px;
99
100
  }
100
101
 
102
+ // Block button
103
+ .btn-block {
104
+ display: block;
105
+ width: 100%;
106
+ padding-left: 0;
107
+ padding-right: 0;
108
+ @include box-sizing(border-box);
109
+ }
110
+ .btn-block + .btn-block {
111
+ margin-top: 5px;
112
+ }
113
+
101
114
 
102
115
  // Alternate buttons
103
116
  // --------------------------------------------------
104
117
 
105
- // Set text color
106
- // -------------------------
107
- .btn-primary,
108
- .btn-primary:hover,
109
- .btn-warning,
110
- .btn-warning:hover,
111
- .btn-danger,
112
- .btn-danger:hover,
113
- .btn-success,
114
- .btn-success:hover,
115
- .btn-info,
116
- .btn-info:hover,
117
- .btn-inverse,
118
- .btn-inverse:hover {
119
- color: $white;
120
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
121
- }
122
118
  // Provide *some* extra contrast for those who can get it
123
119
  .btn-primary.active,
124
120
  .btn-warning.active,
@@ -133,8 +129,8 @@
133
129
  // -------------------------
134
130
  .btn {
135
131
  // reset here as of 2.0.3 due to Recess property order
136
- border-color: #ccc;
137
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
132
+ border-color: #c5c5c5;
133
+ border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
138
134
  }
139
135
  .btn-primary {
140
136
  @include button-background($btnPrimaryBackground, $btnPrimaryBackgroundHighlight);
@@ -174,8 +170,9 @@ input[type="submit"].btn {
174
170
  }
175
171
 
176
172
  // IE7 has some default padding on button controls
177
- *padding-top: 2px;
178
- *padding-bottom: 2px;
173
+ *padding-top: 3px;
174
+ *padding-bottom: 3px;
175
+
179
176
  &.btn-large {
180
177
  *padding-top: 7px;
181
178
  *padding-bottom: 7px;
@@ -189,3 +186,26 @@ input[type="submit"].btn {
189
186
  *padding-bottom: 1px;
190
187
  }
191
188
  }
189
+
190
+
191
+ // Link buttons
192
+ // --------------------------------------------------
193
+
194
+ // Make a button look and behave like a link
195
+ .btn-link,
196
+ .btn-link:active {
197
+ background-color: transparent;
198
+ background-image: none;
199
+ @include box-shadow(none);
200
+ }
201
+ .btn-link {
202
+ border-color: transparent;
203
+ cursor: pointer;
204
+ color: $linkColor;
205
+ @include border-radius(0);
206
+ }
207
+ .btn-link:hover {
208
+ color: $linkColorHover;
209
+ text-decoration: underline;
210
+ background-color: transparent;
211
+ }