bootstrap-on-rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +34 -0
- data/Rakefile +1 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +228 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/javascripts/bootstrap/affix.js +126 -0
- data/app/assets/javascripts/bootstrap/alert.js +98 -0
- data/app/assets/javascripts/bootstrap/button.js +109 -0
- data/app/assets/javascripts/bootstrap/carousel.js +217 -0
- data/app/assets/javascripts/bootstrap/collapse.js +179 -0
- data/app/assets/javascripts/bootstrap/dropdown.js +154 -0
- data/app/assets/javascripts/bootstrap/modal.js +246 -0
- data/app/assets/javascripts/bootstrap/popover.js +117 -0
- data/app/assets/javascripts/bootstrap/scrollspy.js +158 -0
- data/app/assets/javascripts/bootstrap/tab.js +135 -0
- data/app/assets/javascripts/bootstrap/tooltip.js +386 -0
- data/app/assets/javascripts/bootstrap/transition.js +56 -0
- data/app/assets/stylesheets/bootstrap/alerts.less +67 -0
- data/app/assets/stylesheets/bootstrap/badges.less +51 -0
- data/app/assets/stylesheets/bootstrap/bootstrap.less +58 -0
- data/app/assets/stylesheets/bootstrap/breadcrumbs.less +23 -0
- data/app/assets/stylesheets/bootstrap/button-groups.less +248 -0
- data/app/assets/stylesheets/bootstrap/buttons.less +160 -0
- data/app/assets/stylesheets/bootstrap/carousel.less +209 -0
- data/app/assets/stylesheets/bootstrap/close.less +33 -0
- data/app/assets/stylesheets/bootstrap/code.less +56 -0
- data/app/assets/stylesheets/bootstrap/component-animations.less +29 -0
- data/app/assets/stylesheets/bootstrap/dropdowns.less +193 -0
- data/app/assets/stylesheets/bootstrap/forms.less +362 -0
- data/app/assets/stylesheets/bootstrap/glyphicons.less +236 -0
- data/app/assets/stylesheets/bootstrap/grid.less +346 -0
- data/app/assets/stylesheets/bootstrap/input-groups.less +127 -0
- data/app/assets/stylesheets/bootstrap/jumbotron.less +40 -0
- data/app/assets/stylesheets/bootstrap/labels.less +58 -0
- data/app/assets/stylesheets/bootstrap/list-group.less +88 -0
- data/app/assets/stylesheets/bootstrap/media.less +56 -0
- data/app/assets/stylesheets/bootstrap/mixins.less +744 -0
- data/app/assets/stylesheets/bootstrap/modals.less +141 -0
- data/app/assets/stylesheets/bootstrap/navbar.less +621 -0
- data/app/assets/stylesheets/bootstrap/navs.less +229 -0
- data/app/assets/stylesheets/bootstrap/normalize.less +396 -0
- data/app/assets/stylesheets/bootstrap/pager.less +55 -0
- data/app/assets/stylesheets/bootstrap/pagination.less +85 -0
- data/app/assets/stylesheets/bootstrap/panels.less +148 -0
- data/app/assets/stylesheets/bootstrap/popovers.less +133 -0
- data/app/assets/stylesheets/bootstrap/print.less +100 -0
- data/app/assets/stylesheets/bootstrap/progress-bars.less +95 -0
- data/app/assets/stylesheets/bootstrap/responsive-utilities.less +220 -0
- data/app/assets/stylesheets/bootstrap/scaffolding.less +130 -0
- data/app/assets/stylesheets/bootstrap/tables.less +238 -0
- data/app/assets/stylesheets/bootstrap/theme.less +241 -0
- data/app/assets/stylesheets/bootstrap/thumbnails.less +31 -0
- data/app/assets/stylesheets/bootstrap/tooltip.less +95 -0
- data/app/assets/stylesheets/bootstrap/type.less +242 -0
- data/app/assets/stylesheets/bootstrap/utilities.less +42 -0
- data/app/assets/stylesheets/bootstrap/variables.less +635 -0
- data/app/assets/stylesheets/bootstrap/wells.less +29 -0
- data/bootstrap-on-rails.gemspec +25 -0
- data/lib/bootstrap-on-rails.rb +6 -0
- data/lib/bootstrap-on-rails/engine.rb +4 -0
- data/lib/bootstrap-on-rails/version.rb +3 -0
- data/test/test_helper.rb +2 -0
- metadata +112 -0
@@ -0,0 +1,95 @@
|
|
1
|
+
//
|
2
|
+
// Progress bars
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Bar animations
|
7
|
+
// -------------------------
|
8
|
+
|
9
|
+
// Webkit
|
10
|
+
@-webkit-keyframes progress-bar-stripes {
|
11
|
+
from { background-position: 40px 0; }
|
12
|
+
to { background-position: 0 0; }
|
13
|
+
}
|
14
|
+
|
15
|
+
// Firefox
|
16
|
+
@-moz-keyframes progress-bar-stripes {
|
17
|
+
from { background-position: 40px 0; }
|
18
|
+
to { background-position: 0 0; }
|
19
|
+
}
|
20
|
+
|
21
|
+
// Opera
|
22
|
+
@-o-keyframes progress-bar-stripes {
|
23
|
+
from { background-position: 0 0; }
|
24
|
+
to { background-position: 40px 0; }
|
25
|
+
}
|
26
|
+
|
27
|
+
// Spec and IE10+
|
28
|
+
@keyframes progress-bar-stripes {
|
29
|
+
from { background-position: 40px 0; }
|
30
|
+
to { background-position: 0 0; }
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
// Bar itself
|
36
|
+
// -------------------------
|
37
|
+
|
38
|
+
// Outer container
|
39
|
+
.progress {
|
40
|
+
overflow: hidden;
|
41
|
+
height: @line-height-computed;
|
42
|
+
margin-bottom: @line-height-computed;
|
43
|
+
background-color: @progress-bg;
|
44
|
+
border-radius: @border-radius-base;
|
45
|
+
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
|
46
|
+
}
|
47
|
+
|
48
|
+
// Bar of progress
|
49
|
+
.progress-bar {
|
50
|
+
float: left;
|
51
|
+
width: 0%;
|
52
|
+
height: 100%;
|
53
|
+
font-size: @font-size-small;
|
54
|
+
color: @progress-bar-color;
|
55
|
+
text-align: center;
|
56
|
+
background-color: @progress-bar-bg;
|
57
|
+
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
|
58
|
+
.transition(width .6s ease);
|
59
|
+
}
|
60
|
+
|
61
|
+
// Striped bars
|
62
|
+
.progress-striped .progress-bar {
|
63
|
+
#gradient > .striped(@progress-bar-bg);
|
64
|
+
background-size: 40px 40px;
|
65
|
+
}
|
66
|
+
|
67
|
+
// Call animation for the active one
|
68
|
+
.progress.active .progress-bar {
|
69
|
+
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
70
|
+
-moz-animation: progress-bar-stripes 2s linear infinite;
|
71
|
+
-ms-animation: progress-bar-stripes 2s linear infinite;
|
72
|
+
-o-animation: progress-bar-stripes 2s linear infinite;
|
73
|
+
animation: progress-bar-stripes 2s linear infinite;
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
// Variations
|
79
|
+
// -------------------------
|
80
|
+
|
81
|
+
.progress-bar-success {
|
82
|
+
.progress-bar-variant(@progress-bar-success-bg);
|
83
|
+
}
|
84
|
+
|
85
|
+
.progress-bar-info {
|
86
|
+
.progress-bar-variant(@progress-bar-info-bg);
|
87
|
+
}
|
88
|
+
|
89
|
+
.progress-bar-warning {
|
90
|
+
.progress-bar-variant(@progress-bar-warning-bg);
|
91
|
+
}
|
92
|
+
|
93
|
+
.progress-bar-danger {
|
94
|
+
.progress-bar-variant(@progress-bar-danger-bg);
|
95
|
+
}
|
@@ -0,0 +1,220 @@
|
|
1
|
+
//
|
2
|
+
// Responsive: Utility classes
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// IE10 Metro responsive
|
7
|
+
// Required for Windows 8 Metro split-screen snapping with IE10
|
8
|
+
//
|
9
|
+
// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
|
10
|
+
@-ms-viewport{
|
11
|
+
width: device-width;
|
12
|
+
}
|
13
|
+
|
14
|
+
// IE10 on Windows Phone 8
|
15
|
+
// IE10 on WP8 doesn't report CSS pixels, but actual device pixels. In
|
16
|
+
// other words, say on a Lumia, you'll get 768px as the device width,
|
17
|
+
// meaning users will see the tablet styles and not phone styles.
|
18
|
+
//
|
19
|
+
// Alternatively you can override this with JS (see source below), but
|
20
|
+
// we won't be doing that here given our limited scope.
|
21
|
+
//
|
22
|
+
// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
|
23
|
+
@media screen and (max-width: 400px) {
|
24
|
+
@-ms-viewport{
|
25
|
+
width: 320px;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
// Hide from screenreaders and browsers
|
30
|
+
// Credit: HTML5 Boilerplate
|
31
|
+
.hidden {
|
32
|
+
display: none !important;
|
33
|
+
visibility: hidden !important;
|
34
|
+
}
|
35
|
+
|
36
|
+
// Visibility utilities
|
37
|
+
|
38
|
+
.visible-xs {
|
39
|
+
.responsive-invisibility();
|
40
|
+
@media (max-width: @screen-xs-max) {
|
41
|
+
.responsive-visibility();
|
42
|
+
}
|
43
|
+
&.visible-sm {
|
44
|
+
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
|
45
|
+
.responsive-visibility();
|
46
|
+
}
|
47
|
+
}
|
48
|
+
&.visible-md {
|
49
|
+
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
|
50
|
+
.responsive-visibility();
|
51
|
+
}
|
52
|
+
}
|
53
|
+
&.visible-lg {
|
54
|
+
@media (min-width: @screen-lg-min) {
|
55
|
+
.responsive-visibility();
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
.visible-sm {
|
60
|
+
.responsive-invisibility();
|
61
|
+
&.visible-xs {
|
62
|
+
@media (max-width: @screen-xs-max) {
|
63
|
+
.responsive-visibility();
|
64
|
+
}
|
65
|
+
}
|
66
|
+
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
|
67
|
+
.responsive-visibility();
|
68
|
+
}
|
69
|
+
&.visible-md {
|
70
|
+
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
|
71
|
+
.responsive-visibility();
|
72
|
+
}
|
73
|
+
}
|
74
|
+
&.visible-lg {
|
75
|
+
@media (min-width: @screen-lg-min) {
|
76
|
+
.responsive-visibility();
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
.visible-md {
|
81
|
+
.responsive-invisibility();
|
82
|
+
&.visible-xs {
|
83
|
+
@media (max-width: @screen-xs-max) {
|
84
|
+
.responsive-visibility();
|
85
|
+
}
|
86
|
+
}
|
87
|
+
&.visible-sm {
|
88
|
+
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
|
89
|
+
.responsive-visibility();
|
90
|
+
}
|
91
|
+
}
|
92
|
+
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
|
93
|
+
.responsive-visibility();
|
94
|
+
}
|
95
|
+
&.visible-lg {
|
96
|
+
@media (min-width: @screen-lg-min) {
|
97
|
+
.responsive-visibility();
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
.visible-lg {
|
102
|
+
.responsive-invisibility();
|
103
|
+
&.visible-xs {
|
104
|
+
@media (max-width: @screen-xs-max) {
|
105
|
+
.responsive-visibility();
|
106
|
+
}
|
107
|
+
}
|
108
|
+
&.visible-sm {
|
109
|
+
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
|
110
|
+
.responsive-visibility();
|
111
|
+
}
|
112
|
+
}
|
113
|
+
&.visible-md {
|
114
|
+
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
|
115
|
+
.responsive-visibility();
|
116
|
+
}
|
117
|
+
}
|
118
|
+
@media (min-width: @screen-lg-min) {
|
119
|
+
.responsive-visibility();
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
.hidden-xs {
|
124
|
+
.responsive-visibility();
|
125
|
+
@media (max-width: @screen-xs-max) {
|
126
|
+
.responsive-invisibility();
|
127
|
+
}
|
128
|
+
&.hidden-sm {
|
129
|
+
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
|
130
|
+
.responsive-invisibility();
|
131
|
+
}
|
132
|
+
}
|
133
|
+
&.hidden-md {
|
134
|
+
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
|
135
|
+
.responsive-invisibility();
|
136
|
+
}
|
137
|
+
}
|
138
|
+
&.hidden-lg {
|
139
|
+
@media (min-width: @screen-lg-min) {
|
140
|
+
.responsive-invisibility();
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
.hidden-sm {
|
145
|
+
.responsive-visibility();
|
146
|
+
&.hidden-xs {
|
147
|
+
@media (max-width: @screen-xs-max) {
|
148
|
+
.responsive-invisibility();
|
149
|
+
}
|
150
|
+
}
|
151
|
+
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
|
152
|
+
.responsive-invisibility();
|
153
|
+
}
|
154
|
+
&.hidden-md {
|
155
|
+
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
|
156
|
+
.responsive-invisibility();
|
157
|
+
}
|
158
|
+
}
|
159
|
+
&.hidden-lg {
|
160
|
+
@media (min-width: @screen-lg-min) {
|
161
|
+
.responsive-invisibility();
|
162
|
+
}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
.hidden-md {
|
166
|
+
.responsive-visibility();
|
167
|
+
&.hidden-xs {
|
168
|
+
@media (max-width: @screen-xs-max) {
|
169
|
+
.responsive-invisibility();
|
170
|
+
}
|
171
|
+
}
|
172
|
+
&.hidden-sm {
|
173
|
+
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
|
174
|
+
.responsive-invisibility();
|
175
|
+
}
|
176
|
+
}
|
177
|
+
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
|
178
|
+
.responsive-invisibility();
|
179
|
+
}
|
180
|
+
&.hidden-lg {
|
181
|
+
@media (min-width: @screen-lg-min) {
|
182
|
+
.responsive-invisibility();
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
.hidden-lg {
|
187
|
+
.responsive-visibility();
|
188
|
+
&.hidden-xs {
|
189
|
+
@media (max-width: @screen-xs-max) {
|
190
|
+
.responsive-invisibility();
|
191
|
+
}
|
192
|
+
}
|
193
|
+
&.hidden-sm {
|
194
|
+
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
|
195
|
+
.responsive-invisibility();
|
196
|
+
}
|
197
|
+
}
|
198
|
+
&.hidden-md {
|
199
|
+
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
|
200
|
+
.responsive-invisibility();
|
201
|
+
}
|
202
|
+
}
|
203
|
+
@media (min-width: @screen-lg-min) {
|
204
|
+
.responsive-invisibility();
|
205
|
+
}
|
206
|
+
}
|
207
|
+
|
208
|
+
// Print utilities
|
209
|
+
.visible-print {
|
210
|
+
.responsive-invisibility();
|
211
|
+
}
|
212
|
+
|
213
|
+
@media print {
|
214
|
+
.visible-print {
|
215
|
+
.responsive-visibility();
|
216
|
+
}
|
217
|
+
.hidden-print {
|
218
|
+
.responsive-invisibility();
|
219
|
+
}
|
220
|
+
}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
//
|
2
|
+
// Scaffolding
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Reset the box-sizing
|
7
|
+
|
8
|
+
*,
|
9
|
+
*:before,
|
10
|
+
*:after {
|
11
|
+
.box-sizing(border-box);
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
// Body reset
|
16
|
+
|
17
|
+
html {
|
18
|
+
font-size: 62.5%;
|
19
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
20
|
+
}
|
21
|
+
|
22
|
+
body {
|
23
|
+
font-family: @font-family-base;
|
24
|
+
font-size: @font-size-base;
|
25
|
+
line-height: @line-height-base;
|
26
|
+
color: @text-color;
|
27
|
+
background-color: @body-bg;
|
28
|
+
}
|
29
|
+
|
30
|
+
// Reset fonts for relevant elements
|
31
|
+
input,
|
32
|
+
button,
|
33
|
+
select,
|
34
|
+
textarea {
|
35
|
+
font-family: inherit;
|
36
|
+
font-size: inherit;
|
37
|
+
line-height: inherit;
|
38
|
+
}
|
39
|
+
|
40
|
+
// Reset unusual Firefox-on-Android default style.
|
41
|
+
//
|
42
|
+
// See https://github.com/necolas/normalize.css/issues/214
|
43
|
+
|
44
|
+
button,
|
45
|
+
input,
|
46
|
+
select[multiple],
|
47
|
+
textarea {
|
48
|
+
background-image: none;
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
// Links
|
53
|
+
|
54
|
+
a {
|
55
|
+
color: @link-color;
|
56
|
+
text-decoration: none;
|
57
|
+
|
58
|
+
&:hover,
|
59
|
+
&:focus {
|
60
|
+
color: @link-hover-color;
|
61
|
+
text-decoration: underline;
|
62
|
+
}
|
63
|
+
|
64
|
+
&:focus {
|
65
|
+
.tab-focus();
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
// Images
|
71
|
+
|
72
|
+
img {
|
73
|
+
vertical-align: middle;
|
74
|
+
}
|
75
|
+
|
76
|
+
// Responsive images (ensure images don't scale beyond their parents)
|
77
|
+
.img-responsive {
|
78
|
+
.img-responsive();
|
79
|
+
}
|
80
|
+
|
81
|
+
// Rounded corners
|
82
|
+
.img-rounded {
|
83
|
+
border-radius: @border-radius-large;
|
84
|
+
}
|
85
|
+
|
86
|
+
// Image thumbnails
|
87
|
+
//
|
88
|
+
// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
|
89
|
+
.img-thumbnail {
|
90
|
+
padding: @thumbnail-padding;
|
91
|
+
line-height: @line-height-base;
|
92
|
+
background-color: @thumbnail-bg;
|
93
|
+
border: 1px solid @thumbnail-border;
|
94
|
+
border-radius: @thumbnail-border-radius;
|
95
|
+
.transition(all .2s ease-in-out);
|
96
|
+
|
97
|
+
// Keep them at most 100% wide
|
98
|
+
.img-responsive(inline-block);
|
99
|
+
}
|
100
|
+
|
101
|
+
// Perfect circle
|
102
|
+
.img-circle {
|
103
|
+
border-radius: 50%; // set radius in percents
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
// Horizontal rules
|
108
|
+
|
109
|
+
hr {
|
110
|
+
margin-top: @line-height-computed;
|
111
|
+
margin-bottom: @line-height-computed;
|
112
|
+
border: 0;
|
113
|
+
border-top: 1px solid @hr-border;
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
// Only display content to screen readers
|
118
|
+
//
|
119
|
+
// See: http://a11yproject.com/posts/how-to-hide-content/
|
120
|
+
|
121
|
+
.sr-only {
|
122
|
+
position: absolute;
|
123
|
+
width: 1px;
|
124
|
+
height: 1px;
|
125
|
+
margin: -1px;
|
126
|
+
padding: 0;
|
127
|
+
overflow: hidden;
|
128
|
+
clip: rect(0 0 0 0);
|
129
|
+
border: 0;
|
130
|
+
}
|
@@ -0,0 +1,238 @@
|
|
1
|
+
//
|
2
|
+
// Tables
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
table {
|
7
|
+
max-width: 100%;
|
8
|
+
background-color: @table-bg;
|
9
|
+
}
|
10
|
+
th {
|
11
|
+
text-align: left;
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
// Baseline styles
|
16
|
+
|
17
|
+
.table {
|
18
|
+
width: 100%;
|
19
|
+
margin-bottom: @line-height-computed;
|
20
|
+
// Cells
|
21
|
+
thead,
|
22
|
+
tbody,
|
23
|
+
tfoot {
|
24
|
+
> tr {
|
25
|
+
> th,
|
26
|
+
> td {
|
27
|
+
padding: @table-cell-padding;
|
28
|
+
line-height: @line-height-base;
|
29
|
+
vertical-align: top;
|
30
|
+
border-top: 1px solid @table-border-color;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
// Bottom align for column headings
|
35
|
+
thead > tr > th {
|
36
|
+
vertical-align: bottom;
|
37
|
+
border-bottom: 2px solid @table-border-color;
|
38
|
+
}
|
39
|
+
// Remove top border from thead by default
|
40
|
+
caption + thead,
|
41
|
+
colgroup + thead,
|
42
|
+
thead:first-child {
|
43
|
+
tr:first-child {
|
44
|
+
th, td {
|
45
|
+
border-top: 0;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
// Account for multiple tbody instances
|
50
|
+
tbody + tbody {
|
51
|
+
border-top: 2px solid @table-border-color;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Nesting
|
55
|
+
.table {
|
56
|
+
background-color: @body-bg;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
// Condensed table w/ half padding
|
62
|
+
|
63
|
+
.table-condensed {
|
64
|
+
thead,
|
65
|
+
tbody,
|
66
|
+
tfoot {
|
67
|
+
> tr {
|
68
|
+
> th,
|
69
|
+
> td {
|
70
|
+
padding: @table-condensed-cell-padding;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
// Bordered version
|
78
|
+
//
|
79
|
+
// Add borders all around the table and between all the columns.
|
80
|
+
|
81
|
+
.table-bordered {
|
82
|
+
border: 1px solid @table-border-color;
|
83
|
+
> thead,
|
84
|
+
> tbody,
|
85
|
+
> tfoot {
|
86
|
+
> tr {
|
87
|
+
> th,
|
88
|
+
> td {
|
89
|
+
border: 1px solid @table-border-color;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
> thead {
|
94
|
+
> tr {
|
95
|
+
> th,
|
96
|
+
> td {
|
97
|
+
border-bottom-width: 2px;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
|
104
|
+
// Zebra-striping
|
105
|
+
//
|
106
|
+
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
107
|
+
|
108
|
+
.table-striped {
|
109
|
+
> tbody {
|
110
|
+
> tr:nth-child(odd) {
|
111
|
+
> td,
|
112
|
+
> th {
|
113
|
+
background-color: @table-bg-accent;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
// Hover effect
|
121
|
+
//
|
122
|
+
// Placed here since it has to come after the potential zebra striping
|
123
|
+
|
124
|
+
.table-hover {
|
125
|
+
> tbody {
|
126
|
+
> tr:hover {
|
127
|
+
> td,
|
128
|
+
> th {
|
129
|
+
background-color: @table-bg-hover;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
// Table cell sizing
|
137
|
+
//
|
138
|
+
// Reset default table behavior
|
139
|
+
|
140
|
+
table col[class*="col-"] {
|
141
|
+
float: none;
|
142
|
+
display: table-column;
|
143
|
+
}
|
144
|
+
table {
|
145
|
+
td,
|
146
|
+
th {
|
147
|
+
&[class*="col-"] {
|
148
|
+
float: none;
|
149
|
+
display: table-cell;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
|
154
|
+
|
155
|
+
// Table backgrounds
|
156
|
+
//
|
157
|
+
// Exact selectors below required to override `.table-striped` and prevent
|
158
|
+
// inheritance to nested tables.
|
159
|
+
|
160
|
+
.table > thead > tr,
|
161
|
+
.table > tbody > tr,
|
162
|
+
.table > tfoot > tr {
|
163
|
+
> td.active,
|
164
|
+
> th.active,
|
165
|
+
&.active > td,
|
166
|
+
&.active > th {
|
167
|
+
background-color: @table-bg-active;
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
// Generate the contextual variants
|
172
|
+
.table-row-variant(success; @state-success-bg; @state-success-border);
|
173
|
+
.table-row-variant(danger; @state-danger-bg; @state-danger-border);
|
174
|
+
.table-row-variant(warning; @state-warning-bg; @state-warning-border);
|
175
|
+
|
176
|
+
|
177
|
+
// Responsive tables
|
178
|
+
//
|
179
|
+
// Wrap your tables in `.table-responsive` 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-min) {
|
184
|
+
.table-responsive {
|
185
|
+
width: 100%;
|
186
|
+
margin-bottom: 15px;
|
187
|
+
overflow-y: hidden;
|
188
|
+
overflow-x: scroll;
|
189
|
+
-ms-overflow-style: -ms-autohiding-scrollbar;
|
190
|
+
border: 1px solid @table-border-color;
|
191
|
+
-webkit-overflow-scrolling: touch;
|
192
|
+
|
193
|
+
// Tighten up spacing and give a background color
|
194
|
+
> .table {
|
195
|
+
margin-bottom: 0;
|
196
|
+
background-color: #fff;
|
197
|
+
|
198
|
+
// Ensure the content doesn't wrap
|
199
|
+
> thead,
|
200
|
+
> tbody,
|
201
|
+
> tfoot {
|
202
|
+
> tr {
|
203
|
+
> th,
|
204
|
+
> td {
|
205
|
+
white-space: nowrap;
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
// Special overrides for the bordered tables
|
212
|
+
> .table-bordered {
|
213
|
+
border: 0;
|
214
|
+
|
215
|
+
// Nuke the appropriate borders so that the parent can handle them
|
216
|
+
> thead,
|
217
|
+
> tbody,
|
218
|
+
> tfoot {
|
219
|
+
> tr {
|
220
|
+
> th:first-child,
|
221
|
+
> td:first-child {
|
222
|
+
border-left: 0;
|
223
|
+
}
|
224
|
+
> th:last-child,
|
225
|
+
> td:last-child {
|
226
|
+
border-right: 0;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
> tr:last-child {
|
230
|
+
> th,
|
231
|
+
> td {
|
232
|
+
border-bottom: 0;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}
|
238
|
+
}
|