@gitlab/ui 122.6.1 → 122.8.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.
@@ -608,7 +608,7 @@ const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_DEFAULT = '#3a383f';
608
608
  const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_HOVER = '#4c4b51';
609
609
  const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_FOCUS = '#4c4b51';
610
610
  const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_ACTIVE = '#28272d';
611
- const GL_DROPDOWN_SEARCH_BACKGROUND_COLOR = 'rgba(05, 05, 06, 0.24)';
611
+ const GL_DROPDOWN_SEARCH_BACKGROUND_COLOR = 'rgba(05, 05, 06, 0.16)';
612
612
  const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_DEFAULT = '#28272d';
613
613
  const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_HOVER = '#3a383f';
614
614
  const GL_FILTERED_SEARCH_TOKEN_DATA_BACKGROUND_COLOR_DEFAULT = '#3a383f';
@@ -752,7 +752,7 @@
752
752
  --gl-dropdown-option-background-color-selected-default: var(--gl-color-neutral-800); /** Used for the background of a selected dropdown option in the default state. */
753
753
  --gl-dropdown-option-background-color-selected-hover: var(--gl-color-neutral-700); /** Used for the background of a selected dropdown option in the hover state. */
754
754
  --gl-dropdown-option-background-color-selected-active: var(--gl-color-neutral-900); /** Used for the background of a selected dropdown option in the active state. */
755
- --gl-dropdown-search-background-color: var(--gl-color-alpha-dark-24); /** Used for the background of a search input in a dropdown listbox. */
755
+ --gl-dropdown-search-background-color: var(--gl-color-alpha-dark-16); /** Used for the background of a search input in a dropdown listbox. */
756
756
  --gl-filtered-search-token-type-background-color-default: var(--gl-color-neutral-900); /** Used for the filtered search type token background color in the default state. */
757
757
  --gl-filtered-search-token-type-background-color-hover: var(--gl-color-neutral-800); /** Used for the filtered search type token background color in the hover state. */
758
758
  --gl-filtered-search-token-data-background-color-default: var(--gl-color-neutral-800); /** Used for the filtered search data background color in the default state. */
@@ -17039,6 +17039,7 @@
17039
17039
  "STROKE_COLOR"
17040
17040
  ]
17041
17041
  },
17042
+ "$deprecated": true,
17042
17043
  "filePath": "src/tokens/contextual/dropdown.tokens.json",
17043
17044
  "isSource": true,
17044
17045
  "original": {
@@ -17054,6 +17055,7 @@
17054
17055
  "STROKE_COLOR"
17055
17056
  ]
17056
17057
  },
17058
+ "$deprecated": true,
17057
17059
  "key": "{dropdown.border.color}"
17058
17060
  },
17059
17061
  "name": "DROPDOWN_BORDER_COLOR",
@@ -17039,6 +17039,7 @@
17039
17039
  "STROKE_COLOR"
17040
17040
  ]
17041
17041
  },
17042
+ "$deprecated": true,
17042
17043
  "filePath": "src/tokens/contextual/dropdown.tokens.json",
17043
17044
  "isSource": true,
17044
17045
  "original": {
@@ -17054,6 +17055,7 @@
17054
17055
  "STROKE_COLOR"
17055
17056
  ]
17056
17057
  },
17058
+ "$deprecated": true,
17057
17059
  "key": "{dropdown.border.color}"
17058
17060
  },
17059
17061
  "name": "DROPDOWN_BORDER_COLOR",
@@ -4267,7 +4267,8 @@
4267
4267
  "EFFECT_COLOR",
4268
4268
  "STROKE_COLOR"
4269
4269
  ]
4270
- }
4270
+ },
4271
+ "$deprecated": true
4271
4272
  }
4272
4273
  },
