twitter-bootstrap3-rails 3.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +708 -0
  3. data/Rakefile +46 -0
  4. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.svg +399 -0
  6. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  7. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  8. data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  9. data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  10. data/app/assets/javascripts/twitter/bootstrap.js +12 -0
  11. data/app/assets/javascripts/twitter/bootstrap/affix.js +126 -0
  12. data/app/assets/javascripts/twitter/bootstrap/alert.js +98 -0
  13. data/app/assets/javascripts/twitter/bootstrap/button.js +109 -0
  14. data/app/assets/javascripts/twitter/bootstrap/carousel.js +217 -0
  15. data/app/assets/javascripts/twitter/bootstrap/collapse.js +179 -0
  16. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +154 -0
  17. data/app/assets/javascripts/twitter/bootstrap/modal.js +244 -0
  18. data/app/assets/javascripts/twitter/bootstrap/popover.js +117 -0
  19. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +158 -0
  20. data/app/assets/javascripts/twitter/bootstrap/tab.js +135 -0
  21. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +382 -0
  22. data/app/assets/javascripts/twitter/bootstrap/transition.js +56 -0
  23. data/app/assets/javascripts/twitter/bootstrap_ujs.js +11 -0
  24. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5579 -0
  25. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +787 -0
  26. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +146 -0
  27. data/app/helpers/badge_label_helper.rb +16 -0
  28. data/app/helpers/bootstrap_flash_helper.rb +29 -0
  29. data/app/helpers/flash_block_helper.rb +17 -0
  30. data/app/helpers/glyph_helper.rb +17 -0
  31. data/app/helpers/modal_helper.rb +59 -0
  32. data/app/helpers/navbar_helper.rb +195 -0
  33. data/app/helpers/twitter_breadcrumbs_helper.rb +10 -0
  34. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +12 -0
  35. data/lib/generators/bootstrap/install/install_generator.rb +82 -0
  36. data/lib/generators/bootstrap/install/templates/application.css +7 -0
  37. data/lib/generators/bootstrap/install/templates/application.js +10 -0
  38. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +3 -0
  39. data/lib/generators/bootstrap/install/templates/bootstrap.js +4 -0
  40. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +7 -0
  41. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +29 -0
  42. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +18 -0
  43. data/lib/generators/bootstrap/layout/layout_generator.rb +20 -0
  44. data/lib/generators/bootstrap/layout/templates/layout.html.erb +85 -0
  45. data/lib/generators/bootstrap/layout/templates/layout.html.haml +50 -0
  46. data/lib/generators/bootstrap/layout/templates/layout.html.slim +52 -0
  47. data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
  48. data/lib/generators/bootstrap/partial/templates/_login.html.erb +28 -0
  49. data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -0
  50. data/lib/generators/bootstrap/themed/templates/_form.html.haml +9 -0
  51. data/lib/generators/bootstrap/themed/templates/_form.html.slim +10 -0
  52. data/lib/generators/bootstrap/themed/templates/edit.html.erb +5 -0
  53. data/lib/generators/bootstrap/themed/templates/edit.html.haml +4 -0
  54. data/lib/generators/bootstrap/themed/templates/edit.html.slim +4 -0
  55. data/lib/generators/bootstrap/themed/templates/index.html.erb +40 -0
  56. data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
  57. data/lib/generators/bootstrap/themed/templates/index.html.slim +27 -0
  58. data/lib/generators/bootstrap/themed/templates/new.html.erb +5 -0
  59. data/lib/generators/bootstrap/themed/templates/new.html.haml +4 -0
  60. data/lib/generators/bootstrap/themed/templates/new.html.slim +4 -0
  61. data/lib/generators/bootstrap/themed/templates/show.html.erb +21 -0
  62. data/lib/generators/bootstrap/themed/templates/show.html.haml +15 -0
  63. data/lib/generators/bootstrap/themed/templates/show.html.slim +16 -0
  64. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +13 -0
  65. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +10 -0
  66. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +11 -0
  67. data/lib/generators/bootstrap/themed/themed_generator.rb +148 -0
  68. data/lib/twitter-bootstrap-rails.rb +10 -0
  69. data/lib/twitter/bootstrap/rails/bootstrap.rb +2 -0
  70. data/lib/twitter/bootstrap/rails/engine.rb +33 -0
  71. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +42 -0
  72. data/lib/twitter/bootstrap/rails/version.rb +7 -0
  73. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +22 -0
  74. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +62 -0
  75. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +331 -0
  76. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +47 -0
  77. data/spec/spec_helper.rb +11 -0
  78. data/test/lib/breadcrumbs_test.rb +75 -0
  79. data/test/test_helper.rb +11 -0
  80. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5579 -0
  81. data/vendor/static-source/bootstrap.less +1 -0
  82. data/vendor/static-source/fontawesome.less +9 -0
  83. data/vendor/static-source/sprites.less +6 -0
  84. data/vendor/toolkit/fontawesome/bootstrap.less +84 -0
  85. data/vendor/toolkit/fontawesome/core.less +129 -0
  86. data/vendor/toolkit/fontawesome/extras.less +93 -0
  87. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +1953 -0
  88. data/vendor/toolkit/fontawesome/font-awesome.less +33 -0
  89. data/vendor/toolkit/fontawesome/icons.less +381 -0
  90. data/vendor/toolkit/fontawesome/mixins.less +48 -0
  91. data/vendor/toolkit/fontawesome/path.less +14 -0
  92. data/vendor/toolkit/fontawesome/variables.less +735 -0
  93. data/vendor/toolkit/twitter/bootstrap/alerts.less +71 -0
  94. data/vendor/toolkit/twitter/bootstrap/badges.less +51 -0
  95. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +63 -0
  96. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +23 -0
  97. data/vendor/toolkit/twitter/bootstrap/button-groups.less +244 -0
  98. data/vendor/toolkit/twitter/bootstrap/buttons.less +159 -0
  99. data/vendor/toolkit/twitter/bootstrap/carousel.less +204 -0
  100. data/vendor/toolkit/twitter/bootstrap/close.less +33 -0
  101. data/vendor/toolkit/twitter/bootstrap/code.less +56 -0
  102. data/vendor/toolkit/twitter/bootstrap/component-animations.less +29 -0
  103. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +176 -0
  104. data/vendor/toolkit/twitter/bootstrap/forms.less +332 -0
  105. data/vendor/toolkit/twitter/bootstrap/grid.less +340 -0
  106. data/vendor/toolkit/twitter/bootstrap/input-groups.less +127 -0
  107. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +29 -0
  108. data/vendor/toolkit/twitter/bootstrap/labels.less +54 -0
  109. data/vendor/toolkit/twitter/bootstrap/list-group.less +88 -0
  110. data/vendor/toolkit/twitter/bootstrap/media.less +56 -0
  111. data/vendor/toolkit/twitter/bootstrap/mixins.less +693 -0
  112. data/vendor/toolkit/twitter/bootstrap/modals.less +133 -0
  113. data/vendor/toolkit/twitter/bootstrap/navbar.less +559 -0
  114. data/vendor/toolkit/twitter/bootstrap/navs.less +228 -0
  115. data/vendor/toolkit/twitter/bootstrap/normalize.less +396 -0
  116. data/vendor/toolkit/twitter/bootstrap/pager.less +55 -0
  117. data/vendor/toolkit/twitter/bootstrap/pagination.less +72 -0
  118. data/vendor/toolkit/twitter/bootstrap/panels.less +128 -0
  119. data/vendor/toolkit/twitter/bootstrap/popovers.less +133 -0
  120. data/vendor/toolkit/twitter/bootstrap/print.less +100 -0
  121. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +99 -0
  122. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +149 -0
  123. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +111 -0
  124. data/vendor/toolkit/twitter/bootstrap/tables.less +211 -0
  125. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +42 -0
  126. data/vendor/toolkit/twitter/bootstrap/tooltip.less +95 -0
  127. data/vendor/toolkit/twitter/bootstrap/type.less +238 -0
  128. data/vendor/toolkit/twitter/bootstrap/utilities.less +42 -0
  129. data/vendor/toolkit/twitter/bootstrap/variables.less +607 -0
  130. data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
  131. data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
  132. metadata +297 -0
