blob: deeddc344368d1108b45ffa3f9b37bf3746eeea1 [file] [log] [blame]
Ed Tanous9c729792024-03-23 14:56:34 -07001@import 'bootstrap/dist/css/bootstrap.css'
2
Yoshie Muranaka56ee7692020-05-28 13:28:29 -07003.table {
Yoshie Muranaka183c2752020-02-12 11:30:49 -08004 position: relative;
Ed Tanous9c729792024-03-23 14:56:34 -07005 //z-index: $zindex-dropdown;
Yoshie Muranaka56ee7692020-05-28 13:28:29 -07006
7 td {
Yoshie Muranaka01da8182020-07-08 15:46:43 -07008 border-top: 1px solid gray("300");
9 border-bottom: 1px solid gray("300");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070010 &:first-of-type {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070011 border-left: 1px solid gray("300");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070012 }
13 &:last-of-type {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070014 border-right: 1px solid gray("300");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070015 }
Dixsie Wolmersa04d46f2020-10-22 06:34:56 -050016 vertical-align: middle;
SurenNewaredc618a82020-08-17 18:42:20 +053017
18 // Table action buttons
19 .btn-link {
20 width: 40px;
21 height: 40px;
22 padding: 5px !important;
23 display: inline-flex;
24 justify-content: center;
25 align-items: center;
26 }
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070027 }
28
Dixsie Wolmersa04d46f2020-10-22 06:34:56 -050029 // thead-light added for specificity
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070030 .thead-light th {
Dixsie Wolmersa04d46f2020-10-22 06:34:56 -050031 vertical-align: middle;
32 border-top: 1px solid gray("300");
33 border-bottom: 1px solid gray("300");
34 &:first-of-type {
35 border-left: 1px solid gray("300");
36 }
37 &:last-of-type {
38 border-right: 1px solid gray("300");
39 }
Yoshie Muranaka01da8182020-07-08 15:46:43 -070040 color: theme-color("dark");
Sukanya Pandeyfde429e2020-09-14 20:48:39 +053041 &:focus {
42 outline: none;
43 }
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070044 }
45
Yoshie Muranaka30abccb2020-03-11 12:44:24 -070046 .status-icon svg {
47 width: 1rem;
48 height: auto;
49 }
Yoshie Muranaka183c2752020-02-12 11:30:49 -080050
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070051 .b-table-has-details {
52 td {
53 border-bottom: none;
54 }
55 .table-row-expand svg {
56 transform: rotate(180deg);
57 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080058 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080059
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070060 .b-table-details {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070061 background-color: theme-color("light");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070062 td {
63 padding-left: calc(50px + (#{$table-cell-padding} * 2));
Sandeepa Singh55ef76a2021-04-21 15:44:45 +053064 padding-right: calc(50px + (#{$table-cell-padding} * 2));
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070065 }
66 dl {
67 margin: 0;
68 }
69 dt {
Dixsie Wolmers25e17a12021-06-25 08:15:05 -050070 float: left;
71 clear: left;
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070072 margin-right: $spacer / 2;
73 }
74 dd {
Dixsie Wolmers25e17a12021-06-25 08:15:05 -050075 line-height: 1.2
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070076 }
77 }
78
79 .table-row-expand {
80 width: 50px;
81 .btn {
82 padding: 0;
83 width: 50px;
84 }
85 svg {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070086 fill: theme-color("dark");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070087 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080088 }
Sukanya Pandeyfde429e2020-09-14 20:48:39 +053089 .b-table-sort-icon-left {
90 background-position: left calc(1.5rem / 2) center !important;
91 padding-left: calc(1.2rem + 0.65em) !important;
92 &:focus {
93 outline: none;
94 box-shadow: inset 0 0 0 2px theme-color('primary') !important;
95 }
96 &:hover {
97 background-color: theme-color-dark('light');
98 }
99 }
Mateusz Gapski1d2da292020-09-10 12:07:45 +0200100}
101
102.b-table-sticky-header td {
103 border-top: none;
104}
105
SurenNeware5e9c3912020-09-25 15:49:16 +0530106// Table stacked style for small screen only
107@include media-breakpoint-down(xs) {
108 .b-table-stacked-sm {
109 border: 1px solid gray("300");
110
111 tr {
112
113 &:not(:first-child) > td[aria-colindex='1'] {
114 border-top: 1px solid gray("300");
115 padding-top: 0.625rem;
116 }
117
118 &:not(.b-table-empty-row) {
119 position: relative; // Restrict background color to get zebra striping for the row
120
121 &::before,
122 &::after {
123 position: absolute;
124 top: 0;
125 height: 100%;
126 z-index: -1;
127 }
128
129 &:before {
130 content: '';
131 background-color: gray("200");
132 width: 40%;
133 border-right: 1px solid gray("300");
134 }
135
136 &:after {
137 content: '';
138 right: 0;
139 width: 60%;
140 }
141
142 &:nth-child(even)::after {
143 background-color: gray("100"); // Zebra striping for the row
144 }
145 }
146
147 td {
148 border: 0;
149 padding: 0.75rem;
150 text-align: left !important;
151
152 &:last-of-type {
153 border-right: 0;
154 }
155 }
156 }
157 }
158
159 .table.b-table.b-table-stacked-sm > tbody > tr > [data-label] {
160 &::before {
161 text-align: left;
162 padding-left: $spacer /2;
163 }
164
165 > div {
166 padding-left: 1rem;
167 }
168 }
169
170 .table.b-table.b-table-stacked-sm > tbody > tr > :first-child {
171 border-top-width: 1px;
172 }
SurenNewaredc618a82020-08-17 18:42:20 +0530173}