Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 1 | .table { |
Yoshie Muranaka | 183c275 | 2020-02-12 11:30:49 -0800 | [diff] [blame] | 2 | position: relative; |
| 3 | z-index: $zindex-dropdown; |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 4 | |
| 5 | td { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 6 | border-top: 1px solid gray("300"); |
| 7 | border-bottom: 1px solid gray("300"); |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 8 | &:first-of-type { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 9 | border-left: 1px solid gray("300"); |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 10 | } |
| 11 | &:last-of-type { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 12 | border-right: 1px solid gray("300"); |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 13 | } |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame^] | 14 | |
| 15 | // Table action buttons |
| 16 | .btn-link { |
| 17 | width: 40px; |
| 18 | height: 40px; |
| 19 | padding: 5px !important; |
| 20 | display: inline-flex; |
| 21 | justify-content: center; |
| 22 | align-items: center; |
| 23 | } |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | // thead-light added for specificiy |
| 27 | .thead-light th { |
| 28 | border: none; |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 29 | color: theme-color("dark"); |
Sukanya Pandey | fde429e | 2020-09-14 20:48:39 +0530 | [diff] [blame] | 30 | &:focus { |
| 31 | outline: none; |
| 32 | } |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 33 | } |
| 34 | |
Yoshie Muranaka | 30abccb | 2020-03-11 12:44:24 -0700 | [diff] [blame] | 35 | .status-icon svg { |
| 36 | width: 1rem; |
| 37 | height: auto; |
| 38 | } |
Yoshie Muranaka | 183c275 | 2020-02-12 11:30:49 -0800 | [diff] [blame] | 39 | |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 40 | .b-table-has-details { |
| 41 | td { |
| 42 | border-bottom: none; |
| 43 | } |
| 44 | .table-row-expand svg { |
| 45 | transform: rotate(180deg); |
| 46 | } |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 47 | } |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 48 | |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 49 | .b-table-details { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 50 | background-color: theme-color("light"); |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 51 | td { |
| 52 | padding-left: calc(50px + (#{$table-cell-padding} * 2)); |
| 53 | } |
| 54 | dl { |
| 55 | margin: 0; |
| 56 | } |
| 57 | dt { |
| 58 | display: inline-block; |
| 59 | margin-right: $spacer / 2; |
| 60 | } |
| 61 | dd { |
| 62 | display: inline-block; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | .table-row-expand { |
| 67 | width: 50px; |
| 68 | .btn { |
| 69 | padding: 0; |
| 70 | width: 50px; |
| 71 | } |
| 72 | svg { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 73 | fill: theme-color("dark"); |
Yoshie Muranaka | 56ee769 | 2020-05-28 13:28:29 -0700 | [diff] [blame] | 74 | } |
Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 75 | } |
Sukanya Pandey | fde429e | 2020-09-14 20:48:39 +0530 | [diff] [blame] | 76 | .b-table-sort-icon-left { |
| 77 | background-position: left calc(1.5rem / 2) center !important; |
| 78 | padding-left: calc(1.2rem + 0.65em) !important; |
| 79 | &:focus { |
| 80 | outline: none; |
| 81 | box-shadow: inset 0 0 0 2px theme-color('primary') !important; |
| 82 | } |
| 83 | &:hover { |
| 84 | background-color: theme-color-dark('light'); |
| 85 | } |
| 86 | } |
Mateusz Gapski | 1d2da29 | 2020-09-10 12:07:45 +0200 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | .b-table-sticky-header td { |
| 90 | border-top: none; |
| 91 | } |
| 92 | |
SurenNeware | 5e9c391 | 2020-09-25 15:49:16 +0530 | [diff] [blame] | 93 | // Table stacked style for small screen only |
| 94 | @include media-breakpoint-down(xs) { |
| 95 | .b-table-stacked-sm { |
| 96 | border: 1px solid gray("300"); |
| 97 | |
| 98 | tr { |
| 99 | |
| 100 | &:not(:first-child) > td[aria-colindex='1'] { |
| 101 | border-top: 1px solid gray("300"); |
| 102 | padding-top: 0.625rem; |
| 103 | } |
| 104 | |
| 105 | &:not(.b-table-empty-row) { |
| 106 | position: relative; // Restrict background color to get zebra striping for the row |
| 107 | |
| 108 | &::before, |
| 109 | &::after { |
| 110 | position: absolute; |
| 111 | top: 0; |
| 112 | height: 100%; |
| 113 | z-index: -1; |
| 114 | } |
| 115 | |
| 116 | &:before { |
| 117 | content: ''; |
| 118 | background-color: gray("200"); |
| 119 | width: 40%; |
| 120 | border-right: 1px solid gray("300"); |
| 121 | } |
| 122 | |
| 123 | &:after { |
| 124 | content: ''; |
| 125 | right: 0; |
| 126 | width: 60%; |
| 127 | } |
| 128 | |
| 129 | &:nth-child(even)::after { |
| 130 | background-color: gray("100"); // Zebra striping for the row |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | td { |
| 135 | border: 0; |
| 136 | padding: 0.75rem; |
| 137 | text-align: left !important; |
| 138 | |
| 139 | &:last-of-type { |
| 140 | border-right: 0; |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | .table.b-table.b-table-stacked-sm > tbody > tr > [data-label] { |
| 147 | &::before { |
| 148 | text-align: left; |
| 149 | padding-left: $spacer /2; |
| 150 | } |
| 151 | |
| 152 | > div { |
| 153 | padding-left: 1rem; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | .table.b-table.b-table-stacked-sm > tbody > tr > :first-child { |
| 158 | border-top-width: 1px; |
| 159 | } |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame^] | 160 | } |