bootstrap-generators 2.3.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +12 -2
- data/{LICENSE.txt → MIT-LICENSE} +1 -3
- data/README.md +19 -64
- data/Rakefile +24 -22
- data/bootstrap-generators.gemspec +3 -1
- data/lib/bootstrap-generators.rb +12 -1
- data/lib/bootstrap/generators/version.rb +1 -1
- data/lib/generators/bootstrap/install/install_generator.rb +9 -24
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +498 -179
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +620 -0
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css → starter.css} +6 -6
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.less → starter.less} +7 -7
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.scss → starter.scss} +7 -8
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +11 -9
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +9 -8
- data/lib/generators/bootstrap/install/templates/layouts/starter.html.erb +50 -0
- data/lib/generators/bootstrap/install/templates/layouts/{hero.html.haml → starter.html.haml} +0 -0
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/edit.html.erb +3 -3
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb +25 -25
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/new.html.erb +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/show.html.erb +5 -5
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/edit.html.haml +3 -3
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/index.html.haml +20 -19
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/new.html.haml +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/show.html.haml +5 -5
- data/readme-template.md.erb +5 -48
- data/test/lib/generators/bootstrap/install_generator_test.rb +3 -33
- data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/fonts/glyphicons-halflings-regular.svg +228 -0
- data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/javascripts/bootstrap-ie.js +2 -0
- data/vendor/assets/javascripts/bootstrap-ie/html5shiv.js +8 -0
- data/vendor/assets/javascripts/bootstrap-ie/respond.min.js +6 -0
- data/vendor/assets/javascripts/bootstrap.js +12 -13
- data/vendor/assets/javascripts/bootstrap/affix.js +126 -0
- data/vendor/assets/javascripts/{bootstrap-alert.js → bootstrap/alert.js} +35 -36
- data/vendor/assets/javascripts/bootstrap/button.js +109 -0
- data/vendor/assets/javascripts/bootstrap/carousel.js +217 -0
- data/vendor/assets/javascripts/bootstrap/collapse.js +179 -0
- data/vendor/assets/javascripts/bootstrap/dropdown.js +154 -0
- data/vendor/assets/javascripts/bootstrap/modal.js +246 -0
- data/vendor/assets/javascripts/bootstrap/popover.js +117 -0
- data/vendor/assets/javascripts/bootstrap/scrollspy.js +158 -0
- data/vendor/assets/javascripts/bootstrap/tab.js +135 -0
- data/vendor/assets/javascripts/bootstrap/tooltip.js +386 -0
- data/vendor/assets/javascripts/bootstrap/transition.js +56 -0
- data/vendor/assets/stylesheets/bootstrap.css +4638 -4000
- data/vendor/twitter/bootstrap/less/alerts.less +46 -58
- data/vendor/twitter/bootstrap/less/badges.less +51 -0
- data/vendor/twitter/bootstrap/less/bootstrap.less +27 -31
- data/vendor/twitter/bootstrap/less/breadcrumbs.less +7 -8
- data/vendor/twitter/bootstrap/less/button-groups.less +173 -154
- data/vendor/twitter/bootstrap/less/buttons.less +97 -165
- data/vendor/twitter/bootstrap/less/carousel.less +115 -64
- data/vendor/twitter/bootstrap/less/close.less +20 -19
- data/vendor/twitter/bootstrap/less/code.less +17 -22
- data/vendor/twitter/bootstrap/less/component-animations.less +10 -3
- data/vendor/twitter/bootstrap/less/dropdowns.less +92 -147
- data/vendor/twitter/bootstrap/less/forms.less +224 -561
- data/vendor/twitter/bootstrap/less/glyphicons.less +232 -0
- data/vendor/twitter/bootstrap/less/grid.less +336 -11
- data/vendor/twitter/bootstrap/less/input-groups.less +127 -0
- data/vendor/twitter/bootstrap/less/jumbotron.less +40 -0
- data/vendor/twitter/bootstrap/less/labels.less +58 -0
- data/vendor/twitter/bootstrap/less/list-group.less +88 -0
- data/vendor/twitter/bootstrap/less/media.less +8 -7
- data/vendor/twitter/bootstrap/less/mixins.less +487 -466
- data/vendor/twitter/bootstrap/less/modals.less +98 -52
- data/vendor/twitter/bootstrap/less/navbar.less +507 -383
- data/vendor/twitter/bootstrap/less/navs.less +169 -349
- data/vendor/twitter/bootstrap/less/normalize.less +396 -0
- data/vendor/twitter/bootstrap/less/pager.less +45 -33
- data/vendor/twitter/bootstrap/less/pagination.less +65 -105
- data/vendor/twitter/bootstrap/less/panels.less +148 -0
- data/vendor/twitter/bootstrap/less/popovers.less +51 -51
- data/vendor/twitter/bootstrap/less/print.less +100 -0
- data/vendor/twitter/bootstrap/less/progress-bars.less +28 -55
- data/vendor/twitter/bootstrap/less/responsive-utilities.less +195 -34
- data/vendor/twitter/bootstrap/less/scaffolding.less +101 -24
- data/vendor/twitter/bootstrap/less/tables.less +170 -178
- data/vendor/twitter/bootstrap/less/theme.less +232 -0
- data/vendor/twitter/bootstrap/less/thumbnails.less +11 -33
- data/vendor/twitter/bootstrap/less/tooltip.less +45 -20
- data/vendor/twitter/bootstrap/less/type.less +100 -109
- data/vendor/twitter/bootstrap/less/utilities.less +19 -7
- data/vendor/twitter/bootstrap/less/variables.less +498 -179
- data/vendor/twitter/bootstrap/less/wells.less +7 -7
- data/vendor/twitter/bootstrap/sass/_alerts.scss +46 -58
- data/vendor/twitter/bootstrap/sass/_badges.scss +51 -0
- data/vendor/twitter/bootstrap/sass/_breadcrumbs.scss +8 -9
- data/vendor/twitter/bootstrap/sass/_button-groups.scss +173 -154
- data/vendor/twitter/bootstrap/sass/_buttons.scss +97 -165
- data/vendor/twitter/bootstrap/sass/_carousel.scss +116 -65
- data/vendor/twitter/bootstrap/sass/_close.scss +9 -8
- data/vendor/twitter/bootstrap/sass/_code.scss +16 -21
- data/vendor/twitter/bootstrap/sass/_component-animations.scss +10 -3
- data/vendor/twitter/bootstrap/sass/_dropdowns.scss +94 -148
- data/vendor/twitter/bootstrap/sass/_forms.scss +220 -559
- data/vendor/twitter/bootstrap/sass/_glyphicons.scss +232 -0
- data/vendor/twitter/bootstrap/sass/_grid.scss +336 -11
- data/vendor/twitter/bootstrap/sass/_input-groups.scss +127 -0
- data/vendor/twitter/bootstrap/sass/_jumbotron.scss +40 -0
- data/vendor/twitter/bootstrap/sass/_labels.scss +58 -0
- data/vendor/twitter/bootstrap/sass/_list-group.scss +88 -0
- data/vendor/twitter/bootstrap/sass/_media.scss +8 -7
- data/vendor/twitter/bootstrap/sass/_mixins.scss +465 -433
- data/vendor/twitter/bootstrap/sass/_modals.scss +102 -52
- data/vendor/twitter/bootstrap/sass/_navbar.scss +511 -383
- data/vendor/twitter/bootstrap/sass/_navs.scss +169 -349
- data/vendor/twitter/bootstrap/sass/_normalize.scss +396 -0
- data/vendor/twitter/bootstrap/sass/_pager.scss +45 -33
- data/vendor/twitter/bootstrap/sass/_pagination.scss +65 -105
- data/vendor/twitter/bootstrap/sass/_panels.scss +148 -0
- data/vendor/twitter/bootstrap/sass/_popovers.scss +51 -51
- data/vendor/twitter/bootstrap/sass/_print.scss +100 -0
- data/vendor/twitter/bootstrap/sass/_progress-bars.scss +28 -55
- data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +180 -45
- data/vendor/twitter/bootstrap/sass/_scaffolding.scss +101 -24
- data/vendor/twitter/bootstrap/sass/_tables.scss +169 -168
- data/vendor/twitter/bootstrap/sass/_theme.scss +232 -0
- data/vendor/twitter/bootstrap/sass/_thumbnails.scss +11 -33
- data/vendor/twitter/bootstrap/sass/_tooltip.scss +45 -20
- data/vendor/twitter/bootstrap/sass/_type.scss +101 -110
- data/vendor/twitter/bootstrap/sass/_utilities.scss +19 -22
- data/vendor/twitter/bootstrap/sass/_variables.scss +498 -179
- data/vendor/twitter/bootstrap/sass/_wells.scss +7 -7
- data/vendor/twitter/bootstrap/sass/bootstrap.scss +29 -33
- metadata +47 -56
- data/lib/bootstrap/generators/engine.rb +0 -14
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +0 -301
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css +0 -18
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.less +0 -19
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +0 -19
- data/lib/generators/bootstrap/install/templates/config/initializers/simple_form.rb +0 -176
- data/lib/generators/bootstrap/install/templates/config/locales/simple_form.en.yml +0 -24
- data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +0 -13
- data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +0 -10
- data/lib/generators/bootstrap/install/templates/layouts/fluid.html.erb +0 -80
- data/lib/generators/bootstrap/install/templates/layouts/fluid.html.haml +0 -94
- data/lib/generators/bootstrap/install/templates/layouts/hero.html.erb +0 -53
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
- data/vendor/assets/javascripts/bootstrap-button.js +0 -105
- data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
- data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
- data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -169
- data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
- data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
- data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
- data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
- data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
- data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
- data/vendor/assets/stylesheets/bootstrap-responsive.css +0 -1109
- data/vendor/twitter/bootstrap/less/accordion.less +0 -34
- data/vendor/twitter/bootstrap/less/hero-unit.less +0 -25
- data/vendor/twitter/bootstrap/less/labels-badges.less +0 -84
- data/vendor/twitter/bootstrap/less/layouts.less +0 -16
- data/vendor/twitter/bootstrap/less/reset.less +0 -216
- data/vendor/twitter/bootstrap/less/responsive-1200px-min.less +0 -28
- data/vendor/twitter/bootstrap/less/responsive-767px-max.less +0 -193
- data/vendor/twitter/bootstrap/less/responsive-768px-979px.less +0 -19
- data/vendor/twitter/bootstrap/less/responsive-navbar.less +0 -189
- data/vendor/twitter/bootstrap/less/responsive.less +0 -48
- data/vendor/twitter/bootstrap/less/sprites.less +0 -197
- data/vendor/twitter/bootstrap/sass/_accordion.scss +0 -34
- data/vendor/twitter/bootstrap/sass/_hero-unit.scss +0 -25
- data/vendor/twitter/bootstrap/sass/_labels-badges.scss +0 -83
- data/vendor/twitter/bootstrap/sass/_layouts.scss +0 -16
- data/vendor/twitter/bootstrap/sass/_reset.scss +0 -216
- data/vendor/twitter/bootstrap/sass/_responsive-1200px-min.scss +0 -28
- data/vendor/twitter/bootstrap/sass/_responsive-767px-max.scss +0 -193
- data/vendor/twitter/bootstrap/sass/_responsive-768px-979px.scss +0 -19
- data/vendor/twitter/bootstrap/sass/_responsive-navbar.scss +0 -189
- data/vendor/twitter/bootstrap/sass/_sprites.scss +0 -197
- data/vendor/twitter/bootstrap/sass/responsive.scss +0 -48
|
@@ -3,51 +3,128 @@
|
|
|
3
3
|
// --------------------------------------------------
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
// Reset the box-sizing
|
|
7
|
+
|
|
8
|
+
*,
|
|
9
|
+
*:before,
|
|
10
|
+
*:after {
|
|
11
|
+
@include box-sizing(border-box);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
// Body reset
|
|
7
|
-
|
|
16
|
+
|
|
17
|
+
html {
|
|
18
|
+
font-size: 62.5%;
|
|
19
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
20
|
+
}
|
|
8
21
|
|
|
9
22
|
body {
|
|
10
|
-
|
|
11
|
-
font-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: $
|
|
15
|
-
|
|
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;
|
|
16
49
|
}
|
|
17
50
|
|
|
18
51
|
|
|
19
52
|
// Links
|
|
20
|
-
// -------------------------
|
|
21
53
|
|
|
22
54
|
a {
|
|
23
|
-
color: $
|
|
55
|
+
color: $link-color;
|
|
24
56
|
text-decoration: none;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
57
|
+
|
|
58
|
+
&:hover,
|
|
59
|
+
&:focus {
|
|
60
|
+
color: $link-hover-color;
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:focus {
|
|
65
|
+
@include tab-focus();
|
|
66
|
+
}
|
|
30
67
|
}
|
|
31
68
|
|
|
32
69
|
|
|
33
70
|
// Images
|
|
34
|
-
|
|
71
|
+
|
|
72
|
+
img {
|
|
73
|
+
vertical-align: middle;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Responsive images (ensure images don't scale beyond their parents)
|
|
77
|
+
.img-responsive {
|
|
78
|
+
@include img-responsive();
|
|
79
|
+
}
|
|
35
80
|
|
|
36
81
|
// Rounded corners
|
|
37
82
|
.img-rounded {
|
|
38
|
-
|
|
83
|
+
border-radius: $border-radius-large;
|
|
39
84
|
}
|
|
40
85
|
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
+
@include transition(all .2s ease-in-out);
|
|
96
|
+
|
|
97
|
+
// Keep them at most 100% wide
|
|
98
|
+
@include img-responsive(inline-block);
|
|
48
99
|
}
|
|
49
100
|
|
|
50
101
|
// Perfect circle
|
|
51
102
|
.img-circle {
|
|
52
|
-
|
|
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;
|
|
53
130
|
}
|
|
@@ -3,233 +3,234 @@
|
|
|
3
3
|
// --------------------------------------------------
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
// BASE TABLES
|
|
7
|
-
// -----------------
|
|
8
|
-
|
|
9
6
|
table {
|
|
10
7
|
max-width: 100%;
|
|
11
|
-
background-color: $
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
background-color: $table-bg;
|
|
9
|
+
}
|
|
10
|
+
th {
|
|
11
|
+
text-align: left;
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
//
|
|
14
|
+
|
|
15
|
+
// Baseline styles
|
|
18
16
|
|
|
19
17
|
.table {
|
|
20
18
|
width: 100%;
|
|
21
|
-
margin-bottom: $
|
|
19
|
+
margin-bottom: $line-height-computed;
|
|
22
20
|
// Cells
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
33
|
}
|
|
34
34
|
// Bottom align for column headings
|
|
35
|
-
thead th {
|
|
35
|
+
thead > tr > th {
|
|
36
36
|
vertical-align: bottom;
|
|
37
|
+
border-bottom: 2px solid $table-border-color;
|
|
37
38
|
}
|
|
38
39
|
// Remove top border from thead by default
|
|
39
|
-
caption + thead
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
caption + thead,
|
|
41
|
+
colgroup + thead,
|
|
42
|
+
thead:first-child {
|
|
43
|
+
tr:first-child {
|
|
44
|
+
th, td {
|
|
45
|
+
border-top: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
46
48
|
}
|
|
47
49
|
// Account for multiple tbody instances
|
|
48
50
|
tbody + tbody {
|
|
49
|
-
border-top: 2px solid $
|
|
51
|
+
border-top: 2px solid $table-border-color;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
// Nesting
|
|
53
55
|
.table {
|
|
54
|
-
background-color: $
|
|
56
|
+
background-color: $body-bg;
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
// CONDENSED TABLE W/ HALF PADDING
|
|
61
|
-
// -------------------------------
|
|
61
|
+
// Condensed table w/ half padding
|
|
62
62
|
|
|
63
63
|
.table-condensed {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
thead,
|
|
65
|
+
tbody,
|
|
66
|
+
tfoot {
|
|
67
|
+
> tr {
|
|
68
|
+
> th,
|
|
69
|
+
> td {
|
|
70
|
+
padding: $table-condensed-cell-padding;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
67
73
|
}
|
|
68
74
|
}
|
|
69
75
|
|
|
70
76
|
|
|
71
|
-
//
|
|
72
|
-
//
|
|
77
|
+
// Bordered version
|
|
78
|
+
//
|
|
79
|
+
// Add borders all around the table and between all the columns.
|
|
73
80
|
|
|
74
81
|
.table-bordered {
|
|
75
|
-
border: 1px solid $
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
caption + thead tr:first-child th,
|
|
86
|
-
caption + tbody tr:first-child th,
|
|
87
|
-
caption + tbody tr:first-child td,
|
|
88
|
-
colgroup + thead tr:first-child th,
|
|
89
|
-
colgroup + tbody tr:first-child th,
|
|
90
|
-
colgroup + tbody tr:first-child td,
|
|
91
|
-
thead:first-child tr:first-child th,
|
|
92
|
-
tbody:first-child tr:first-child th,
|
|
93
|
-
tbody:first-child tr:first-child td {
|
|
94
|
-
border-top: 0;
|
|
95
|
-
}
|
|
96
|
-
// For first th/td in the first row in the first thead or tbody
|
|
97
|
-
thead:first-child tr:first-child > th:first-child,
|
|
98
|
-
tbody:first-child tr:first-child > td:first-child,
|
|
99
|
-
tbody:first-child tr:first-child > th:first-child {
|
|
100
|
-
@include border-top-left-radius($baseBorderRadius);
|
|
101
|
-
}
|
|
102
|
-
// For last th/td in the first row in the first thead or tbody
|
|
103
|
-
thead:first-child tr:first-child > th:last-child,
|
|
104
|
-
tbody:first-child tr:first-child > td:last-child,
|
|
105
|
-
tbody:first-child tr:first-child > th:last-child {
|
|
106
|
-
@include border-top-right-radius($baseBorderRadius);
|
|
107
|
-
}
|
|
108
|
-
// For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
|
|
109
|
-
thead:last-child tr:last-child > th:first-child,
|
|
110
|
-
tbody:last-child tr:last-child > td:first-child,
|
|
111
|
-
tbody:last-child tr:last-child > th:first-child,
|
|
112
|
-
tfoot:last-child tr:last-child > td:first-child,
|
|
113
|
-
tfoot:last-child tr:last-child > th:first-child {
|
|
114
|
-
@include border-bottom-left-radius($baseBorderRadius);
|
|
115
|
-
}
|
|
116
|
-
// For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
|
|
117
|
-
thead:last-child tr:last-child > th:last-child,
|
|
118
|
-
tbody:last-child tr:last-child > td:last-child,
|
|
119
|
-
tbody:last-child tr:last-child > th:last-child,
|
|
120
|
-
tfoot:last-child tr:last-child > td:last-child,
|
|
121
|
-
tfoot:last-child tr:last-child > th:last-child {
|
|
122
|
-
@include border-bottom-right-radius($baseBorderRadius);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
|
|
126
|
-
tfoot + tbody:last-child tr:last-child td:first-child {
|
|
127
|
-
@include border-bottom-left-radius(0);
|
|
128
|
-
}
|
|
129
|
-
tfoot + tbody:last-child tr:last-child td:last-child {
|
|
130
|
-
@include border-bottom-right-radius(0);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Special fixes to round the left border on the first td/th
|
|
134
|
-
caption + thead tr:first-child th:first-child,
|
|
135
|
-
caption + tbody tr:first-child td:first-child,
|
|
136
|
-
colgroup + thead tr:first-child th:first-child,
|
|
137
|
-
colgroup + tbody tr:first-child td:first-child {
|
|
138
|
-
@include border-top-left-radius($baseBorderRadius);
|
|
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
|
+
}
|
|
139
92
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
93
|
+
> thead {
|
|
94
|
+
> tr {
|
|
95
|
+
> th,
|
|
96
|
+
> td {
|
|
97
|
+
border-bottom-width: 2px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
145
100
|
}
|
|
146
|
-
|
|
147
101
|
}
|
|
148
102
|
|
|
149
103
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
// ZEBRA-STRIPING
|
|
153
|
-
// --------------
|
|
154
|
-
|
|
104
|
+
// Zebra-striping
|
|
105
|
+
//
|
|
155
106
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
|
107
|
+
|
|
156
108
|
.table-striped {
|
|
157
|
-
tbody {
|
|
158
|
-
> tr:nth-child(odd)
|
|
159
|
-
|
|
160
|
-
|
|
109
|
+
> tbody {
|
|
110
|
+
> tr:nth-child(odd) {
|
|
111
|
+
> td,
|
|
112
|
+
> th {
|
|
113
|
+
background-color: $table-bg-accent;
|
|
114
|
+
}
|
|
161
115
|
}
|
|
162
116
|
}
|
|
163
117
|
}
|
|
164
118
|
|
|
165
119
|
|
|
166
|
-
//
|
|
167
|
-
//
|
|
120
|
+
// Hover effect
|
|
121
|
+
//
|
|
168
122
|
// Placed here since it has to come after the potential zebra striping
|
|
123
|
+
|
|
169
124
|
.table-hover {
|
|
170
|
-
tbody {
|
|
171
|
-
tr:hover
|
|
172
|
-
|
|
173
|
-
|
|
125
|
+
> tbody {
|
|
126
|
+
> tr:hover {
|
|
127
|
+
> td,
|
|
128
|
+
> th {
|
|
129
|
+
background-color: $table-bg-hover;
|
|
130
|
+
}
|
|
174
131
|
}
|
|
175
132
|
}
|
|
176
133
|
}
|
|
177
134
|
|
|
178
135
|
|
|
179
|
-
//
|
|
180
|
-
//
|
|
136
|
+
// Table cell sizing
|
|
137
|
+
//
|
|
138
|
+
// Reset default table behavior
|
|
181
139
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
table
|
|
185
|
-
.row-fluid table td[class*="span"],
|
|
186
|
-
.row-fluid table th[class*="span"] {
|
|
187
|
-
display: table-cell;
|
|
188
|
-
float: none; // undo default grid column styles
|
|
189
|
-
margin-left: 0; // undo default grid column styles
|
|
140
|
+
table col[class*="col-"] {
|
|
141
|
+
float: none;
|
|
142
|
+
display: table-column;
|
|
190
143
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
144
|
+
table {
|
|
145
|
+
td,
|
|
146
|
+
th {
|
|
147
|
+
&[class*="col-"] {
|
|
148
|
+
float: none;
|
|
149
|
+
display: table-cell;
|
|
150
|
+
}
|
|
197
151
|
}
|
|
198
152
|
}
|
|
199
153
|
|
|
200
154
|
|
|
201
|
-
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
.table
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
background-color: $warningBackground;
|
|
215
|
-
}
|
|
216
|
-
&.info > td {
|
|
217
|
-
background-color: $infoBackground;
|
|
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;
|
|
218
168
|
}
|
|
219
169
|
}
|
|
220
170
|
|
|
221
|
-
//
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
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
|
+
}
|
|
234
235
|
}
|
|
235
236
|
}
|