4273
4274
  "divider": {
@@ -4502,7 +4503,7 @@
4502
4503
  "color": {
4503
4504
  "$value": {
4504
4505
  "default": "{color.alpha.dark.2}",
4505
- "dark": "{color.alpha.dark.24}"
4506
+ "dark": "{color.alpha.dark.16}"
4506
4507
  },
4507
4508
  "$type": "color",
4508
4509
  "$description": "Used for the background of a search input in a dropdown listbox.",
@@ -636,7 +636,7 @@ export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_DEFAULT = "#3a383f";
636
636
  export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_HOVER = "#4c4b51";
637
637
  export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_FOCUS = "#4c4b51";
638
638
  export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_ACTIVE = "#28272d";
639
- export const GL_DROPDOWN_SEARCH_BACKGROUND_COLOR = "rgba(05, 05, 06, 0.24)";
639
+ export const GL_DROPDOWN_SEARCH_BACKGROUND_COLOR = "rgba(05, 05, 06, 0.16)";
640
640
  export const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_DEFAULT = "#28272d";
641
641
  export const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_HOVER = "#3a383f";
642
642
  export const GL_FILTERED_SEARCH_TOKEN_DATA_BACKGROUND_COLOR_DEFAULT = "#3a383f";
@@ -18537,6 +18537,7 @@
18537
18537
  "STROKE_COLOR"
18538
18538
  ]
18539
18539
  },
18540
+ "$deprecated": true,
18540
18541
  "filePath": "src/tokens/contextual/dropdown.tokens.json",
18541
18542
  "isSource": true,
18542
18543
  "original": {
@@ -18552,6 +18553,7 @@
18552
18553
  "STROKE_COLOR"
18553
18554
  ]
18554
18555
  },
18556
+ "$deprecated": true,
18555
18557
  "key": "{dropdown.border.color}"
18556
18558
  },
18557
18559
  "name": "DROPDOWN_BORDER_COLOR",
@@ -19231,7 +19233,7 @@
19231
19233
  "background": {
19232
19234
  "color": {
19233
19235
  "key": "{dropdown.search.background.color}",
19234
- "$value": "rgba(05, 05, 06, 0.24)",
19236
+ "$value": "rgba(05, 05, 06, 0.16)",
19235
19237
  "$type": "color",
19236
19238
  "$description": "Used for the background of a search input in a dropdown listbox.",
19237
19239
  "$extensions": {
@@ -19245,7 +19247,7 @@
19245
19247
  "original": {
19246
19248
  "$value": {
19247
19249
  "default": "{color.alpha.dark.2}",
19248
- "dark": "{color.alpha.dark.24}"
19250
+ "dark": "{color.alpha.dark.16}"
19249
19251
  },
19250
19252
  "$type": "color",
19251
19253
  "$description": "Used for the background of a search input in a dropdown listbox.",
@@ -18537,6 +18537,7 @@
18537
18537
  "STROKE_COLOR"
18538
18538
  ]
18539
18539
  },
18540
+ "$deprecated": true,
18540
18541
  "filePath": "src/tokens/contextual/dropdown.tokens.json",
18541
18542
  "isSource": true,
18542
18543
  "original": {
@@ -18552,6 +18553,7 @@
18552
18553
  "STROKE_COLOR"
18553
18554
  ]
18554
18555
  },
18556
+ "$deprecated": true,
18555
18557
  "key": "{dropdown.border.color}"
18556
18558
  },
18557
18559
  "name": "DROPDOWN_BORDER_COLOR",
