Akron | baba3b6 | 2021-11-22 17:24:48 +0100 | [diff] [blame] | 1 | @use 'sass:math'; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 2 | @import "../../util"; |
| 3 | |
| 4 | /** |
| 5 | * Table view |
| 6 | * |
| 7 | * The table view is complicated, as the |
| 8 | * first column has to be static. |
| 9 | */ |
| 10 | div.matchtable { |
| 11 | |
| 12 | > div { |
| 13 | z-index: 20; |
Akron | baba3b6 | 2021-11-22 17:24:48 +0100 | [diff] [blame] | 14 | margin-left: $left-distance - math.div($border-size,2); |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 15 | margin-right: $right-view-distance; |
| 16 | padding: 0; |
| 17 | overflow-x: auto; |
| 18 | overflow-y: visible; |
| 19 | width: auto; |
| 20 | } |
| 21 | |
| 22 | table { |
| 23 | display: table; |
| 24 | border-collapse: separate; |
| 25 | border-spacing: 0px; |
| 26 | } |
| 27 | |
| 28 | th { |
| 29 | color: $nearly-white; |
| 30 | } |
| 31 | |
| 32 | // Use matchinfo cells for query creation |
| 33 | td, |
| 34 | tbody th, |
| 35 | thead th:not(:nth-child(1)):not(:nth-child(2)):not(.cutted) { |
| 36 | cursor: pointer; |
| 37 | } |
| 38 | |
| 39 | td { |
Akron | b774905 | 2022-07-22 18:03:26 +0200 | [diff] [blame] | 40 | empty-cells: hide; |
| 41 | &.not-empty:empty { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 42 | cursor: default; |
| 43 | // Fix for empty annotation lines: |
| 44 | &::after { |
| 45 | content: " "; |
| 46 | white-space: pre; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | // table for key-value pairs |
| 51 | &.matchkeyvalues { |
| 52 | padding: 0; |
| 53 | > div { |
| 54 | @include cell-info; |
| 55 | > span { |
| 56 | color: $darkest-orange; |
| 57 | text-align: right; |
| 58 | padding-right: .5em; |
| 59 | &::after { |
| 60 | content: ":" |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | tr { |
| 68 | outline: none; |
| 69 | |
| 70 | // equal to dd.chosen |
| 71 | td.chosen, |
| 72 | th.chosen, |
| 73 | div.chosen { |
| 74 | background-color: $light-green !important; |
| 75 | color: $nearly-white; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * The first two columns. |
| 80 | */ |
| 81 | > th:nth-of-type(1), |
| 82 | > th:nth-of-type(2) { |
| 83 | @include matchinfo-head; |
| 84 | position: absolute; |
| 85 | z-index: 80; |
| 86 | vertical-align: middle; |
| 87 | left: 0px; |
| 88 | } |
| 89 | |
| 90 | > th:nth-of-type(2) { |
Akron | baba3b6 | 2021-11-22 17:24:48 +0100 | [diff] [blame] | 91 | left: math.div($left-width,2) + $border-size; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | // Includes header line as well |
| 95 | > * { |
| 96 | @include cell-info; |
Akron | baba3b6 | 2021-11-22 17:24:48 +0100 | [diff] [blame] | 97 | border: math.div($border-size,2) solid $dark-orange; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | > td { |
| 101 | background-color: $middle-orange; |
| 102 | white-space: nowrap; |
| 103 | vertical-align: top; |
| 104 | text-align: center; |
| 105 | &.mark { |
| 106 | background-color: $light-orange; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | &:nth-child(even) > td { |
| 111 | background-color: $light-orange; |
| 112 | &.mark { |
| 113 | background-color: $middle-orange; |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | thead th { |
Akron | b774905 | 2022-07-22 18:03:26 +0200 | [diff] [blame] | 119 | &:not(.no-anno) { |
| 120 | background-color: $darker-orange; |
| 121 | } |
| 122 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 123 | border-top-width: 0px !important; |
| 124 | text-align: center; |
| 125 | |
| 126 | &:nth-of-type(1), |
| 127 | &:nth-of-type(2) { |
| 128 | text-align: left; |
| 129 | } |
| 130 | |
| 131 | &.mark { |
| 132 | background-color: $darkest-orange; |
| 133 | } |
Akron | b774905 | 2022-07-22 18:03:26 +0200 | [diff] [blame] | 134 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 135 | &.cutted { |
| 136 | background-color: $light-orange; |
| 137 | |
| 138 | &::after { |
| 139 | @include icon-font; |
| 140 | content: $fa-cut; |
| 141 | color: $light-green; |
| 142 | padding: { |
| 143 | left: 4pt; |
| 144 | right: 4pt; |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | tbody > tr:nth-of-type(1) > th { |
| 151 | border-top-color: transparent; |
| 152 | } |
| 153 | } |