blob: 8b8c4a8e02e276bb947cbedeb4371607e7d378bc [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 }
14 }
15
16 // thead-light added for specificiy
17 .thead-light th {
18 border: none;
Yoshie Muranaka01da8182020-07-08 15:46:43 -070019 color: theme-color("dark");
Sukanya Pandeyfde429e2020-09-14 20:48:39 +053020 &:focus {
21 outline: none;
22 }
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070023 }
24
Yoshie Muranaka30abccb2020-03-11 12:44:24 -070025 .status-icon svg {
26 width: 1rem;
27 height: auto;
28 }
Yoshie Muranaka183c2752020-02-12 11:30:49 -080029
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070030 .b-table-has-details {
31 td {
32 border-bottom: none;
33 }
34 .table-row-expand svg {
35 transform: rotate(180deg);
36 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080037 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080038
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070039 .b-table-details {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070040 background-color: theme-color("light");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070041 td {
42 padding-left: calc(50px + (#{$table-cell-padding} * 2));
43 }
44 dl {
45 margin: 0;
46 }
47 dt {
48 display: inline-block;
49 margin-right: $spacer / 2;
50 }
51 dd {
52 display: inline-block;
53 }
54 }
55
56 .table-row-expand {
57 width: 50px;
58 .btn {
59 padding: 0;
60 width: 50px;
61 }
62 svg {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070063 fill: theme-color("dark");
Yoshie Muranaka56ee7692020-05-28 13:28:29 -070064 }
Yoshie Muranaka4b0fc1d2020-01-06 07:36:16 -080065 }
Sukanya Pandeyfde429e2020-09-14 20:48:39 +053066 .b-table-sort-icon-left {
67 background-position: left calc(1.5rem / 2) center !important;
68 padding-left: calc(1.2rem + 0.65em) !important;
69 &:focus {
70 outline: none;
71 box-shadow: inset 0 0 0 2px theme-color('primary') !important;
72 }
73 &:hover {
74 background-color: theme-color-dark('light');
75 }
76 }
Mateusz Gapski1d2da292020-09-10 12:07:45 +020077}
78
79.b-table-sticky-header td {
80 border-top: none;
81}
82
SurenNeware5e9c3912020-09-25 15:49:16 +053083// Table stacked style for small screen only
84@include media-breakpoint-down(xs) {
85 .b-table-stacked-sm {
86 border: 1px solid gray("300");
87
88 tr {
89
90 &:not(:first-child) > td[aria-colindex='1'] {
91 border-top: 1px solid gray("300");
92 padding-top: 0.625rem;
93 }
94
95 &:not(.b-table-empty-row) {
96 position: relative; // Restrict background color to get zebra striping for the row
97
98 &::before,
99 &::after {
100 position: absolute;
101 top: 0;
102 height: 100%;
103 z-index: -1;
104 }
105
106 &:before {
107 content: '';
108 background-color: gray("200");
109 width: 40%;
110 border-right: 1px solid gray("300");
111 }
112
113 &:after {
114 content: '';
115 right: 0;
116 width: 60%;
117 }
118
119 &:nth-child(even)::after {
120 background-color: gray("100"); // Zebra striping for the row
121 }
122 }
123
124 td {
125 border: 0;
126 padding: 0.75rem;
127 text-align: left !important;
128
129 &:last-of-type {
130 border-right: 0;
131 }
132 }
133 }
134 }
135
136 .table.b-table.b-table-stacked-sm > tbody > tr > [data-label] {
137 &::before {
138 text-align: left;
139 padding-left: $spacer /2;
140 }
141
142 > div {
143 padding-left: 1rem;
144 }
145 }
146
147 .table.b-table.b-table-stacked-sm > tbody > tr > :first-child {
148 border-top-width: 1px;
149 }
150}