anjlab-bootstrap-rails 3.0.0.rc2 → 3.0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -8
  3. data/Rakefile +19 -1
  4. data/app/assets/fonts/twitter/glyphicons-halflings-regular.eot +0 -0
  5. data/app/assets/fonts/twitter/glyphicons-halflings-regular.svg +228 -0
  6. data/app/assets/fonts/twitter/glyphicons-halflings-regular.ttf +0 -0
  7. data/app/assets/fonts/twitter/glyphicons-halflings-regular.woff +0 -0
  8. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +3 -3
  9. data/app/assets/javascripts/twitter/bootstrap/modal.js +5 -3
  10. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +9 -5
  11. data/app/assets/javascripts/twitter/bootstrap/transition.js +1 -1
  12. data/app/assets/stylesheets/twitter/bootstrap/_alerts.scss +7 -11
  13. data/app/assets/stylesheets/twitter/bootstrap/_bootstrap.scss +17 -21
  14. data/app/assets/stylesheets/twitter/bootstrap/_button-groups.scss +14 -10
  15. data/app/assets/stylesheets/twitter/bootstrap/_buttons.scss +14 -20
  16. data/app/assets/stylesheets/twitter/bootstrap/_carousel.scss +6 -1
  17. data/app/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +23 -5
  18. data/app/assets/stylesheets/twitter/bootstrap/_forms.scss +44 -23
  19. data/app/assets/stylesheets/twitter/bootstrap/_glyphicons.scss +232 -0
  20. data/app/assets/stylesheets/twitter/bootstrap/_grid.scss +10 -4
  21. data/app/assets/stylesheets/twitter/bootstrap/_input-groups.scss +1 -1
  22. data/app/assets/stylesheets/twitter/bootstrap/_jumbotron.scss +16 -5
  23. data/app/assets/stylesheets/twitter/bootstrap/_labels.scss +9 -5
  24. data/app/assets/stylesheets/twitter/bootstrap/_mixins.scss +83 -51
  25. data/app/assets/stylesheets/twitter/bootstrap/_modals.scss +7 -0
  26. data/app/assets/stylesheets/twitter/bootstrap/_navbar.scss +254 -199
  27. data/app/assets/stylesheets/twitter/bootstrap/_navs.scss +13 -19
  28. data/app/assets/stylesheets/twitter/bootstrap/_pager.scss +1 -1
  29. data/app/assets/stylesheets/twitter/bootstrap/_pagination.scss +20 -9
  30. data/app/assets/stylesheets/twitter/bootstrap/_panels.scss +28 -8
  31. data/app/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +6 -10
  32. data/app/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +41 -72
  33. data/app/assets/stylesheets/twitter/bootstrap/_scaffolding.scss +36 -21
  34. data/app/assets/stylesheets/twitter/bootstrap/_tables.scss +84 -59
  35. data/app/assets/stylesheets/twitter/bootstrap/_theme.scss +232 -0
  36. data/app/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +8 -19
  37. data/app/assets/stylesheets/twitter/bootstrap/_type.scss +2 -2
  38. data/app/assets/stylesheets/twitter/bootstrap/_variables.scss +90 -73
  39. data/lib/bootstrap-rails/version.rb +1 -1
  40. metadata +10 -4