@@ -19245,7 +19247,7 @@
19245
19247
  "original": {
19246
19248
  "$value": {
19247
19249
  "default": "{color.alpha.dark.2}",
19248
- "dark": "{color.alpha.dark.24}"
19250
+ "dark": "{color.alpha.dark.16}"
19249
19251
  },
19250
19252
  "$type": "color",
19251
19253
  "$description": "Used for the background of a search input in a dropdown listbox.",
@@ -750,7 +750,7 @@ $gl-dropdown-option-background-color-unselected-active: $gl-action-neutral-backg
750
750
  $gl-dropdown-option-background-color-selected-default: $gl-color-neutral-800; // Used for the background of a selected dropdown option in the default state.
751
751
  $gl-dropdown-option-background-color-selected-hover: $gl-color-neutral-700; // Used for the background of a selected dropdown option in the hover state.
752
752
  $gl-dropdown-option-background-color-selected-active: $gl-color-neutral-900; // Used for the background of a selected dropdown option in the active state.
753
- $gl-dropdown-search-background-color: $gl-color-alpha-dark-24; // Used for the background of a search input in a dropdown listbox.
753
+ $gl-dropdown-search-background-color: $gl-color-alpha-dark-16; // Used for the background of a search input in a dropdown listbox.
754
754
  $gl-filtered-search-token-type-background-color-default: $gl-color-neutral-900; // Used for the filtered search type token background color in the default state.
755
755
  $gl-filtered-search-token-type-background-color-hover: $gl-color-neutral-800; // Used for the filtered search type token background color in the hover state.
756
756
  $gl-filtered-search-token-data-background-color-default: $gl-color-neutral-800; // Used for the filtered search data background color in the default state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "122.6.1",
3
+ "version": "122.8.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -133,7 +133,7 @@
133
133
  "acorn": "^8.15.0",
134
134
  "acorn-walk": "^8.3.4",
135
135
  "autoprefixer": "10.4.21",
136
- "axe-playwright": "^2.1.0",
136
+ "axe-playwright": "^2.2.2",
137
137
  "babel-loader": "^9.2.1",
138
138
  "cypress": "14.5.4",
139
139
  "cypress-real-events": "^1.15.0",
@@ -11,10 +11,6 @@
11
11
  // these create the 45deg cutoff angle at the base of the caret
12
12
  border-bottom: 1px solid var(--gl-dropdown-background-color);
13
13
  border-right: 1px solid var(--gl-dropdown-background-color);
14
-
15
- // match the dropdown border
16
- border-top: 1px solid var(--gl-dropdown-border-color);
17
- border-left: 1px solid var(--gl-dropdown-border-color);
18
14
  position: absolute;
19
15
  }
20
16
 
@@ -31,7 +27,6 @@
31
27
  .gl-new-dropdown-panel {
32
28
  @apply gl-hidden;
33
29
  @apply gl-bg-dropdown;
34
- @apply gl-border-1 gl-border-solid gl-border-dropdown;
35
30
  @apply gl-rounded-lg;
36
31
  @apply gl-drop-shadow-md;
37
32
  top: 0;
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  table.gl-table {
2
4
  background-color: var(--gl-color-alpha-0);
3
5
  @apply gl-text-default;
@@ -96,22 +98,18 @@ table.gl-table {
96
98
  }
97
99
  }
98
100
 
99
- $stacked-table-breakpoints: (
100
- 'sm': 'xs',
101
- 'md': 'sm',
102
- 'lg': 'md',
103
- 'xl': 'lg',
104
- );
105
-
106
101
  &.b-table {
107
102
  &.b-table-stacked {
108
103
  @include gl-tmp-stacked-override();
109
104
  }
110
105
 
111
- @each $class, $mq in $stacked-table-breakpoints {
112
- &.b-table-stacked-#{$class} {
113
- @include media-breakpoint-down(#{$mq}) {
114
- @include gl-tmp-stacked-override();
106
+ @each $breakpoint in map.keys($grid-breakpoints) {
107
+ $next: breakpoint-next($breakpoint, $grid-breakpoints);
108
+ @if ($next != null) {
109
+ &.b-table-stacked-#{$next} {
110
+ @include gl-container-width-down(#{$next}) {
111
+ @include gl-tmp-stacked-override();
112
+ }
115
113
  }
116
114
  }
117
115
  }
@@ -1,5 +1,6 @@
1
- @import 'bootstrap';
1
+ @import 'mixins';
2
2
 
3
+ @import 'bootstrap';
3
4
  @import 'bootstrap_vue';
4
5
 
5
6
  // Design Tokens
@@ -8,7 +9,6 @@
8
9
  // Settings
9
10
  @import 'functions';
10
11
  @import 'variables';
11
- @import 'mixins';
12
12
  @import 'typescale/index';
13
13
 
14
14
  // Body
@@ -7,9 +7,11 @@
7
7
  @import '../vendor/bootstrap/scss/variables';
8
8
  @import '../vendor/bootstrap/scss/mixins';
9
9
 
10
+ @import 'mixins';
11
+
12
+ @import 'bootstrap';
10
13
  @import 'bootstrap_vue';
11
14
 
12
- @import 'mixins';
13
15
 
14
16
  @import 'fonts';
15
17
 
@@ -752,7 +752,7 @@
752
752
  --gl-dropdown-option-background-color-selected-default: var(--gl-color-neutral-800); /** Used for the background of a selected dropdown option in the default state. */
753
753
  --gl-dropdown-option-background-color-selected-hover: var(--gl-color-neutral-700); /** Used for the background of a selected dropdown option in the hover state. */
754
754
  --gl-dropdown-option-background-color-selected-active: var(--gl-color-neutral-900); /** Used for the background of a selected dropdown option in the active state. */
755
- --gl-dropdown-search-background-color: var(--gl-color-alpha-dark-24); /** Used for the background of a search input in a dropdown listbox. */
755
+ --gl-dropdown-search-background-color: var(--gl-color-alpha-dark-16); /** Used for the background of a search input in a dropdown listbox. */
756
756
  --gl-filtered-search-token-type-background-color-default: var(--gl-color-neutral-900); /** Used for the filtered search type token background color in the default state. */
757
757
  --gl-filtered-search-token-type-background-color-hover: var(--gl-color-neutral-800); /** Used for the filtered search type token background color in the hover state. */
758
758
  --gl-filtered-search-token-data-background-color-default: var(--gl-color-neutral-800); /** Used for the filtered search data background color in the default state. */
@@ -17039,6 +17039,7 @@
17039
17039
  "STROKE_COLOR"
17040
17040
  ]
17041
17041
  },
17042
+ "$deprecated": true,
17042
17043
  "filePath": "src/tokens/contextual/dropdown.tokens.json",
17043
17044
  "isSource": true,
17044
17045
  "original": {
@@ -17054,6 +17055,7 @@
17054
17055
  "STROKE_COLOR"
17055
17056
  ]
17056
17057
  },
