flipper-ui 0.12.2 → 0.13.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/docs/ui/README.md +21 -3
  3. data/docs/ui/images/configured-ui.png +0 -0
  4. data/docs/ui/images/environment-banner.png +0 -0
  5. data/docs/ui/images/feature.png +0 -0
  6. data/docs/ui/images/features.png +0 -0
  7. data/lib/flipper/ui/assets/javascripts/application.coffee +3 -0
  8. data/lib/flipper/ui/assets/stylesheets/.DS_Store +0 -0
  9. data/lib/flipper/ui/assets/stylesheets/application.scss +9 -48
  10. data/lib/flipper/ui/assets/stylesheets/bootstrap/_alert.scss +51 -0
  11. data/lib/flipper/ui/assets/stylesheets/bootstrap/_badge.scss +47 -0
  12. data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumb.scss +38 -0
  13. data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-group.scss +166 -0
  14. data/lib/flipper/ui/assets/stylesheets/bootstrap/_buttons.scss +78 -95
  15. data/lib/flipper/ui/assets/stylesheets/bootstrap/_card.scss +270 -0
  16. data/lib/flipper/ui/assets/stylesheets/bootstrap/_carousel.scss +122 -200
  17. data/lib/flipper/ui/assets/stylesheets/bootstrap/_close.scss +12 -14
  18. data/lib/flipper/ui/assets/stylesheets/bootstrap/_code.scss +15 -28
  19. data/lib/flipper/ui/assets/stylesheets/bootstrap/_custom-forms.scss +297 -0
  20. data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdown.scss +131 -0
  21. data/lib/flipper/ui/assets/stylesheets/bootstrap/_forms.scss +210 -455
  22. data/lib/flipper/ui/assets/stylesheets/bootstrap/_functions.scss +86 -0
  23. data/lib/flipper/ui/assets/stylesheets/bootstrap/_grid.scss +29 -61
  24. data/lib/flipper/ui/assets/stylesheets/bootstrap/_images.scss +42 -0
  25. data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-group.scss +159 -0
  26. data/lib/flipper/ui/assets/stylesheets/bootstrap/_jumbotron.scss +8 -42
  27. data/lib/flipper/ui/assets/stylesheets/bootstrap/_list-group.scss +64 -73
  28. data/lib/flipper/ui/assets/stylesheets/bootstrap/_media.scss +3 -56
  29. data/lib/flipper/ui/assets/stylesheets/bootstrap/_mixins.scss +21 -18
  30. data/lib/flipper/ui/assets/stylesheets/bootstrap/_modal.scss +168 -0
  31. data/lib/flipper/ui/assets/stylesheets/bootstrap/_nav.scss +118 -0
  32. data/lib/flipper/ui/assets/stylesheets/bootstrap/_navbar.scss +203 -554
  33. data/lib/flipper/ui/assets/stylesheets/bootstrap/_pagination.scss +58 -69
  34. data/lib/flipper/ui/assets/stylesheets/bootstrap/_popover.scss +183 -0
  35. data/lib/flipper/ui/assets/stylesheets/bootstrap/_print.scss +71 -54
  36. data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress.scss +33 -0
  37. data/lib/flipper/ui/assets/stylesheets/bootstrap/_reboot.scss +482 -0
  38. data/lib/flipper/ui/assets/stylesheets/bootstrap/_root.scss +19 -0
  39. data/lib/flipper/ui/assets/stylesheets/bootstrap/_tables.scss +109 -163
  40. data/lib/flipper/ui/assets/stylesheets/bootstrap/_tooltip.scss +97 -84
  41. data/lib/flipper/ui/assets/stylesheets/bootstrap/_transitions.scss +36 -0
  42. data/lib/flipper/ui/assets/stylesheets/bootstrap/_type.scss +66 -239
  43. data/lib/flipper/ui/assets/stylesheets/bootstrap/_utilities.scss +14 -55
  44. data/lib/flipper/ui/assets/stylesheets/bootstrap/_variables.scss +726 -698
  45. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-grid.scss +32 -0
  46. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-reboot.scss +12 -0
  47. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap.scss +42 -0
  48. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alert.scss +13 -0
  49. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_background-variant.scss +14 -4
  50. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_badge.scss +12 -0
  51. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_border-radius.scss +25 -8
  52. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
  53. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +123 -0
  54. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_buttons.scss +89 -32
  55. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_caret.scss +65 -0
  56. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_clearfix.scss +3 -18
  57. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_float.scss +11 -0
  58. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_forms.scss +115 -66
  59. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_gradients.scss +14 -27
  60. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +52 -66
  61. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid.scss +37 -107
  62. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hover.scss +39 -0
  63. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_image.scss +18 -15
  64. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_list-group.scss +10 -20
  65. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
  66. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -3
  67. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +10 -0
  68. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_pagination.scss +10 -11
  69. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-text.scss +17 -0
  70. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  71. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +35 -0
  72. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_size.scss +1 -5
  73. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_table-row.scss +16 -14
  74. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
  75. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-hide.scss +9 -0
  76. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/{_text-overflow.scss → _text-truncate.scss} +2 -2
  77. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_transition.scss +9 -0
  78. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_visibility.scss +7 -0
  79. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_align.scss +8 -0
  80. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_background.scss +19 -0
  81. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_borders.scss +59 -0
  82. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
  83. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_display.scss +38 -0
  84. data/lib/flipper/ui/assets/stylesheets/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +26 -9
  85. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_flex.scss +46 -0
  86. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_float.scss +9 -0
  87. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_position.scss +36 -0
  88. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
  89. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_sizing.scss +12 -0
  90. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_spacing.scss +51 -0
  91. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_text.scss +52 -0
  92. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_visibility.scss +11 -0
  93. data/lib/flipper/ui/configuration.rb +24 -0
  94. data/lib/flipper/ui/decorators/feature.rb +3 -3
  95. data/lib/flipper/ui/public/css/application.css +6237 -2339
  96. data/lib/flipper/ui/public/js/application.js +3 -2
  97. data/lib/flipper/ui/views/add_actor.erb +7 -9
  98. data/lib/flipper/ui/views/add_feature.erb +8 -10
  99. data/lib/flipper/ui/views/add_group.erb +7 -9
  100. data/lib/flipper/ui/views/feature.erb +181 -141
  101. data/lib/flipper/ui/views/feature_creation_disabled.erb +1 -1
  102. data/lib/flipper/ui/views/feature_removal_disabled.erb +1 -1
  103. data/lib/flipper/ui/views/features.erb +12 -15
  104. data/lib/flipper/ui/views/layout.erb +25 -15
  105. data/lib/flipper/version.rb +1 -1
  106. data/spec/flipper/ui/actions/actors_gate_spec.rb +2 -1
  107. data/spec/flipper/ui/actions/add_feature_spec.rb +2 -1
  108. data/spec/flipper/ui/actions/groups_gate_spec.rb +2 -1
  109. data/spec/flipper/ui/configuration_spec.rb +27 -0
  110. data/spec/flipper/ui_spec.rb +24 -0
  111. metadata +58 -64
  112. data/lib/flipper/ui/assets/stylesheets/_bootstrap-compass.scss +0 -9
  113. data/lib/flipper/ui/assets/stylesheets/_bootstrap-mincer.scss +0 -19
  114. data/lib/flipper/ui/assets/stylesheets/_bootstrap-sprockets.scss +0 -9
  115. data/lib/flipper/ui/assets/stylesheets/_bootstrap.scss +0 -50
  116. data/lib/flipper/ui/assets/stylesheets/bootstrap/_alerts.scss +0 -73
  117. data/lib/flipper/ui/assets/stylesheets/bootstrap/_badges.scss +0 -68
  118. data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumbs.scss +0 -26
  119. data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-groups.scss +0 -243
  120. data/lib/flipper/ui/assets/stylesheets/bootstrap/_component-animations.scss +0 -37
  121. data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdowns.scss +0 -214
  122. data/lib/flipper/ui/assets/stylesheets/bootstrap/_glyphicons.scss +0 -305
  123. data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-groups.scss +0 -166
  124. data/lib/flipper/ui/assets/stylesheets/bootstrap/_labels.scss +0 -66
  125. data/lib/flipper/ui/assets/stylesheets/bootstrap/_modals.scss +0 -150
  126. data/lib/flipper/ui/assets/stylesheets/bootstrap/_navs.scss +0 -242
  127. data/lib/flipper/ui/assets/stylesheets/bootstrap/_normalize.scss +0 -427
  128. data/lib/flipper/ui/assets/stylesheets/bootstrap/_pager.scss +0 -54
  129. data/lib/flipper/ui/assets/stylesheets/bootstrap/_panels.scss +0 -265
  130. data/lib/flipper/ui/assets/stylesheets/bootstrap/_popovers.scss +0 -135
  131. data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress-bars.scss +0 -87
  132. data/lib/flipper/ui/assets/stylesheets/bootstrap/_responsive-utilities.scss +0 -177
  133. data/lib/flipper/ui/assets/stylesheets/bootstrap/_scaffolding.scss +0 -162
  134. data/lib/flipper/ui/assets/stylesheets/bootstrap/_theme.scss +0 -273
  135. data/lib/flipper/ui/assets/stylesheets/bootstrap/_thumbnails.scss +0 -38
  136. data/lib/flipper/ui/assets/stylesheets/bootstrap/_wells.scss +0 -29
  137. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alerts.scss +0 -14
  138. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  139. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
  140. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_labels.scss +0 -12
  141. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
  142. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_opacity.scss +0 -8
  143. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_panels.scss +0 -24
  144. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +0 -10
  145. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
  146. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -21
  147. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
  148. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
  149. data/lib/flipper/ui/public/css/primer.css +0 -1
  150. data/lib/flipper/ui/public/css/primer/primer.css +0 -1933
  151. data/lib/flipper/ui/public/css/scss/primer.css +0 -1933
  152. data/lib/flipper/ui/public/js/bootstrap-sprockets.js +0 -12
  153. data/lib/flipper/ui/public/js/bootstrap.js +0 -2317
  154. data/lib/flipper/ui/public/js/bootstrap.min.js +0 -7
  155. data/lib/flipper/ui/public/js/bootstrap/affix.js +0 -162
  156. data/lib/flipper/ui/public/js/bootstrap/alert.js +0 -94
  157. data/lib/flipper/ui/public/js/bootstrap/button.js +0 -116
  158. data/lib/flipper/ui/public/js/bootstrap/carousel.js +0 -237
  159. data/lib/flipper/ui/public/js/bootstrap/collapse.js +0 -211
  160. data/lib/flipper/ui/public/js/bootstrap/dropdown.js +0 -161
  161. data/lib/flipper/ui/public/js/bootstrap/modal.js +0 -339
  162. data/lib/flipper/ui/public/js/bootstrap/popover.js +0 -108
  163. data/lib/flipper/ui/public/js/bootstrap/scrollspy.js +0 -172
  164. data/lib/flipper/ui/public/js/bootstrap/tab.js +0 -153
  165. data/lib/flipper/ui/public/js/bootstrap/tooltip.js +0 -476
  166. data/lib/flipper/ui/public/js/bootstrap/transition.js +0 -59
