blob: 6efe2ba03f03b964cb0f245491798b841183addb [file] [log] [blame]
Yoshie Muranaka56ee7692020-05-28 13:28:29 -07001.table {
Yoshie Muranaka183c2752020-02-12 11:30:49 -08002 position: relative;
3 z-index: $zindex-dropdown;
Yoshie Muranaka56ee7692020-05-28 13:28:29 -07004
5 td {
Yoshie Muranaka01da8182020-07-08 15:46:43 -07006 border-top: 1px solid gray("300");
7 border-bottom: 1px solid gray("300");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -07008 &:first-of-type {
Yoshie Muranaka01da8182020-07-08 15:46:43 -07009 border-left: 1px solid gray("300");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070010 }
11 &:last-of-type {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070012 border-right: 1px solid gray("300");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070013 }
Dixsie Wolmersa04d46f2020-10-22 06:34:56 -050014 vertical-align: middle;
SurenNewaredc618a82020-08-17 18:42:20 +053015
16 // Table action buttons
17 .btn-link {
18 width: 40px;
19 height: 40px;
20 padding: 5px !important;
21 display: inline-flex;
22 justify-content: center;
23 align-items: center;
24 }
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070025 }
26
Dixsie Wolmersa04d46f2020-10-22 06:34:56 -050027 // thead-light added for specificity
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070028 .thead-light th {
Dixsie Wolmersa04d46f2020-10-22 06:34:56 -050029 vertical-align: middle;
30 border-top: 1px solid gray("300");
31 border-bottom: 1px solid gray("300");
32 &:first-of-type {
33 border-left: 1px solid gray("300");
34 }
35 &:last-of-type {
36 border-right: 1px solid gray("300");
37 }
Yoshie Muranaka01da8182020-07-08 15:46:43 -070038 color: theme-color("dark");
Sukanya Pandeyfde429e2020-09-14 20:48:39 +053039 &:focus {
40 outline: none;
41 }
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070042 }
43
Yoshie Muranaka30abccb2020-03-11 12:44:24 -070044 .status-icon svg {
45 width: 1rem;
46 height: auto;
47 }
Yoshie Muranaka183c2752020-02-12 11:30:49 -080048
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070049 .b-table-has-details {
50 td {
51 border-bottom: none;
52 }
53 .table-row-expand svg {
54 transform: rotate(180deg);
55 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080056 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080057
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070058 .b-table-details {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070059 background-color: theme-color("light");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070060 td {
61 padding-left: calc(50px + (#{$table-cell-padding} * 2));
62 }
63 dl {
64 margin: 0;
65 }
66 dt {
Dixsie Wolmers25e17a12021-06-25 08:15:05 -050067 float: left;
68 clear: left;
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070069 margin-right: $spacer / 2;
70 }
71 dd {
Dixsie Wolmers25e17a12021-06-25 08:15:05 -050072 line-height: 1.2
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070073 }
74 }
75
76 .table-row-expand {
77 width: 50px;
78 .btn {
79 padding: 0;
80 width: 50px;
81 }
82 svg {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070083 fill: theme-color("dark");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070084 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080085 }
Sukanya Pandeyfde429e2020-09-14 20:48:39 +053086 .b-table-sort-icon-left {
87 background-position: left calc(1.5rem / 2) center !important;
88 padding-left: calc(1.2rem + 0.65em) !important;
89 &:focus {
90 outline: none;
91 box-shadow: inset 0 0 0 2px theme-color('primary') !important;
92 }
93 &:hover {
94 background-color: theme-color-dark('light');
95 }
96 }
Mateusz Gapski1d2da292020-09-10 12:07:45 +020097}
98
99.b-table-sticky-header td {
100 border-top: none;
101}
102
SurenNeware5e9c3912020-09-25 15:49:16 +0530103// Table stacked style for small screen only
104@include media-breakpoint-down(xs) {
105 .b-table-stacked-sm {
106 border: 1px solid gray("300");
107
108 tr {
109
110 &:not(:first-child) > td[aria-colindex='1'] {
111 border-top: 1px solid gray("300");
112 padding-top: 0.625rem;
113 }
114
115 &:not(.b-table-empty-row) {
116 position: relative; // Restrict background color to get zebra striping for the row
117
118 &::before,
119 &::after {
120 position: absolute;
121 top: 0;
122 height: 100%;
123 z-index: -1;
124 }
125
126 &:before {
127 content: '';
128 background-color: gray("200");
129 width: 40%;
130 border-right: 1px solid gray("300");
131 }
132
133 &:after {
134 content: '';
135 right: 0;
136 width: 60%;
137 }
138
139 &:nth-child(even)::after {
140 background-color: gray("100"); // Zebra striping for the row
141 }
142 }
143
144 td {
145 border: 0;
146 padding: 0.75rem;
147 text-align: left !important;
148
149 &:last-of-type {
150 border-right: 0;
151 }
152 }
153 }
154 }
155
156 .table.b-table.b-table-stacked-sm > tbody > tr > [data-label] {
157 &::before {
158 text-align: left;
159 padding-left: $spacer /2;
160 }
161
162 > div {
163 padding-left: 1rem;
164 }
165 }
166
167 .table.b-table.b-table-stacked-sm > tbody > tr > :first-child {
168 border-top-width: 1px;
169 }
SurenNewaredc618a82020-08-17 18:42:20 +0530170}