|
1 |
| -.table.b-table.b-table-stacked { |
2 |
| - display: block; |
3 |
| - width: 100%; |
4 |
| -} |
5 |
| - |
6 |
| -.table.b-table.b-table-stacked > tfoot, |
7 |
| -.table.b-table.b-table-stacked > tfoot > tr.b-table-bottom-row, |
8 |
| -.table.b-table.b-table-stacked > tfoot > tr.b-table-top-row, |
9 |
| -.table.b-table.b-table-stacked > thead, |
10 |
| -.table.b-table.b-table-stacked > thead > tr.b-table-bottom-row, |
11 |
| -.table.b-table.b-table-stacked > thead > tr.b-table-top-row { |
| 1 | +.b-table-stacked-label { |
12 | 2 | display: none;
|
13 | 3 | }
|
14 | 4 |
|
15 |
| -.table.b-table.b-table-stacked > caption, |
16 |
| -.table.b-table.b-table-stacked > tbody, |
17 |
| -.table.b-table.b-table-stacked > tbody > tr, |
18 |
| -.table.b-table.b-table-stacked > tbody > tr > td, |
19 |
| -.table.b-table.b-table-stacked > tbody > tr > th { |
20 |
| - display: block; |
21 |
| -} |
| 5 | +@each $breakpoint in map-keys($grid-breakpoints) { |
| 6 | + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); |
22 | 7 |
|
23 |
| -.table.b-table.b-table-stacked > tbody > tr > :first-child, |
24 |
| -.table.b-table.b-table-stacked > tbody > tr > [rowspan] + td, |
25 |
| -.table.b-table.b-table-stacked > tbody > tr > [rowspan] + th { |
26 |
| - border-top-width: 3px; |
27 |
| -} |
| 8 | + @include media-breakpoint-down($breakpoint, $grid-breakpoints) { |
| 9 | + .table.b-table.b-table-stacked#{$infix} { |
| 10 | + display: block; |
| 11 | + width: 100%; |
| 12 | + } |
28 | 13 |
|
29 |
| -.table.b-table.b-table-stacked > tbody > tr > [data-label]::before { |
30 |
| - content: attr(data-label); |
31 |
| - width: 40%; |
32 |
| - float: left; |
33 |
| - text-align: right; |
34 |
| - word-wrap: break-word; |
35 |
| - font-weight: 700; |
36 |
| - font-style: normal; |
37 |
| - padding: 0 0.5rem 0 0; |
38 |
| - margin: 0; |
39 |
| -} |
| 14 | + .table.b-table.b-table-stacked#{$infix} > tfoot, |
| 15 | + .table.b-table.b-table-stacked#{$infix} > tfoot > tr.b-table-bottom-row, |
| 16 | + .table.b-table.b-table-stacked#{$infix} > tfoot > tr.b-table-top-row, |
| 17 | + .table.b-table.b-table-stacked#{$infix} > thead, |
| 18 | + .table.b-table.b-table-stacked#{$infix} > thead > tr.b-table-bottom-row, |
| 19 | + .table.b-table.b-table-stacked#{$infix} > thead > tr.b-table-top-row { |
| 20 | + display: none; |
| 21 | + } |
40 | 22 |
|
41 |
| -.table.b-table.b-table-stacked > tbody > tr > [data-label]::after { |
42 |
| - display: block; |
43 |
| - clear: both; |
44 |
| - content: ""; |
45 |
| -} |
| 23 | + .table.b-table.b-table-stacked#{$infix} > caption, |
| 24 | + .table.b-table.b-table-stacked#{$infix} > tbody, |
| 25 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr, |
| 26 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > td, |
| 27 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > td > .b-table-stacked-label, |
| 28 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > th { |
| 29 | + display: block; |
| 30 | + } |
| 31 | + |
| 32 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > :first-child, |
| 33 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > [rowspan] + td, |
| 34 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > [rowspan] + th { |
| 35 | + border-top-width: 3px; |
| 36 | + } |
| 37 | + |
| 38 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > [data-label]::before { |
| 39 | + content: attr(data-label); |
| 40 | + width: 40%; |
| 41 | + float: left; |
| 42 | + text-align: right; |
| 43 | + word-wrap: break-word; |
| 44 | + font-weight: 700; |
| 45 | + font-style: normal; |
| 46 | + padding: 0 0.5rem 0 0; |
| 47 | + margin: 0; |
| 48 | + } |
46 | 49 |
|
47 |
| -.table.b-table.b-table-stacked > tbody > tr > [data-label] > div { |
48 |
| - display: inline-block; |
49 |
| - width: 60%; |
50 |
| - padding: 0 0 0 0.5rem; |
51 |
| - margin: 0; |
| 50 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > [data-label]::after { |
| 51 | + display: block; |
| 52 | + clear: both; |
| 53 | + content: ""; |
| 54 | + } |
| 55 | + |
| 56 | + .table.b-table.b-table-stacked#{$infix} > tbody > tr > [data-label] > div { |
| 57 | + display: inline-block; |
| 58 | + width: 60%; |
| 59 | + padding: 0 0 0 0.5rem; |
| 60 | + margin: 0; |
| 61 | + } |
| 62 | + } |
52 | 63 | }
|
53 | 64 |
|
54 | 65 | .b-table-sticky-header,
|
|
0 commit comments