UNPKG

2.18 kBSCSSView Raw
1@import "mixins/settings.global";
2@import "mixins/objects.grid";
3
4.c-table {
5 @include grid;
6 @include grid--wrap;
7 width: $table-width;
8 margin: $table-margin;
9 padding: $table-padding;
10 border: $table-border;
11 border-collapse: collapse;
12 border-spacing: 0;
13}
14
15.c-table__caption {
16 @include grid;
17 @include grid__cell--full;
18 max-width: $table-caption-max-width;
19 padding: $table-caption-padding;
20 color: $table-caption-color;
21 font-size: $table-caption-font-size;
22 text-align: $table-caption-text-align;
23}
24
25.c-table__row,
26.c-table__head,
27.c-table__body {
28 display: flex;
29 flex: 0 0 100%;
30 flex-wrap: wrap;
31 max-width: 100%;
32}
33
34.c-table--striped :not(.c-table__row--heading).c-table__row:nth-of-type(odd) {
35 background-color: $table-row-striped-background-color;
36 color: $table-row-striped-color;
37}
38
39.c-table__cell {
40 display: flex;
41 flex: 1;
42 padding: $table-cell-padding;
43 text-align: $table-cell-text-align;
44 overflow: auto;
45}
46
47.c-table__row--heading .c-table__cell {
48 display: flex;
49 flex: 1;
50 border-bottom: $table-heading-border;
51 background-color: $table-heading-background-color;
52 color: $table-heading-color;
53 font-size: $text-font-size-medium;
54 font-weight: $table-heading-font-weight;
55}
56
57.c-table--striped .c-table__row--heading .c-table__cell {
58 background-color: $table-heading-striped-background-color;
59 color: $table-heading-striped-color;
60}
61
62.c-table--clickable :not(.c-table__row--heading).c-table__row:hover .c-table__cell,
63.c-table__row--clickable:hover .c-table__cell {
64 background-color: $table-row-clickable-background-color;
65 color: $table-row-clickable-color;
66 cursor: pointer;
67}
68
69.c-table__row--disabled {
70 background-color: $table-row-disabled-background-color;
71 color: $table-row-disabled-color;
72 cursor: default;
73}
74
75.c-table--clickable :not(.c-table__row--heading).c-table__row--disabled:hover .c-table__cell,
76.c-table__row--disabled:hover .c-table__cell {
77 background-color: $table-row-disabled-background-color;
78 color: $table-row-disabled-color;
79 cursor: not-allowed;
80}
81
82.c-table--condensed {
83 font-size: $table-condensed-font-size;
84
85 .c-table__cell {
86 padding: $table-condensed-cell-padding;
87 }
88}