twbs_less_rails 1.0.2

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.
Files changed (142) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +12 -0
  3. data/CONTRIBUTING.md +45 -0
  4. data/Gemfile +3 -0
  5. data/Gemfile.lock +144 -0
  6. data/LICENSE +30 -0
  7. data/README.md +147 -0
  8. data/Rakefile +113 -0
  9. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  10. data/app/assets/fonts/fontawesome-webfont.svg +399 -0
  11. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  12. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  13. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  14. data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  15. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  16. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  17. data/gemfiles/Gemfile.rails-3.2.x +9 -0
  18. data/gemfiles/Gemfile.rails-4.0.x +9 -0
  19. data/lib/generators/twbs_less_rails/install/install_generator.rb +31 -0
  20. data/lib/generators/twbs_less_rails/install/templates/application.css +15 -0
  21. data/lib/generators/twbs_less_rails/install/templates/application.js +17 -0
  22. data/lib/generators/twbs_less_rails/install/templates/twbs-variables.css.less +5 -0
  23. data/lib/generators/twbs_less_rails/install/templates/twbs.css.less +14 -0
  24. data/lib/generators/twbs_less_rails/install/templates/twbs.js.coffee +7 -0
  25. data/lib/tasks/twbs_less_rails_tasks.rake +4 -0
  26. data/lib/twbs_less_rails/engine.rb +7 -0
  27. data/lib/twbs_less_rails/version.rb +3 -0
  28. data/lib/twbs_less_rails.rb +4 -0
  29. data/test/dummy/README.rdoc +28 -0
  30. data/test/dummy/Rakefile +6 -0
  31. data/test/dummy/app/assets/images/.keep +0 -0
  32. data/test/dummy/app/assets/javascripts/application.js +14 -0
  33. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  34. data/test/dummy/app/assets/stylesheets/default-twbs.css.less +1 -0
  35. data/test/dummy/app/assets/stylesheets/test.css.less +5 -0
  36. data/test/dummy/app/assets/stylesheets/twbs-variables.css.less +6 -0
  37. data/test/dummy/app/assets/stylesheets/twbs.css.less +14 -0
  38. data/test/dummy/app/controllers/application_controller.rb +5 -0
  39. data/test/dummy/app/controllers/concerns/.keep +0 -0
  40. data/test/dummy/app/helpers/application_helper.rb +2 -0
  41. data/test/dummy/app/mailers/.keep +0 -0
  42. data/test/dummy/app/models/.keep +0 -0
  43. data/test/dummy/app/models/concerns/.keep +0 -0
  44. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  45. data/test/dummy/bin/bundle +3 -0
  46. data/test/dummy/bin/rails +4 -0
  47. data/test/dummy/bin/rake +4 -0
  48. data/test/dummy/config/application.rb +27 -0
  49. data/test/dummy/config/boot.rb +5 -0
  50. data/test/dummy/config/database.yml +25 -0
  51. data/test/dummy/config/environment.rb +5 -0
  52. data/test/dummy/config/environments/development.rb +29 -0
  53. data/test/dummy/config/environments/production.rb +80 -0
  54. data/test/dummy/config/environments/test.rb +36 -0
  55. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  56. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/test/dummy/config/initializers/inflections.rb +16 -0
  58. data/test/dummy/config/initializers/mime_types.rb +5 -0
  59. data/test/dummy/config/initializers/secret_token.rb +18 -0
  60. data/test/dummy/config/initializers/session_store.rb +3 -0
  61. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  62. data/test/dummy/config/locales/en.yml +23 -0
  63. data/test/dummy/config/routes.rb +56 -0
  64. data/test/dummy/config.ru +4 -0
  65. data/test/dummy/db/.keep +0 -0
  66. data/test/dummy/lib/assets/.keep +0 -0
  67. data/test/dummy/log/.keep +0 -0
  68. data/test/dummy/public/404.html +58 -0
  69. data/test/dummy/public/422.html +58 -0
  70. data/test/dummy/public/500.html +57 -0
  71. data/test/dummy/public/favicon.ico +0 -0
  72. data/test/generators/default_rails_assets/application.css +13 -0
  73. data/test/generators/default_rails_assets/application.js +16 -0
  74. data/test/generators/install_generator_test.rb +47 -0
  75. data/test/integration/assets_precompile_integration_test.rb +49 -0
  76. data/test/integration/twbs_less_rails_integration_test.rb +38 -0
  77. data/test/test_helper.rb +38 -0
  78. data/twbs_less_rails.gemspec +34 -0
  79. data/vendor/assets/javascripts/respond.js +342 -0
  80. data/vendor/assets/javascripts/twbs/bootstrap/affix.js +126 -0
  81. data/vendor/assets/javascripts/twbs/bootstrap/alert.js +98 -0
  82. data/vendor/assets/javascripts/twbs/bootstrap/button.js +109 -0
  83. data/vendor/assets/javascripts/twbs/bootstrap/carousel.js +217 -0
  84. data/vendor/assets/javascripts/twbs/bootstrap/collapse.js +179 -0
  85. data/vendor/assets/javascripts/twbs/bootstrap/dropdown.js +154 -0
  86. data/vendor/assets/javascripts/twbs/bootstrap/modal.js +246 -0
  87. data/vendor/assets/javascripts/twbs/bootstrap/popover.js +117 -0
  88. data/vendor/assets/javascripts/twbs/bootstrap/scrollspy.js +158 -0
  89. data/vendor/assets/javascripts/twbs/bootstrap/tab.js +135 -0
  90. data/vendor/assets/javascripts/twbs/bootstrap/tooltip.js +386 -0
  91. data/vendor/assets/javascripts/twbs/bootstrap/transition.js +56 -0
  92. data/vendor/assets/javascripts/twbs/bootstrap.js +12 -0
  93. data/vendor/assets/stylesheets/fontawesome/bootstrap.less +84 -0
  94. data/vendor/assets/stylesheets/fontawesome/core.less +129 -0
  95. data/vendor/assets/stylesheets/fontawesome/extras.less +93 -0
  96. data/vendor/assets/stylesheets/fontawesome/font-awesome.less +33 -0
  97. data/vendor/assets/stylesheets/fontawesome/icons.less +381 -0
  98. data/vendor/assets/stylesheets/fontawesome/mixins.less +48 -0
  99. data/vendor/assets/stylesheets/fontawesome/path.less +14 -0
  100. data/vendor/assets/stylesheets/fontawesome/variables.less +735 -0
  101. data/vendor/assets/stylesheets/twbs/bootstrap/alerts.less +67 -0
  102. data/vendor/assets/stylesheets/twbs/bootstrap/badges.less +51 -0
  103. data/vendor/assets/stylesheets/twbs/bootstrap/bootstrap.less +48 -0
  104. data/vendor/assets/stylesheets/twbs/bootstrap/breadcrumbs.less +23 -0
  105. data/vendor/assets/stylesheets/twbs/bootstrap/button-groups.less +248 -0
  106. data/vendor/assets/stylesheets/twbs/bootstrap/buttons.less +158 -0
  107. data/vendor/assets/stylesheets/twbs/bootstrap/carousel.less +220 -0
  108. data/vendor/assets/stylesheets/twbs/bootstrap/close.less +33 -0
  109. data/vendor/assets/stylesheets/twbs/bootstrap/code.less +53 -0
  110. data/vendor/assets/stylesheets/twbs/bootstrap/component-animations.less +29 -0
  111. data/vendor/assets/stylesheets/twbs/bootstrap/dropdowns.less +192 -0
  112. data/vendor/assets/stylesheets/twbs/bootstrap/forms.less +366 -0
  113. data/vendor/assets/stylesheets/twbs/bootstrap/glyphicons.less +236 -0
  114. data/vendor/assets/stylesheets/twbs/bootstrap/grid.less +93 -0
  115. data/vendor/assets/stylesheets/twbs/bootstrap/input-groups.less +136 -0
  116. data/vendor/assets/stylesheets/twbs/bootstrap/jumbotron.less +40 -0
  117. data/vendor/assets/stylesheets/twbs/bootstrap/labels.less +58 -0
  118. data/vendor/assets/stylesheets/twbs/bootstrap/list-group.less +88 -0
  119. data/vendor/assets/stylesheets/twbs/bootstrap/media.less +56 -0
  120. data/vendor/assets/stylesheets/twbs/bootstrap/mixins.less +846 -0
  121. data/vendor/assets/stylesheets/twbs/bootstrap/modals.less +131 -0
  122. data/vendor/assets/stylesheets/twbs/bootstrap/navbar.less +621 -0
  123. data/vendor/assets/stylesheets/twbs/bootstrap/navs.less +257 -0
  124. data/vendor/assets/stylesheets/twbs/bootstrap/normalize.less +406 -0
  125. data/vendor/assets/stylesheets/twbs/bootstrap/pager.less +55 -0
  126. data/vendor/assets/stylesheets/twbs/bootstrap/pagination.less +85 -0
  127. data/vendor/assets/stylesheets/twbs/bootstrap/panels.less +168 -0
  128. data/vendor/assets/stylesheets/twbs/bootstrap/popovers.less +133 -0
  129. data/vendor/assets/stylesheets/twbs/bootstrap/print.less +100 -0
  130. data/vendor/assets/stylesheets/twbs/bootstrap/progress-bars.less +96 -0
  131. data/vendor/assets/stylesheets/twbs/bootstrap/responsive-utilities.less +209 -0
  132. data/vendor/assets/stylesheets/twbs/bootstrap/scaffolding.less +119 -0
  133. data/vendor/assets/stylesheets/twbs/bootstrap/tables.less +236 -0
  134. data/vendor/assets/stylesheets/twbs/bootstrap/theme.less +246 -0
  135. data/vendor/assets/stylesheets/twbs/bootstrap/thumbnails.less +33 -0
  136. data/vendor/assets/stylesheets/twbs/bootstrap/tooltip.less +95 -0
  137. data/vendor/assets/stylesheets/twbs/bootstrap/type.less +273 -0
  138. data/vendor/assets/stylesheets/twbs/bootstrap/utilities.less +56 -0
  139. data/vendor/assets/stylesheets/twbs/bootstrap/variables.less +637 -0
  140. data/vendor/assets/stylesheets/twbs/bootstrap/wells.less +29 -0
  141. data/vendor/assets/stylesheets/twbs/bootstrap.less +1 -0
  142. metadata +387 -0