@@ -0,0 +1,19 @@
1
+ :root {
2
+ // Custom variable values only support SassScript inside `#{}`.
3
+ @each $color, $value in $colors {
4
+ --#{$color}: #{$value};
5
+ }
6
+
7
+ @each $color, $value in $theme-colors {
8
+ --#{$color}: #{$value};
9
+ }
10
+
11
+ @each $bp, $value in $grid-breakpoints {
12
+ --breakpoint-#{$bp}: #{$value};
13
+ }
14
+
15
+ // Use `inspect` for lists so that quoted items keep the quotes.
16
+ // See https://github.com/sass/sass/issues/2383#issuecomment-336349172
17
+ --font-family-sans-serif: #{inspect($font-family-sans-serif)};
18
+ --font-family-monospace: #{inspect($font-family-monospace)};
19
+ }
@@ -1,82 +1,43 @@
1
1
  //
2
- // Tables
3
- // --------------------------------------------------
4
-
5
-
6
- table {
7
- background-color: $table-bg;
8
- }
9
- caption {
10
- padding-top: $table-cell-padding;
11
- padding-bottom: $table-cell-padding;
12
- color: $text-muted;
13
- text-align: left;
14
- }
15
- th {
16
- text-align: left;
17
- }
18
-
19
-
20
- // Baseline styles
2
+ // Basic Bootstrap table
3
+ //
21
4
 