@@ -0,0 +1,99 @@
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
+ // Danger (red)
82
+ .progress-bar-danger {
83
+ .progress-bar-variant(@progress-bar-danger-bg);
84
+ }
85
+
86
+ // Success (green)
87
+ .progress-bar-success {
88
+ .progress-bar-variant(@progress-bar-success-bg);
89
+ }
90
+
91
+ // Warning (orange)
92
+ .progress-bar-warning {
93
+ .progress-bar-variant(@progress-bar-warning-bg);
94
+ }
95
+
96
+ // Info (teal)
97
+ .progress-bar-info {
98
+ .progress-bar-variant(@progress-bar-info-bg);
99
+ }
@@ -0,0 +1,149 @@
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-visibility();
40
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
41
+ .responsive-invisibility();
42
+ }
43
+ @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
44
+ .responsive-invisibility();
45
+ }
46
+ @media (min-width: @screen-large-desktop) {
47
+ .responsive-invisibility();
48
+ }
49
+ }
50
+ .visible-sm {
51
+ .responsive-invisibility();
52
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
53
+ .responsive-visibility();
54
+ }
55
+ @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
56
+ .responsive-invisibility();
57
+ }
58
+ @media (min-width: @screen-large-desktop) {
59
+ .responsive-invisibility();
60
+ }
61
+ }
62
+ .visible-md {
63
+ .responsive-invisibility();
64
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
65
+ .responsive-invisibility();
66
+ }
67
+ @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
68
+ .responsive-visibility();
69
+ }
70
+ @media (min-width: @screen-large-desktop) {
71
+ .responsive-invisibility();
72
+ }
73
+ }
74
+ .visible-lg {
75
+ .responsive-invisibility();
76
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
77
+ .responsive-invisibility();
78
+ }
79
+ @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
80
+ .responsive-invisibility();
81
+ }
82
+ @media (min-width: @screen-large-desktop) {
83
+ .responsive-visibility();
84
+ }
85
+ }
86
+
87
+ .hidden-xs {
88
+ .responsive-invisibility();
89
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
90
+ .responsive-visibility();
91
+ }
92
+ @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
93
+ .responsive-visibility();
94
+ }
95
+ @media (min-width: @screen-large-desktop) {
96
+ .responsive-visibility();
97
+ }
98
+ }
99
+ .hidden-sm {
100
+ .responsive-visibility();
101
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
102
+ .responsive-invisibility();
103
+ }
104
+ @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
105
+ .responsive-visibility();
106
+ }
107
+ @media (min-width: @screen-large-desktop) {
108
+ .responsive-visibility();
109
+ }
110
+ }
111
+ .hidden-md {
112
+ .responsive-visibility();
113
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
114
+ .responsive-visibility();
115
+ }
116
+ @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
117
+ .responsive-invisibility();
118
+ }
119
+ @media (min-width: @screen-large-desktop) {
120
+ .responsive-visibility();
121
+ }
122
+ }
123
+ .hidden-lg {
124
+ .responsive-visibility();
125
+ @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
126
+ .responsive-visibility();
127
+ }
128
+ @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
129
+ .responsive-visibility();
130
+ }
131
+ @media (min-width: @screen-large-desktop) {
132
+ .responsive-invisibility();
133
+ }
134
+ }
135
+
136
+ // Print utilities
137
+ .visible-print {
138
+ .responsive-invisibility();
139
+ }
140
+ .hidden-print { }
141
+
142
+ @media print {
143
+ .visible-print {
144
+ .responsive-visibility();
145
+ }
146
+ .hidden-print {
147
+ .responsive-invisibility();
148
+ }
149
+ }
@@ -0,0 +1,111 @@
1
+ //
2
+ // Scaffolding
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Reset the box-sizing
7
+ // -------------------------
8
+
9
+ *,
10
+ *:before,
11
+ *:after {
12
+ .box-sizing(border-box);
13
+ }
14
+
15
+
16
+ // Body reset
17
+ // -------------------------
18
+
19
+ html {
20
+ font-size: 62.5%;
21
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
22
+ }
23
+
24
+ body {
25
+ font-family: @font-family-base;
26
+ font-size: @font-size-base;
27
+ line-height: @line-height-base;
28
+ color: @text-color;
29
+ background-color: @body-bg;
30
+ }
31
+
32
+ // Reset fonts for relevant elements
33
+ input,
34
+ button,
35
+ select,
36
+ textarea {
37
+ font-family: inherit;
38
+ font-size: inherit;
39
+ line-height: inherit;
40
+ }
41
+
42
+
43
+ // Links
44
+ // -------------------------
45
+
46
+ a {
47
+ color: @link-color;
48
+ text-decoration: none;
49
+ }
50
+ a:hover,
51
+ a:focus {
52
+ color: @link-hover-color;
53
+ text-decoration: underline;
54
+ }
55
+ a:focus {
56
+ .tab-focus();
57
+ }
58
+
59
+
60
+ // Images
61
+ // -------------------------
62
+
63
+ img {
64
+ vertical-align: middle;
65
+ }
66
+
67
+ // Responsive images (ensure images don't scale beyond their parents)
68
+ .img-responsive {
69
+ display: inline-block;
70
+ max-width: 100%; // Part 1: Set a maximum relative to the parent
71
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
72
+ }
73
+
74
+ // Rounded corners
75
+ .img-rounded {
76
+ border-radius: @border-radius-large;
77
+ }
78
+
79
+ // Image thumbnails
80
+ // See thumbnails.less for `.img-thumbnail`
81
+
82
+ // Perfect circle
83
+ .img-circle {
84
+ border-radius: 50%; // set radius in percents
85
+ }
86
+
87
+
88
+ // Horizontal rules
89
+ // -------------------------
90
+
91
+ hr {
92
+ margin-top: @line-height-computed;
93
+ margin-bottom: @line-height-computed;
94
+ border: 0;
95
+ border-top: 1px solid @hr-border;
96
+ }
97
+
98
+ // Only display content to screen readers
99
+ // See: http://a11yproject.com/posts/how-to-hide-content/
100
+ // -------------------------
101
+
102
+ .sr-only {
103
+ position: absolute;
104
+ width: 1px;
105
+ height: 1px;
106
+ margin: -1px;
107
+ padding: 0;
108
+ overflow: hidden;
109
+ clip: rect(0 0 0 0);
110
+ border: 0;
111
+ }
@@ -0,0 +1,211 @@
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
+
18
+ .table {
19
+ width: 100%;
20
+ margin-bottom: @line-height-computed;
21
+ // Cells
22
+ thead,
23
+ tbody,
24
+ tfoot {
25
+ > tr {
26
+ > th,
27
+ > td {
28
+ padding: @table-cell-padding;
29
+ line-height: @line-height-base;
30
+ vertical-align: top;
31
+ border-top: 1px solid @table-border-color;
32
+ }
33
+ }
34
+ }
35
+ // Bottom align for column headings
36
+ thead > tr > th {
37
+ vertical-align: bottom;
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
+
62
+ // Condensed table w/ half padding
63
+ // -------------------------------
64
+
65
+ .table-condensed {
66
+ thead,
67
+ tbody,
68
+ tfoot {
69
+ > tr {
70
+ > th,
71
+ > td {
72
+ padding: @table-condensed-cell-padding;
73
+ }
74
+ }
75
+ }
76
+ }
77
+
78
+
79
+
80
+ // Bordered version
81
+ // ----------------
82
+
83
+ .table-bordered {
84
+ border: 1px solid @table-border-color;
85
+ > thead,
86
+ > tbody,
87
+ > tfoot {
88
+ > tr {
89
+ > th,
90
+ > td {
91
+ border: 1px solid @table-border-color;
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+
98
+
99
+ // Zebra-striping
100
+ // --------------
101
+
102
+ // Default zebra-stripe styles (alternating gray and transparent backgrounds)
103
+ .table-striped {
104
+ > tbody {
105
+ > tr:nth-child(odd) {
106
+ > td,
107
+ > th {
108
+ background-color: @table-bg-accent;
109
+ }
110
+ }
111
+ }
112
+ }
113
+
114
+
115
+
116
+ // Hover effect
117
+ // ------------
118
+
119
+ // Placed here since it has to come after the potential zebra striping
120
+ .table-hover {
121
+ > tbody {
122
+ > tr:hover {
123
+ > td,
124
+ > th {
125
+ background-color: @table-bg-hover;
126
+ }
127
+ }
128
+ }
129
+ }
130
+
131
+
132
+
133
+ // Table cell sizing
134
+ // -----------------
135
+
136
+ // Reset default table behavior
137
+ table col[class^="col-"] {
138
+ float: none;
139
+ display: table-column;
140
+ }
141
+ table {
142
+ td,
143
+ th {
144
+ &[class^="col-"] {
145
+ float: none;
146
+ display: table-cell;
147
+ }
148
+ }
149
+ }
150
+
151
+
152
+
153
+ // Table backgrounds
154
+ // -----------------
155
+ // Exact selectors below required to override `.table-striped` and prevent
156
+ // inheritance to nested tables.
157
+
158
+ .table > thead > tr,
159
+ .table > tbody > tr,
160
+ .table > tfoot > tr {
161
+ > td.active,
162
+ > th.active,
163
+ &.active > td,
164
+ &.active > th {
165
+ background-color: @table-bg-active;
166
+ }
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
+ }
189
+
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%);
210
+ }
211
+ }