@@ -0,0 +1,209 @@
1
+ //
2
+ // Responsive: Utility classes
3
+ // --------------------------------------------------
4
+
5
+
6
+ // IE10 in Windows (Phone) 8
7
+ //
8
+ // Support for responsive views via media queries is kind of borked in IE10, for
9
+ // Surface/desktop in split view and for Windows Phone 8. This particular fix
10
+ // must be accompanied by a snippet of JavaScript to sniff the user agent and
11
+ // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
12
+ // our Getting Started page for more information on this bug.
13
+ //
14
+ // For more information, see the following:
15
+ //
16
+ // Issue: https://github.com/twbs/bootstrap/issues/10497
17
+ // Docs: http://getbootstrap.com/getting-started/#browsers
18
+ // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
19
+
20
+ @-ms-viewport {
21
+ width: device-width;
22
+ }
23
+
24
+
25
+ // Visibility utilities
26
+
27
+ .visible-xs {
28
+ .responsive-invisibility();
29
+ @media (max-width: @screen-xs-max) {
30
+ .responsive-visibility();
31
+ }
32
+ &.visible-sm {
33
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
34
+ .responsive-visibility();
35
+ }
36
+ }
37
+ &.visible-md {
38
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
39
+ .responsive-visibility();
40
+ }
41
+ }
42
+ &.visible-lg {
43
+ @media (min-width: @screen-lg-min) {
44
+ .responsive-visibility();
45
+ }
46
+ }
47
+ }
48
+ .visible-sm {
49
+ .responsive-invisibility();
50
+ &.visible-xs {
51
+ @media (max-width: @screen-xs-max) {
52
+ .responsive-visibility();
53
+ }
54
+ }
55
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
56
+ .responsive-visibility();
57
+ }
58
+ &.visible-md {
59
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
60
+ .responsive-visibility();
61
+ }
62
+ }
63
+ &.visible-lg {
64
+ @media (min-width: @screen-lg-min) {
65
+ .responsive-visibility();
66
+ }
67
+ }
68
+ }
69
+ .visible-md {
70
+ .responsive-invisibility();
71
+ &.visible-xs {
72
+ @media (max-width: @screen-xs-max) {
73
+ .responsive-visibility();
74
+ }
75
+ }
76
+ &.visible-sm {
77
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
78
+ .responsive-visibility();
79
+ }
80
+ }
81
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
82
+ .responsive-visibility();
83
+ }
84
+ &.visible-lg {
85
+ @media (min-width: @screen-lg-min) {
86
+ .responsive-visibility();
87
+ }
88
+ }
89
+ }
90
+ .visible-lg {
91
+ .responsive-invisibility();
92
+ &.visible-xs {
93
+ @media (max-width: @screen-xs-max) {
94
+ .responsive-visibility();
95
+ }
96
+ }
97
+ &.visible-sm {
98
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
99
+ .responsive-visibility();
100
+ }
101
+ }
102
+ &.visible-md {
103
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
104
+ .responsive-visibility();
105
+ }
106
+ }
107
+ @media (min-width: @screen-lg-min) {
108
+ .responsive-visibility();
109
+ }
110
+ }
111
+
112
+ .hidden-xs {
113
+ .responsive-visibility();
114
+ @media (max-width: @screen-xs-max) {
115
+ .responsive-invisibility();
116
+ }
117
+ &.hidden-sm {
118
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
119
+ .responsive-invisibility();
120
+ }
121
+ }
122
+ &.hidden-md {
123
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
124
+ .responsive-invisibility();
125
+ }
126
+ }
127
+ &.hidden-lg {
128
+ @media (min-width: @screen-lg-min) {
129
+ .responsive-invisibility();
130
+ }
131
+ }
132
+ }
133
+ .hidden-sm {
134
+ .responsive-visibility();
135
+ &.hidden-xs {
136
+ @media (max-width: @screen-xs-max) {
137
+ .responsive-invisibility();
138
+ }
139
+ }
140
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
141
+ .responsive-invisibility();
142
+ }
143
+ &.hidden-md {
144
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
145
+ .responsive-invisibility();
146
+ }
147
+ }
148
+ &.hidden-lg {
149
+ @media (min-width: @screen-lg-min) {
150
+ .responsive-invisibility();
151
+ }
152
+ }
153
+ }
154
+ .hidden-md {
155
+ .responsive-visibility();
156
+ &.hidden-xs {
157
+ @media (max-width: @screen-xs-max) {
158
+ .responsive-invisibility();
159
+ }
160
+ }
161
+ &.hidden-sm {
162
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
163
+ .responsive-invisibility();
164
+ }
165
+ }
166
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
167
+ .responsive-invisibility();
168
+ }
169
+ &.hidden-lg {
170
+ @media (min-width: @screen-lg-min) {
171
+ .responsive-invisibility();
172
+ }
173
+ }
174
+ }
175
+ .hidden-lg {
176
+ .responsive-visibility();
177
+ &.hidden-xs {
178
+ @media (max-width: @screen-xs-max) {
179
+ .responsive-invisibility();
180
+ }
181
+ }
182
+ &.hidden-sm {
183
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
184
+ .responsive-invisibility();
185
+ }
186
+ }
187
+ &.hidden-md {
188
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
189
+ .responsive-invisibility();
190
+ }
191
+ }
192
+ @media (min-width: @screen-lg-min) {
193
+ .responsive-invisibility();
194
+ }
195
+ }
196
+
197
+ // Print utilities
198
+ .visible-print {
199
+ .responsive-invisibility();
200
+ }
201
+
202
+ @media print {
203
+ .visible-print {
204
+ .responsive-visibility();
205
+ }
206
+ .hidden-print {
207
+ .responsive-invisibility();
208
+ }
209
+ }
@@ -0,0 +1,119 @@
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
+
41
+ // Links
42
+
43
+ a {
44
+ color: @link-color;
45
+ text-decoration: none;
46
+
47
+ &:hover,
48
+ &:focus {
49
+ color: @link-hover-color;
50
+ text-decoration: underline;
51
+ }
52
+
53
+ &:focus {
54
+ .tab-focus();
55
+ }
56
+ }
57
+
58
+
59
+ // Images
60
+
61
+ img {
62
+ vertical-align: middle;
63
+ }
64
+
65
+ // Responsive images (ensure images don't scale beyond their parents)
66
+ .img-responsive {
67
+ .img-responsive();
68
+ }
69
+
70
+ // Rounded corners
71
+ .img-rounded {
72
+ border-radius: @border-radius-large;
73
+ }
74
+
75
+ // Image thumbnails
76
+ //
77
+ // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
78
+ .img-thumbnail {
79
+ padding: @thumbnail-padding;
80
+ line-height: @line-height-base;
81
+ background-color: @thumbnail-bg;
82
+ border: 1px solid @thumbnail-border;
83
+ border-radius: @thumbnail-border-radius;
84
+ .transition(all .2s ease-in-out);
85
+
86
+ // Keep them at most 100% wide
87
+ .img-responsive(inline-block);
88
+ }
89
+
90
+ // Perfect circle
91
+ .img-circle {
92
+ border-radius: 50%; // set radius in percents
93
+ }
94
+
95
+
96
+ // Horizontal rules
97
+
98
+ hr {
99
+ margin-top: @line-height-computed;
100
+ margin-bottom: @line-height-computed;
101
+ border: 0;
102
+ border-top: 1px solid @hr-border;
103
+ }
104
+
105
+
106
+ // Only display content to screen readers
107
+ //
108
+ // See: http://a11yproject.com/posts/how-to-hide-content/
109
+
110
+ .sr-only {
111
+ position: absolute;
112
+ width: 1px;
113
+ height: 1px;
114
+ margin: -1px;
115
+ padding: 0;
116
+ overflow: hidden;
117
+ clip: rect(0,0,0,0);
118
+ border: 0;
119
+ }
@@ -0,0 +1,236 @@
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,
45
+ > td {
46
+ border-top: 0;
47
+ }
48
+ }
49
+ }
50
+ // Account for multiple tbody instances
51
+ > tbody + tbody {
52
+ border-top: 2px solid @table-border-color;
53
+ }
54
+
55
+ // Nesting
56
+ .table {
57
+ background-color: @body-bg;
58
+ }
59
+ }
60
+
61
+
62
+ // Condensed table w/ half padding
63
+
64
+ .table-condensed {
65
+ > thead,
66
+ > tbody,
67
+ > tfoot {
68
+ > tr {
69
+ > th,
70
+ > td {
71
+ padding: @table-condensed-cell-padding;
72
+ }
73
+ }
74
+ }
75
+ }
76
+
77
+
78
+ // Bordered version
79
+ //
80
+ // Add borders all around the table and between all the columns.
81
+
82
+ .table-bordered {
83
+ border: 1px solid @table-border-color;
84
+ > thead,
85
+ > tbody,
86
+ > tfoot {
87
+ > tr {
88
+ > th,
89
+ > td {
90
+ border: 1px solid @table-border-color;
91
+ }
92
+ }
93
+ }
94
+ > thead > tr {
95
+ > th,
96
+ > td {
97
+ border-bottom-width: 2px;
98
+ }
99
+ }
100
+ }
101
+
102
+
103
+ // Zebra-striping
104
+ //
105
+ // Default zebra-stripe styles (alternating gray and transparent backgrounds)
106
+
107
+ .table-striped > tbody > tr:nth-child(odd) {
108
+ > td,
109
+ > th {
110
+ background-color: @table-bg-accent;
111
+ }
112
+ }
113
+
114
+
115
+ // Hover effect
116
+ //
117
+ // Placed here since it has to come after the potential zebra striping
118
+
119
+ .table-hover > tbody > tr:hover {
120
+ > td,
121
+ > th {
122
+ background-color: @table-bg-hover;
123
+ }
124
+ }
125
+
126
+
127
+ // Table cell sizing
128
+ //
129
+ // Reset default table behavior
130
+
131
+ table col[class*="col-"] {
132
+ float: none;
133
+ display: table-column;
134
+ }
135
+ table {
136
+ td,
137
+ th {
138
+ &[class*="col-"] {
139
+ float: none;
140
+ display: table-cell;
141
+ }
142
+ }
143
+ }
144
+
145
+
146
+ // Table backgrounds
147
+ //
148
+ // Exact selectors below required to override `.table-striped` and prevent
149
+ // inheritance to nested tables.
150
+
151
+ .table > thead > tr,
152
+ .table > tbody > tr,
153
+ .table > tfoot > tr {
154
+ > td.active,
155
+ > th.active,
156
+ &.active > td,
157
+ &.active > th {
158
+ background-color: @table-bg-active;
159
+ }
160
+ }
161
+
162
+ // Generate the contextual variants
163
+ .table-row-variant(success; @state-success-bg; @state-success-border);
164
+ .table-row-variant(danger; @state-danger-bg; @state-danger-border);
165
+ .table-row-variant(warning; @state-warning-bg; @state-warning-border);
166
+
167
+
168
+ // Responsive tables
169
+ //
170
+ // Wrap your tables in `.table-responsive` and we'll make them mobile friendly
171
+ // by enabling horizontal scrolling. Only applies <768px. Everything above that
172
+ // will display normally.
173
+
174
+ @media (max-width: @screen-xs-max) {
175
+ .table-responsive {
176
+ width: 100%;
177
+ margin-bottom: (@line-height-computed * 0.75);
178
+ overflow-y: hidden;
179
+ overflow-x: scroll;
180
+ -ms-overflow-style: -ms-autohiding-scrollbar;
181
+ border: 1px solid @table-border-color;
182
+ -webkit-overflow-scrolling: touch;
183
+
184
+ // Tighten up spacing
185
+ > .table {
186
+ margin-bottom: 0;
187
+
188
+ // Ensure the content doesn't wrap
189
+ > thead,
190
+ > tbody,
191
+ > tfoot {
192
+ > tr {
193
+ > th,
194
+ > td {
195
+ white-space: nowrap;
196
+ }
197
+ }
198
+ }
199
+ }
200
+
201
+ // Special overrides for the bordered tables
202
+ > .table-bordered {
203
+ border: 0;
204
+
205
+ // Nuke the appropriate borders so that the parent can handle them
206
+ > thead,
207
+ > tbody,
208
+ > tfoot {
209
+ > tr {
210
+ > th:first-child,
211
+ > td:first-child {
212
+ border-left: 0;
213
+ }
214
+ > th:last-child,
215
+ > td:last-child {
216
+ border-right: 0;
217
+ }
218
+ }
219
+ }
220
+
221
+ // Only nuke the last row's bottom-border in `tbody` and `tfoot` since
222
+ // chances are there will be only one `tr` in a `thead` and that would
223
+ // remove the border altogether.
224
+ > tbody,
225
+ > tfoot {
226
+ > tr:last-child {
227
+ > th,
228
+ > td {
229
+ border-bottom: 0;
230
+ }
231
+ }
232
+ }
233
+
234
+ }
235
+ }
236
+ }