22
5
  .table {
23
6
  width: 100%;
24
7
  max-width: 100%;
25
- margin-bottom: $line-height-computed;
26
- // Cells
27
- > thead,
28
- > tbody,
29
- > tfoot {
30
- > tr {
31
- > th,
32
- > td {
33
- padding: $table-cell-padding;
34
- line-height: $line-height-base;
35
- vertical-align: top;
36
- border-top: 1px solid $table-border-color;
37
- }
38
- }
8
+ margin-bottom: $spacer;
9
+ background-color: $table-bg; // Reset for nesting within parents with `background-color`.
10
+
11
+ th,
12
+ td {
13
+ padding: $table-cell-padding;
14
+ vertical-align: top;
15
+ border-top: $table-border-width solid $table-border-color;
39
16
  }
40
- // Bottom align for column headings
41
- > thead > tr > th {
17
+
18
+ thead th {
42
19
  vertical-align: bottom;
43
- border-bottom: 2px solid $table-border-color;
44
- }
45
- // Remove top border from thead by default
46
- > caption + thead,
47
- > colgroup + thead,
48
- > thead:first-child {
49
- > tr:first-child {
50
- > th,
51
- > td {
52
- border-top: 0;
53
- }
54
- }
20
+ border-bottom: (2 * $table-border-width) solid $table-border-color;
55
21
  }
56
- // Account for multiple tbody instances
57
- > tbody + tbody {
58
- border-top: 2px solid $table-border-color;
22
+
23
+ tbody + tbody {
24
+ border-top: (2 * $table-border-width) solid $table-border-color;
59
25
  }
60
26
 
61
- // Nesting
62
27
  .table {
63
28
  background-color: $body-bg;
64
29
  }
65
30
  }
66
31
 
67
32
 
33
+ //
68
34
  // Condensed table w/ half padding
35
+ //
69
36
 
70
- .table-condensed {
71
- > thead,
72
- > tbody,
73
- > tfoot {
74
- > tr {
75
- > th,
76
- > td {
77
- padding: $table-condensed-cell-padding;
78
- }
79
- }
37
+ .table-sm {
38
+ th,
39
+ td {
40
+ padding: $table-cell-padding-sm;
80
41
  }
81
42
  }
82
43
 
@@ -86,21 +47,17 @@ th {
86
47
  // Add borders all around the table and between all the columns.
87
48
 
88
49
  .table-bordered {
89
- border: 1px solid $table-border-color;
90
- > thead,
91
- > tbody,
92
- > tfoot {
93
- > tr {
94
- > th,
95
- > td {
96
- border: 1px solid $table-border-color;
97
- }
98
- }
50
+ border: $table-border-width solid $table-border-color;
51
+
52
+ th,
53
+ td {
54
+ border: $table-border-width solid $table-border-color;
99
55
  }
100
- > thead > tr {
101
- > th,
102
- > td {
103
- border-bottom-width: 2px;
56
+
57
+ thead {
58
+ th,
59
+ td {
60
+ border-bottom-width: (2 * $table-border-width);
104
61
  }
105
62
  }
106
63
  }
@@ -111,8 +68,8 @@ th {
111
68
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
112
69
 
113
70
  .table-striped {
114
- > tbody > tr:nth-of-type(odd) {
115
- background-color: $table-bg-accent;
71
+ tbody tr:nth-of-type(odd) {
72
+ background-color: $table-accent-bg;
116
73
  }
117
74
  }
118
75
 
@@ -122,113 +79,102 @@ th {
122
79
  // Placed here since it has to come after the potential zebra striping
123
80
 
124
81
  .table-hover {
125
- > tbody > tr:hover {
126
- background-color: $table-bg-hover;
82
+ tbody tr {
83
+ @include hover {
84
+ background-color: $table-hover-bg;
85
+ }
127
86
  }
128
87
  }
129
88
 
130
89
 
131
- // Table cell sizing
90
+ // Table backgrounds
132
91
  //
133
- // Reset default table behavior
92
+ // Exact selectors below required to override `.table-striped` and prevent
93
+ // inheritance to nested tables.
134
94
 
135
- table col[class*="col-"] {
136
- position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
137
- float: none;
138
- display: table-column;
95
+ @each $color, $value in $theme-colors {
96
+ @include table-row-variant($color, theme-color-level($color, -9));
139
97
  }
140
- table {
141
- td,
142
- th {
143
- &[class*="col-"] {
144
- position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
145
- float: none;
146
- display: table-cell;
98
+
99
+ @include table-row-variant(active, $table-active-bg);
100
+
101
+
102
+ // Dark styles
103
+ //
104
+ // Same table markup, but inverted color scheme: dark background and light text.
105
+
106
+ // stylelint-disable-next-line no-duplicate-selectors
107
+ .table {
108
+ .thead-dark {
109
+ th {
110
+ color: $table-dark-color;
111
+ background-color: $table-dark-bg;
112
+ border-color: $table-dark-border-color;
113
+ }
114
+ }
115
+
116
+ .thead-light {
117
+ th {
118
+ color: $table-head-color;
119
+ background-color: $table-head-bg;
120
+ border-color: $table-border-color;
147
121
  }
148
122
  }
149
123
  }
150
124
 
125
+ .table-dark {
126
+ color: $table-dark-color;
127
+ background-color: $table-dark-bg;
151
128
 
152
- // Table backgrounds
153
- //
154
- // Exact selectors below required to override `.table-striped` and prevent
155
- // inheritance to nested tables.
156
-
157
- // Generate the contextual variants
158
- @include table-row-variant('active', $table-bg-active);
159
- @include table-row-variant('success', $state-success-bg);
160
- @include table-row-variant('info', $state-info-bg);
161
- @include table-row-variant('warning', $state-warning-bg);
162
- @include table-row-variant('danger', $state-danger-bg);
129
+ th,
130
+ td,
131
+ thead th {
132
+ border-color: $table-dark-border-color;
133
+ }
163
134
 
135
+ &.table-bordered {
136
+ border: 0;
137
+ }
164
138
 
165
- // Responsive tables
166
- //
167
- // Wrap your tables in `.table-responsive` and we'll make them mobile friendly
168
- // by enabling horizontal scrolling. Only applies <768px. Everything above that
169
- // will display normally.
139
+ &.table-striped {
140
+ tbody tr:nth-of-type(odd) {
141
+ background-color: $table-dark-accent-bg;
142
+ }
143
+ }
170
144
 
171
- .table-responsive {
172
- overflow-x: auto;
173
- min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)
174
-
175
- @media screen and (max-width: $screen-xs-max) {
176
- width: 100%;
177
- margin-bottom: ($line-height-computed * 0.75);
178
- overflow-y: hidden;
179
- -ms-overflow-style: -ms-autohiding-scrollbar;
180
- border: 1px solid $table-border-color;
181
-
182
- // Tighten up spacing
183
- > .table {
184
- margin-bottom: 0;
185
-
186
- // Ensure the content doesn't wrap
187
- > thead,
188
- > tbody,
189
- > tfoot {
190
- > tr {
191
- > th,
192
- > td {
193
- white-space: nowrap;
194
- }
195
- }
145
+ &.table-hover {
146
+ tbody tr {
147
+ @include hover {
148
+ background-color: $table-dark-hover-bg;
196
149
  }
197
150
  }
151
+ }
152
+ }
198
153
 
199
- // Special overrides for the bordered tables
200
- > .table-bordered {
201
- border: 0;
202
-
203
- // Nuke the appropriate borders so that the parent can handle them
204
- > thead,
205
- > tbody,
206
- > tfoot {
207
- > tr {
208
- > th:first-child,
209
- > td:first-child {
210
- border-left: 0;
211
- }
212
- > th:last-child,
213
- > td:last-child {
214
- border-right: 0;
215
- }
216
- }
217
- }
218
154
 
219
- // Only nuke the last row's bottom-border in `tbody` and `tfoot` since
220
- // chances are there will be only one `tr` in a `thead` and that would
221
- // remove the border altogether.
222
- > tbody,
223
- > tfoot {
224
- > tr:last-child {
225
- > th,
226
- > td {
227
- border-bottom: 0;
228
- }
155
+ // Responsive tables
156
+ //
157
+ // Generate series of `.table-responsive-*` classes for configuring the screen
158
+ // size of where your table will overflow.
159
+
160
+ .table-responsive {
161
+ @each $breakpoint in map-keys($grid-breakpoints) {
162
+ $next: breakpoint-next($breakpoint, $grid-breakpoints);
163
+ $infix: breakpoint-infix($next, $grid-breakpoints);
164
+
165
+ &#{$infix} {
166
+ @include media-breakpoint-down($breakpoint) {
167
+ display: block;
168
+ width: 100%;
169
+ overflow-x: auto;
170
+ -webkit-overflow-scrolling: touch;
171
+ -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
172
+
173
+ // Prevent double border on horizontal scroll due to use of `display: block;`
174
+ > .table-bordered {
175
+ border: 0;
229
176
  }
230
177
  }
231
-
232
178
  }
233
179
  }
234
180
  }
@@ -1,102 +1,115 @@
1
- //
2
- // Tooltips
3
- // --------------------------------------------------
4
-
5
-
6
1
  // Base class
7
2
  .tooltip {
8
3
  position: absolute;
9
4
  z-index: $zindex-tooltip;
10
5
  display: block;
11
- // Reset font and text properties given new insertion method
12
- font-family: $font-family-base;
13
- font-size: $font-size-small;
14
- font-weight: normal;
15
- line-height: 1.4;
16
- @include opacity(0);
17
-
18
- &.in { @include opacity($tooltip-opacity); }
19
- &.top { margin-top: -3px; padding: $tooltip-arrow-width 0; }
20
- &.right { margin-left: 3px; padding: 0 $tooltip-arrow-width; }
21
- &.bottom { margin-top: 3px; padding: $tooltip-arrow-width 0; }
22
- &.left { margin-left: -3px; padding: 0 $tooltip-arrow-width; }
23
- }
6
+ margin: $tooltip-margin;
7
+ // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
8
+ // So reset our font and text properties to avoid inheriting weird values.
9
+ @include reset-text();
10
+ font-size: $tooltip-font-size;
11
+ // Allow breaking very long words so they don't overflow the tooltip's bounds
12
+ word-wrap: break-word;
13
+ opacity: 0;
24
14
 
25
- // Wrapper for the tooltip content
26
- .tooltip-inner {
27
- max-width: $tooltip-max-width;
28
- padding: 3px 8px;
29
- color: $tooltip-color;
30
- text-align: center;
31
- text-decoration: none;
32
- background-color: $tooltip-bg;
33
- border-radius: $border-radius-base;
34
- }
15
+ &.show { opacity: $tooltip-opacity; }
35
16
 
36
- // Arrows
37
- .tooltip-arrow {
38
- position: absolute;
39
- width: 0;
40
- height: 0;
41
- border-color: transparent;
42
- border-style: solid;
43
- }
44
- // Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
45
- .tooltip {
46
- &.top .tooltip-arrow {
47
- bottom: 0;
48
- left: 50%;
49
- margin-left: -$tooltip-arrow-width;
50
- border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
51
- border-top-color: $tooltip-arrow-color;
52
- }
53
- &.top-left .tooltip-arrow {
54
- bottom: 0;
55
- right: $tooltip-arrow-width;
56
- margin-bottom: -$tooltip-arrow-width;
57
- border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
58
- border-top-color: $tooltip-arrow-color;
17
+ .arrow {
18
+ position: absolute;
19
+ display: block;
20
+ width: $tooltip-arrow-width;
21
+ height: $tooltip-arrow-height;
22
+
23
+ &::before {
24
+ position: absolute;
25
+ content: "";
26
+ border-color: transparent;
27
+ border-style: solid;
28
+ }
59
29
  }
60
- &.top-right .tooltip-arrow {
30
+ }
31
+
32
+ .bs-tooltip-top {
33
+ padding: $tooltip-arrow-height 0;
34
+
35
+ .arrow {
61
36
  bottom: 0;
62
- left: $tooltip-arrow-width;
63
- margin-bottom: -$tooltip-arrow-width;
64
- border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
65
- border-top-color: $tooltip-arrow-color;
37
+
38
+ &::before {
39
+ top: 0;
40
+ border-width: $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
41
+ border-top-color: $tooltip-arrow-color;
42
+ }
66
43
  }
67
- &.right .tooltip-arrow {
68
- top: 50%;
44
+ }
45
+
46
+ .bs-tooltip-right {
47
+ padding: 0 $tooltip-arrow-height;
48
+
49
+ .arrow {
69
50
  left: 0;
70
- margin-top: -$tooltip-arrow-width;
71
- border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0;
72
- border-right-color: $tooltip-arrow-color;
51
+ width: $tooltip-arrow-height;
52
+ height: $tooltip-arrow-width;
53
+
54
+ &::before {
55
+ right: 0;
56
+ border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
57
+ border-right-color: $tooltip-arrow-color;
58
+ }
73
59
  }
74
- &.left .tooltip-arrow {
75
- top: 50%;
60
+ }
61
+
62
+ .bs-tooltip-bottom {
63
+ padding: $tooltip-arrow-height 0;
64
+
65
+ .arrow {
66
+ top: 0;
67
+
68
+ &::before {
69
+ bottom: 0;
70
+ border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
71
+ border-bottom-color: $tooltip-arrow-color;
72
+ }
73
+ }
74
+ }
75
+
76
+ .bs-tooltip-left {
77
+ padding: 0 $tooltip-arrow-height;
78
+
79
+ .arrow {
76
80
  right: 0;
77
- margin-top: -$tooltip-arrow-width;
78
- border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width;
79
- border-left-color: $tooltip-arrow-color;
81
+ width: $tooltip-arrow-height;
82
+ height: $tooltip-arrow-width;
83
+
84
+ &::before {
85
+ left: 0;
86
+ border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
87
+ border-left-color: $tooltip-arrow-color;
88
+ }
80
89
  }
81
- &.bottom .tooltip-arrow {
82
- top: 0;
83
- left: 50%;
84
- margin-left: -$tooltip-arrow-width;
85
- border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
86
- border-bottom-color: $tooltip-arrow-color;
90
+ }
91
+
92
+ .bs-tooltip-auto {
93
+ &[x-placement^="top"] {
94
+ @extend .bs-tooltip-top;
87
95
  }
88
- &.bottom-left .tooltip-arrow {
89
- top: 0;
90
- right: $tooltip-arrow-width;
91
- margin-top: -$tooltip-arrow-width;
92
- border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
93
- border-bottom-color: $tooltip-arrow-color;
96
+ &[x-placement^="right"] {
97
+ @extend .bs-tooltip-right;
94
98
  }
95
- &.bottom-right .tooltip-arrow {
96
- top: 0;
97
- left: $tooltip-arrow-width;
98
- margin-top: -$tooltip-arrow-width;
99
- border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
100
- border-bottom-color: $tooltip-arrow-color;
99
+ &[x-placement^="bottom"] {
100
+ @extend .bs-tooltip-bottom;
101
101
  }
102
+ &[x-placement^="left"] {
103
+ @extend .bs-tooltip-left;
104
+ }
105
+ }
106
+
107
+ // Wrapper for the tooltip content
108
+ .tooltip-inner {
109
+ max-width: $tooltip-max-width;
110
+ padding: $tooltip-padding-y $tooltip-padding-x;
111
+ color: $tooltip-color;
112
+ text-align: center;
113
+ background-color: $tooltip-bg;
114
+ @include border-radius($tooltip-border-radius);
102
115
  }