@@ -13,7 +13,6 @@ th {
13
13
 
14
14
 
15
15
  // Baseline styles
16
- // ---------------
17
16
 
18
17
  .table {
19
18
  width: 100%;
@@ -35,6 +34,7 @@ th {
35
34
  // Bottom align for column headings
36
35
  thead > tr > th {
37
36
  vertical-align: bottom;
37
+ border-bottom: 2px solid $table-border-color;
38
38
  }
39
39
  // Remove top border from thead by default
40
40
  caption + thead,
@@ -58,9 +58,7 @@ th {
58
58
  }
59
59
 
60
60
 
61
-
62
61
  // Condensed table w/ half padding
63
- // -------------------------------
64
62
 
65
63
  .table-condensed {
66
64
  thead,
@@ -76,9 +74,9 @@ th {
76
74
  }
77
75
 
78
76
 
79
-
80
77
  // Bordered version
81
- // ----------------
78
+ //
79
+ // Add borders all around the table and between all the columns.
82
80
 
83
81
  .table-bordered {
84
82
  border: 1px solid $table-border-color;
@@ -92,14 +90,21 @@ th {
92
90
  }
93
91
  }
94
92
  }
93
+ > thead {
94
+ > tr {
95
+ > th,
96
+ > td {
97
+ border-bottom-width: 2px;
98
+ }
99
+ }
100
+ }
95
101
  }
96
102
 
97
103
 
98
-
99
104
  // Zebra-striping
100
- // --------------
101
-
105
+ //
102
106
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
107
+
103
108
  .table-striped {
104
109
  > tbody {
105
110
  > tr:nth-child(odd) {
@@ -112,11 +117,10 @@ th {
112
117
  }
113
118
 
114
119
 
115
-
116
120
  // Hover effect
117
- // ------------
118
-
121
+ //
119
122
  // Placed here since it has to come after the potential zebra striping
123
+
120
124
  .table-hover {
121
125
  > tbody {
122
126
  > tr:hover {
@@ -129,19 +133,18 @@ th {
129
133
  }
130
134
 
131
135
 
132
-
133
136
  // Table cell sizing
134
- // -----------------
135
-
137
+ //
136
138
  // Reset default table behavior
137
- table col[class^="col-"] {
139
+
140
+ table col[class*="col-"] {
138
141
  float: none;
139
142
  display: table-column;
140
143
  }
141
144
  table {
142
145
  td,
143
146
  th {
144
- &[class^="col-"] {
147
+ &[class*="col-"] {
145
148
  float: none;
146
149
  display: table-cell;
147
150
  }
@@ -149,9 +152,8 @@ table {
149
152
  }
150
153
 
151
154
 
152
-
153
155
  // Table backgrounds
154
- // -----------------
156
+ //
155
157
  // Exact selectors below required to override `.table-striped` and prevent
156
158
  // inheritance to nested tables.
157
159
 
@@ -164,48 +166,71 @@ table {
164
166
  &.active > th {
165
167
  background-color: $table-bg-active;
166
168
  }
167
- > td.success,
168
- > th.success,
169
- &.success > td,
170
- &.success > th {
171
- background-color: $state-success-bg;
172
- border-color: $state-success-border;
173
- }
174
- > td.danger,
175
- > th.danger,
176
- &.danger > td,
177
- &.danger > th {
178
- background-color: $state-danger-bg;
179
- border-color: $state-danger-border;
180
- }
181
- > td.warning,
182
- > th.warning,
183
- &.warning > td,
184
- &.warning > th {
185
- background-color: $state-warning-bg;
186
- border-color: $state-warning-border;
187
- }
188
169
  }
189
170
 
190
- // Hover states for `.table-hover`
191
- // Note: this is not available for cells or rows within `thead` or `tfoot`.
192
- .table-hover > tbody > tr {
193
- > td.success:hover,
194
- > th.success:hover,
195
- &.success:hover > td {
196
- background-color: darken($state-success-bg, 5%);
197
- border-color: darken($state-success-border, 5%);
198
- }
199
- > td.danger:hover,
200
- > th.danger:hover,
201
- &.danger:hover > td {
202
- background-color: darken($state-danger-bg, 5%);
203
- border-color: darken($state-danger-border, 5%);
204
- }
205
- > td.warning:hover,
206
- > th.warning:hover,
207
- &.warning:hover > td {
208
- background-color: darken($state-warning-bg, 5%);
209
- border-color: darken($state-warning-border, 5%);
171
+ // Generate the contextual variants
172
+ @include table-row-variant(success, $state-success-bg, $state-success-border);
173
+ @include table-row-variant(danger, $state-danger-bg, $state-danger-border);
174
+ @include table-row-variant(warning, $state-warning-bg, $state-warning-border);
175
+
176
+
177
+ // Responsive tables
178
+ //
179
+ // Wrap your tables in `.table-scrollable` and we'll make them mobile friendly
180
+ // by enabling horizontal scrolling. Only applies <768px. Everything above that
181
+ // will display normally.
182
+
183
+ @media (max-width: $screen-sm) {
184
+ .table-responsive {
185
+ width: 100%;
186
+ margin-bottom: 15px;
187
+ overflow-y: hidden;
188
+ overflow-x: scroll;
189
+ border: 1px solid $table-border-color;
190
+
191
+ // Tighten up spacing and give a background color
192
+ > .table {
193
+ margin-bottom: 0;
194
+ background-color: #fff;
195
+
196
+ // Ensure the content doesn't wrap
197
+ > thead,
198
+ > tbody,
199
+ > tfoot {
200
+ > tr {
201
+ > th,
202
+ > td {
203
+ white-space: nowrap;
204
+ }
205
+ }
206
+ }
207
+ }
208
+
209
+ // Special overrides for the bordered tables
210
+ > .table-bordered {
211
+ border: 0;
212
+
213
+ // Nuke the appropriate borders so that the parent can handle them
214
+ > thead,
215
+ > tbody,
216
+ > tfoot {
217
+ > tr {
218
+ > th:first-child,
219
+ > td:first-child {
220
+ border-left: 0;
221
+ }
222
+ > th:last-child,
223
+ > td:last-child {
224
+ border-right: 0;
225
+ }
226
+ }
227
+ > tr:last-child {
228
+ > th,
229
+ > td {
230
+ border-bottom: 0;
231
+ }
232
+ }
233
+ }
234
+ }
210
235
  }
211
236
  }
@@ -0,0 +1,232 @@
1
+
2
+ //
3
+ // Load core variables and mixins
4
+ // --------------------------------------------------
5
+
6
+ @import "variables";
7
+ @import "mixins";
8
+
9
+
10
+
11
+ //
12
+ // Buttons
13
+ // --------------------------------------------------
14
+
15
+ // Common styles
16
+ .btn-default,
17
+ .btn-primary,
18
+ .btn-success,
19
+ .btn-info,
20
+ .btn-warning,
21
+ .btn-danger {
22
+ text-shadow: 0 -1px 0 rgba(0,0,0,.2);
23
+ $shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
24
+ @include box-shadow($shadow);
25
+
26
+ // Reset the shadow
27
+ &:active,
28
+ &.active {
29
+ @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
30
+ }
31
+ }
32
+
33
+ // Mixin for generating new styles
34
+ @mixin btn-styles($btn-color: #555) {
35
+ @include gradient-vertical($start-color: $btn-color, $end-color: darken($btn-color, 10%));
36
+ border-color: darken($btn-color, 12%);
37
+
38
+ &:active,
39
+ &.active {
40
+ background-color: darken($btn-color, 10%);
41
+ border-color: darken($btn-color, 12%);
42
+ }
43
+ }
44
+
45
+ // Common styles
46
+ .btn {
47
+ // Remove the gradient for the pressed/active state
48
+ &:active,
49
+ &.active {
50
+ background-image: none;
51
+ }
52
+ }
53
+
54
+ // Apply the mixin to the buttons
55
+ .btn-default { @include btn-styles($btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
56
+ .btn-primary { @include btn-styles($btn-primary-bg); }
57
+ .btn-success { @include btn-styles($btn-success-bg); }
58
+ .btn-warning { @include btn-styles($btn-warning-bg); }
59
+ .btn-danger { @include btn-styles($btn-danger-bg); }
60
+ .btn-info { @include btn-styles($btn-info-bg); }
61
+
62
+
63
+
64
+ //
65
+ // Images
66
+ // --------------------------------------------------
67
+
68
+ .thumbnail,
69
+ .img-thumbnail {
70
+ @include box-shadow(0 1px 2px rgba(0,0,0,.075));
71
+ }
72
+
73
+
74
+
75
+ //
76
+ // Dropdowns
77
+ // --------------------------------------------------
78
+
79
+ .dropdown-menu > li > a:hover,
80
+ .dropdown-menu > li > a:focus,
81
+ .dropdown-menu > .active > a,
82
+ .dropdown-menu > .active > a:hover,
83
+ .dropdown-menu > .active > a:focus {
84
+ @include gradient-vertical($start-color: $dropdown-link-hover-bg, $end-color: darken($dropdown-link-hover-bg, 5%));
85
+ background-color: darken($dropdown-link-hover-bg, 5%);
86
+ }
87
+
88
+
89
+
90
+ //
91
+ // Navbar
92
+ // --------------------------------------------------
93
+
94
+ // Basic navbar
95
+ .navbar {
96
+ @include gradient-vertical($start-color: lighten($navbar-default-bg, 10%), $end-color: $navbar-default-bg);
97
+ border-radius: $navbar-border-radius;
98
+ $shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
99
+ @include box-shadow($shadow);
100
+
101
+ .navbar-nav > .active > a {
102
+ background-color: $navbar-default-bg;
103
+ }
104
+ }
105
+ .navbar-brand,
106
+ .navbar-nav > li > a {
107
+ text-shadow: 0 1px 0 rgba(255,255,255,.25);
108
+ }
109
+
110
+ // Inverted navbar
111
+ .navbar-inverse {
112
+ @include gradient-vertical($start-color: lighten($navbar-inverse-bg, 10%), $end-color: $navbar-inverse-bg);
113
+
114
+ .navbar-nav > .active > a {
115
+ background-color: $navbar-inverse-bg;
116
+ }
117
+
118
+ .navbar-brand,
119
+ .navbar-nav > li > a {
120
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
121
+ }
122
+ }
123
+
124
+ // Undo rounded corners in static and fixed navbars
125
+ .navbar-static-top,
126
+ .navbar-fixed-top,
127
+ .navbar-fixed-bottom {
128
+ border-radius: 0;
129
+ }
130
+
131
+
132
+
133
+ //
134
+ // Alerts
135
+ // --------------------------------------------------
136
+
137
+ // Common styles
138
+ .alert {
139
+ text-shadow: 0 1px 0 rgba(255,255,255,.2);
140
+ $shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
141
+ @include box-shadow($shadow);
142
+ }
143
+
144
+ // Mixin for generating new styles
145
+ @mixin alert-styles($color) {
146
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 7.5%));
147
+ border-color: darken($color, 15%);
148
+ }
149
+
150
+ // Apply the mixin to the alerts
151
+ .alert-success { @include alert-styles($alert-success-bg); }
152
+ .alert-info { @include alert-styles($alert-info-bg); }
153
+ .alert-warning { @include alert-styles($alert-warning-bg); }
154
+ .alert-danger { @include alert-styles($alert-danger-bg); }
155
+
156
+
157
+
158
+ //
159
+ // Progress bars
160
+ // --------------------------------------------------
161
+
162
+ // Give the progress background some depth
163
+ .progress {
164
+ @include gradient-vertical($start-color: darken($progress-bg, 4%), $end-color: $progress-bg)
165
+ }
166
+
167
+ // Mixin for generating new styles
168
+ @mixin progress-bar-styles($color) {
169
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 10%));
170
+ }
171
+
172
+ // Apply the mixin to the progress bars
173
+ .progress-bar { @include progress-bar-styles($progress-bar-bg); }
174
+ .progress-bar-success { @include progress-bar-styles($progress-bar-success-bg); }
175
+ .progress-bar-info { @include progress-bar-styles($progress-bar-info-bg); }
176
+ .progress-bar-warning { @include progress-bar-styles($progress-bar-warning-bg); }
177
+ .progress-bar-danger { @include progress-bar-styles($progress-bar-danger-bg); }
178
+
179
+
180
+
181
+ //
182
+ // List groups
183
+ // --------------------------------------------------
184
+
185
+ .list-group {
186
+ border-radius: $border-radius-base;
187
+ @include box-shadow(0 1px 2px rgba(0,0,0,.075));
188
+ }
189
+ .list-group-item.active,
190
+ .list-group-item.active:hover,
191
+ .list-group-item.active:focus {
192
+ text-shadow: 0 -1px 0 darken($list-group-active-bg, 10%);
193
+ @include gradient-vertical($start-color: $list-group-active-bg, $end-color: darken($list-group-active-bg, 7.5%));
194
+ border-color: darken($list-group-active-border, 7.5%);
195
+ }
196
+
197
+
198
+
199
+ //
200
+ // Panels
201
+ // --------------------------------------------------
202
+
203
+ // Common styles
204
+ .panel {
205
+ @include box-shadow(0 1px 2px rgba(0,0,0,.05));
206
+ }
207
+
208
+ // Mixin for generating new styles
209
+ @mixin panel-heading-styles($color) {
210
+ @include gradient-vertical($start-color: $color, $end-color: darken($color, 5%));
211
+ }
212
+
213
+ // Apply the mixin to the panel headings only
214
+ .panel-default > .panel-heading { @include panel-heading-styles($panel-default-heading-bg); }
215
+ .panel-primary > .panel-heading { @include panel-heading-styles($panel-primary-heading-bg); }
216
+ .panel-success > .panel-heading { @include panel-heading-styles($panel-success-heading-bg); }
217
+ .panel-info > .panel-heading { @include panel-heading-styles($panel-info-heading-bg); }
218
+ .panel-warning > .panel-heading { @include panel-heading-styles($panel-warning-heading-bg); }
219
+ .panel-danger > .panel-heading { @include panel-heading-styles($panel-danger-heading-bg); }
220
+
221
+
222
+
223
+ //
224
+ // Wells
225
+ // --------------------------------------------------
226
+
227
+ .well {
228
+ @include gradient-vertical($start-color: darken($well-bg, 5%), $end-color: $well-bg);
229
+ border-color: darken($well-bg, 10%);
230
+ $shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
231
+ @include box-shadow($shadow);
232
+ }