github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/ui/app/styles/core/table.scss (about) 1 .table { 2 color: $text; 3 border-radius: $radius; 4 border: 1px solid $grey-blue; 5 border-collapse: separate; 6 width: 100%; 7 8 &.is-fixed { 9 table-layout: fixed; 10 11 td { 12 text-overflow: ellipsis; 13 overflow: hidden; 14 } 15 } 16 17 &.is-isolated { 18 margin-bottom: 0; 19 } 20 21 &.with-foot { 22 margin-bottom: 0; 23 border-bottom-left-radius: 0; 24 border-bottom-right-radius: 0; 25 26 + .table-foot { 27 margin-bottom: 1.5rem; 28 } 29 } 30 31 &.is-compact { 32 th, 33 td { 34 padding: 0.75em; 35 } 36 } 37 38 &.is-darkened { 39 tbody tr:not(.is-selected) { 40 background-color: $white-bis; 41 42 &:hover { 43 background-color: $white-ter; 44 } 45 } 46 47 &.is-striped { 48 tbody tr:not(.is-selected) { 49 &:nth-child(even) { 50 background-color: $white-ter; 51 52 &:hover { 53 background-color: darken($white-ter, 5%); 54 } 55 } 56 } 57 } 58 } 59 60 th, 61 td { 62 padding: 0.75em 1.5em; 63 border: none; 64 65 &.is-three-quarters { 66 width: 75%; 67 } 68 69 &.is-two-thirds { 70 width: 66.66%; 71 } 72 73 &.is-half { 74 width: 50%; 75 } 76 77 &.is-one-third { 78 width: 33.33%; 79 } 80 81 &.is-one-quarter { 82 width: 25%; 83 } 84 85 &.is-truncatable { 86 overflow: hidden; 87 text-overflow: ellipsis; 88 white-space: nowrap; 89 } 90 91 &.is-narrow { 92 padding: 1.25em 0 1.25em 0.5em; 93 94 & + th, 95 & + td { 96 padding-left: 0.5em; 97 } 98 } 99 100 // Only use px modifiers when text needs to be truncated. 101 // In this and only this scenario are percentages not effective. 102 &.is-200px { 103 width: 200px; 104 max-width: 200px; 105 } 106 107 @for $i from 1 through 11 { 108 &.is-#{$i} { 109 width: 100% / 12 * $i; 110 max-width: 100% / 12 * $i; 111 } 112 } 113 114 a { 115 color: $blue; 116 text-decoration: underline; 117 font-weight: $weight-normal; 118 119 &.is-primary { 120 color: $text; 121 text-decoration: none; 122 font-weight: $weight-semibold; 123 } 124 } 125 } 126 127 thead { 128 background: $white-ter; 129 border: 1px solid $grey-blue; 130 131 tr { 132 &:hover { 133 background-color: inherit; 134 } 135 } 136 137 td, 138 th { 139 color: $grey-light; 140 font-weight: $weight-normal; 141 vertical-align: bottom; 142 border-bottom: 1px solid $grey-blue; 143 144 &.is-selectable { 145 padding: 0; 146 147 a { 148 display: block; 149 padding: 0.75em 1.5em; 150 width: 100%; 151 text-decoration: none; 152 153 &:hover { 154 background-color: darken($white-ter, 5%); 155 } 156 } 157 } 158 159 &.is-active { 160 position: relative; 161 162 &::after { 163 content: ''; 164 width: 10px; 165 right: 1.5em; 166 top: 0.75em; 167 bottom: 0.75em; 168 position: absolute; 169 display: block; 170 } 171 172 &.asc::after { 173 content: '⬇'; 174 } 175 176 &.desc::after { 177 content: '⬆'; 178 } 179 } 180 181 a { 182 color: $grey; 183 } 184 } 185 } 186 187 tbody { 188 tr { 189 &.is-interactive { 190 cursor: pointer; 191 box-sizing: border-box; 192 } 193 194 &.is-active { 195 background: rgba($blue, 0.1); 196 197 td:first-child { 198 position: relative; 199 200 &::after { 201 position: absolute; 202 content: ''; 203 width: 3px; 204 top: 0; 205 bottom: 0; 206 left: -1px; 207 display: block; 208 background: $blue; 209 } 210 } 211 } 212 } 213 214 td.is-subheading { 215 font-weight: $weight-bold; 216 background: $white; 217 color: $blue; 218 } 219 220 td { 221 border: 1px solid $grey-blue; 222 border-width: 0 0 1px; 223 padding: 1.25em 1.5em; 224 225 &.is-one-line { 226 white-space: nowrap; 227 } 228 } 229 } 230 231 .is-faded { 232 color: $grey-light; 233 } 234 } 235 236 .table tfoot, 237 .table-foot { 238 margin-top: -1px; 239 background: $white-ter; 240 border: 1px solid $grey-blue; 241 border-bottom-right-radius: $radius; 242 border-bottom-left-radius: $radius; 243 overflow: hidden; 244 245 .pagination { 246 padding: 0; 247 margin: 0; 248 } 249 }