17058
+ "$deprecated": true,
17057
17059
  "key": "{dropdown.border.color}"
17058
17060
  },
17059
17061
  "name": "DROPDOWN_BORDER_COLOR",
@@ -17039,6 +17039,7 @@
17039
17039
  "STROKE_COLOR"
17040
17040
  ]
17041
17041
  },
17042
+ "$deprecated": true,
17042
17043
  "filePath": "src/tokens/contextual/dropdown.tokens.json",
17043
17044
  "isSource": true,
17044
17045
  "original": {
@@ -17054,6 +17055,7 @@
17054
17055
  "STROKE_COLOR"
17055
17056
  ]
17056
17057
  },
17058
+ "$deprecated": true,
17057
17059
  "key": "{dropdown.border.color}"
17058
17060
  },
17059
17061
  "name": "DROPDOWN_BORDER_COLOR",
@@ -4267,7 +4267,8 @@
4267
4267
  "EFFECT_COLOR",
4268
4268
  "STROKE_COLOR"
4269
4269
  ]
4270
- }
4270
+ },
4271
+ "$deprecated": true
4271
4272
  }
4272
4273
  },
4273
4274
  "divider": {
@@ -4502,7 +4503,7 @@
4502
4503
  "color": {
4503
4504
  "$value": {
4504
4505
  "default": "{color.alpha.dark.2}",
4505
- "dark": "{color.alpha.dark.24}"
4506
+ "dark": "{color.alpha.dark.16}"
4506
4507
  },
4507
4508
  "$type": "color",
4508
4509
  "$description": "Used for the background of a search input in a dropdown listbox.",
@@ -608,7 +608,7 @@ export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_DEFAULT = '#3a383f';
608
608
  export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_HOVER = '#4c4b51';
609
609
  export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_FOCUS = '#4c4b51';
610
610
  export const GL_DROPDOWN_OPTION_BACKGROUND_COLOR_SELECTED_ACTIVE = '#28272d';
611
- export const GL_DROPDOWN_SEARCH_BACKGROUND_COLOR = 'rgba(05, 05, 06, 0.24)';
611
+ export const GL_DROPDOWN_SEARCH_BACKGROUND_COLOR = 'rgba(05, 05, 06, 0.16)';
612
612
  export const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_DEFAULT = '#28272d';
613
613
  export const GL_FILTERED_SEARCH_TOKEN_TYPE_BACKGROUND_COLOR_HOVER = '#3a383f';
614
614
  export const GL_FILTERED_SEARCH_TOKEN_DATA_BACKGROUND_COLOR_DEFAULT = '#3a383f';
@@ -18537,6 +18537,7 @@
18537
18537
  "STROKE_COLOR"
18538
18538
  ]
18539
18539
  },
18540
+ "$deprecated": true,
18540
18541
  "filePath": "src/tokens/contextual/dropdown.tokens.json",
18541
18542
  "isSource": true,
18542
18543
  "original": {
@@ -18552,6 +18553,7 @@
18552
18553
  "STROKE_COLOR"
18553
18554
  ]
18554
18555
  },
18556
+ "$deprecated": true,
18555
18557
  "key": "{dropdown.border.color}"
18556
18558
  },
18557
18559
  "name": "DROPDOWN_BORDER_COLOR",
@@ -19231,7 +19233,7 @@
19231
19233
  "background": {
19232
19234
  "color": {
19233
19235
  "key": "{dropdown.search.background.color}",
19234
- "$value": "rgba(05, 05, 06, 0.24)",
19236
+ "$value": "rgba(05, 05, 06, 0.16)",
19235
19237
  "$type": "color",
19236
19238
  "$description": "Used for the background of a search input in a dropdown listbox.",
19237
19239
  "$extensions": {
@@ -19245,7 +19247,7 @@
19245
19247
  "original": {
19246
19248
  "$value": {
19247
19249
  "default": "{color.alpha.dark.2}",
19248
- "dark": "{color.alpha.dark.24}"
19250
+ "dark": "{color.alpha.dark.16}"
19249
19251
  },
19250
19252
  "$type": "color",
19251
19253
  "$description": "Used for the background of a search input in a dropdown listbox.",
@@ -18537,6 +18537,7 @@
18537
18537
  "STROKE_COLOR"
18538
18538
  ]
18539
18539
  },
18540
+ "$deprecated": true,
18540
18541
  "filePath": "src/tokens/contextual/dropdown.tokens.json",
18541
18542
  "isSource": true,
18542
18543
  "original": {
@@ -18552,6 +18553,7 @@
18552
18553
  "STROKE_COLOR"
18553
18554
  ]
18554
18555
  },
18556
+ "$deprecated": true,
18555
18557
  "key": "{dropdown.border.color}"
18556
18558
  },
18557
18559
  "name": "DROPDOWN_BORDER_COLOR",
@@ -19245,7 +19247,7 @@
19245
19247
  "original": {
19246
19248
  "$value": {
19247
19249
  "default": "{color.alpha.dark.2}",
19248
- "dark": "{color.alpha.dark.24}"
19250
+ "dark": "{color.alpha.dark.16}"
19249
19251
  },
19250
19252
  "$type": "color",
19251
19253
  "$description": "Used for the background of a search input in a dropdown listbox.",
@@ -750,7 +750,7 @@ $gl-dropdown-option-background-color-unselected-active: $gl-action-neutral-backg
750
750
  $gl-dropdown-option-background-color-selected-default: $gl-color-neutral-800; // Used for the background of a selected dropdown option in the default state.
751
751
  $gl-dropdown-option-background-color-selected-hover: $gl-color-neutral-700; // Used for the background of a selected dropdown option in the hover state.
752
752
  $gl-dropdown-option-background-color-selected-active: $gl-color-neutral-900; // Used for the background of a selected dropdown option in the active state.
753
- $gl-dropdown-search-background-color: $gl-color-alpha-dark-24; // Used for the background of a search input in a dropdown listbox.
753
+ $gl-dropdown-search-background-color: $gl-color-alpha-dark-16; // Used for the background of a search input in a dropdown listbox.
754
754
  $gl-filtered-search-token-type-background-color-default: $gl-color-neutral-900; // Used for the filtered search type token background color in the default state.
755
755
  $gl-filtered-search-token-type-background-color-hover: $gl-color-neutral-800; // Used for the filtered search type token background color in the hover state.
756
756
  $gl-filtered-search-token-data-background-color-default: $gl-color-neutral-800; // Used for the filtered search data background color in the default state.
@@ -26,7 +26,8 @@
26
26
  "EFFECT_COLOR",
27
27
  "STROKE_COLOR"
28
28
  ]
29
- }
29
+ },
30
+ "$deprecated": true
30
31
  }
31
32
  },
32
33
  "divider": {
@@ -261,7 +262,7 @@
261
262
  "color": {
262
263
  "$value": {
263
264
  "default": "{color.alpha.dark.2}",
264
- "dark": "{color.alpha.dark.24}"
265
+ "dark": "{color.alpha.dark.16}"
265
266
  },
266
267
  "$type": "color",
267
268
  "$description": "Used for the background of a search input in a dropdown listbox.",
@@ -135,24 +135,32 @@
135
135
  //
136
136
  // Generate series of `.table-responsive-*` classes for configuring the screen
137
137
  // size of where your table will overflow.
138
+ @mixin resonsive-table-styles {
139
+ display: block;
140
+ width: 100%;
141
+ overflow-x: auto;
142
+ -webkit-overflow-scrolling: touch;
143
+
144
+ // Prevent double border on horizontal scroll due to use of `display: block;`
145
+ > .table-bordered {
146
+ border: 0;
147
+ }
148
+ }
138
149
 
139
150
  .table-responsive {
140
151
  @each $breakpoint in map.keys($grid-breakpoints) {
141
152
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
142
153
  $infix: breakpoint-infix($next, $grid-breakpoints);
143
-
144
- &#{$infix} {
145
- @include media-breakpoint-down($breakpoint) {
146
- display: block;
147
- width: 100%;
148
- overflow-x: auto;
149
- -webkit-overflow-scrolling: touch;
150
-
151
- // Prevent double border on horizontal scroll due to use of `display: block;`
152
- > .table-bordered {
153
- border: 0;
154
+ @if ($next != null) {
155
+ &#{$infix} {
156
+ @include gl-container-width-down($next) {
157
+ @include resonsive-table-styles;
154
158
  }
155
159
  }
156
160
  }
157
161
  }
162
+
163
+ & {
164
+ @include resonsive-table-styles;
165
+ }
158
166
  }
@@ -378,6 +378,89 @@ $bv-escaped-characters: (("<", "%3c"), (">", "%3e"), ("#", "%23"));
378
378
  }
379
379
 
380
380
  // --- Stacked tables ---
381
+ @mixin stacked-table-styles {
382
+ display: block;
383
+ width: 100%;
384
+
385
+ // Convert to blocks when stacked
386
+ > caption,
387
+ > tbody,
388
+ > tbody > tr,
389
+ > tbody > tr > td,
390
+ > tbody > tr > th {
391
+ display: block;
392
+ }
393
+
394
+ // Hide when stacked
395
+ > thead,
396
+ > tfoot {
397
+ display: none;
398
+
399
+ > tr.b-table-top-row,
400
+ > tr.b-table-bottom-row {
401
+ display: none;
402
+ }
403
+ }
404
+
405
+ // Caption positioning
406
+ > caption {
407
+ caption-side: top !important;
408
+ }
409
+
410
+ > tbody {
411
+ > tr {
412
+ // Turn cells with labels into micro-grids
413
+ > [data-label] {
414
+ // Cell header label pseudo element
415
+ &::before {
416
+ content: attr(data-label);
417
+ width: $b-table-stacked-heading-width;
418
+ float: left;
419
+ text-align: right;
420
+ overflow-wrap: break-word;
421
+ font-weight: bold;
422
+ font-style: normal;
423
+ padding: 0 calc(#{$b-table-stacked-gap} / 2) 0 0;
424
+ margin: 0;
425
+ }
426
+
427
+ // Add clearfix in-case field label wraps
428
+ &::after {
429
+ display: block;
430
+ clear: both;
431
+ content: "";
432
+ }
433
+
434
+ // Cell value (we wrap the cell value in a div when stacked)
435
+ > div {
436
+ display: inline-block;
437
+ width: calc(100% - #{$b-table-stacked-heading-width});
438
+ // Add "gap" between "cells"
439
+ padding: 0 0 0 calc(#{$b-table-stacked-gap} / 2);
440
+ margin: 0;
441
+ }
442
+ }
443
+
444
+ // Dont show the fixed top/bottom rows
445
+ &.top-row,
446
+ &.bottom-row {
447
+ display: none;
448
+ }
449
+
450
+ // Give the top cell of each "row" a heavy border
451
+ > :first-child {
452
+ border-top-width: (3 * $table-border-width);
453
+ }
454
+
455
+ // Give any cell after a rowspan'ed cell a heavy top border
456
+ > [rowspan] + td,
457
+ > [rowspan] + th {
458
+ border-top-width: (3 * $table-border-width);
459
+ }
460
+ }
461
+ }
462
+ }
463
+
381
464
  @if $bv-enable-table-stacked {
382
465
  .table.b-table {
383
466
  &.b-table-stacked {
@@ -385,91 +468,18 @@ $bv-escaped-characters: (("<", "%3c"), (">", "%3e"), ("#", "%23"));
385
468
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
386
469
  $infix: breakpoint-infix($next, $grid-breakpoints);
387
470
 
388
- &#{$infix} {
389
- @include media-breakpoint-down($breakpoint) {
390
- display: block;
391
- width: 100%;
392
-
393
- // Convert to blocks when stacked
394
- > caption,
395
- > tbody,
396
- > tbody > tr,
397
- > tbody > tr > td,
398
- > tbody > tr > th {
399
- display: block;
400
- }
401
-
402
- // Hide when stacked
403
- > thead,
404
- > tfoot {
405
- display: none;
406
-
407
- > tr.b-table-top-row,
408
- > tr.b-table-bottom-row {
409
- display: none;
410
- }
411
- }
412
-
413
- // Caption positioning
414
- > caption {
415
- caption-side: top !important;
416
- }
417
-
418
- > tbody {
419
- > tr {
420
- // Turn cells with labels into micro-grids
421
- > [data-label] {
422
- // Cell header label pseudo element
423
- &::before {
424
- content: attr(data-label);
425
- width: $b-table-stacked-heading-width;
426
- float: left;
427
- text-align: right;
428
- overflow-wrap: break-word;
429
- font-weight: bold;
430
- font-style: normal;
431
- padding: 0 calc(#{$b-table-stacked-gap} / 2) 0 0;
432
- margin: 0;
433
- }
434
-
435
- // Add clearfix in-case field label wraps
436
- &::after {
437
- display: block;
438
- clear: both;
439
- content: "";
440
- }
441
-
442
- // Cell value (we wrap the cell value in a div when stacked)
443
- > div {
444
- display: inline-block;
445
- width: calc(100% - #{$b-table-stacked-heading-width});
446
- // Add "gap" between "cells"
447
- padding: 0 0 0 calc(#{$b-table-stacked-gap} / 2);
448
- margin: 0;
449
- }
450
- }
451
-
452
- // Dont show the fixed top/bottom rows
453
- &.top-row,
454
- &.bottom-row {
455
- display: none;
456
- }
457
-
458
- // Give the top cell of each "row" a heavy border
459
- > :first-child {
460
- border-top-width: (3 * $table-border-width);
461
- }
462
-
463
- // Give any cell after a rowspan'ed cell a heavy top border
464
- > [rowspan] + td,
465
- > [rowspan] + th {
466
- border-top-width: (3 * $table-border-width);
467
- }
468
- }
471
+ @if ($next != null) {
472
+ &#{$infix} {
473
+ @include gl-container-width-down($next) {
474
+ @include stacked-table-styles;
469
475
  }
470
476
  }
471
477
  }
472
478
  }
479
+
480
+ & {
481
+ @include stacked-table-styles;
482
+ }
473
483
  }
474
484
  }
475
485
  }