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 | |
Akron | 9fe23dc | 2025-06-11 11:43:50 +0200 | [diff] [blame^] | 67 | td, div { |
| 68 | &.notinindex { |
| 69 | background-color: $ids-grey-2 !important; |
| 70 | cursor: default; |
| 71 | } |
| 72 | } |
| 73 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 74 | tr { |
| 75 | outline: none; |
| 76 | |
| 77 | // equal to dd.chosen |
| 78 | td.chosen, |
| 79 | th.chosen, |
| 80 | div.chosen { |
| 81 | background-color: $light-green !important; |
| 82 | color: $nearly-white; |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * The first two columns. |
| 87 | */ |
| 88 | > th:nth-of-type(1), |
| 89 | > th:nth-of-type(2) { |
| 90 | @include matchinfo-head; |
| 91 | position: absolute; |
| 92 | z-index: 80; |
| 93 | vertical-align: middle; |
| 94 | left: 0px; |
| 95 | } |
| 96 | |
| 97 | > th:nth-of-type(2) { |
Akron | baba3b6 | 2021-11-22 17:24:48 +0100 | [diff] [blame] | 98 | left: math.div($left-width,2) + $border-size; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | // Includes header line as well |
| 102 | > * { |
| 103 | @include cell-info; |
Akron | baba3b6 | 2021-11-22 17:24:48 +0100 | [diff] [blame] | 104 | border: math.div($border-size,2) solid $dark-orange; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | > td { |
| 108 | background-color: $middle-orange; |
| 109 | white-space: nowrap; |
| 110 | vertical-align: top; |
| 111 | text-align: center; |
| 112 | &.mark { |
| 113 | background-color: $light-orange; |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | &:nth-child(even) > td { |
| 118 | background-color: $light-orange; |
| 119 | &.mark { |
| 120 | background-color: $middle-orange; |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | thead th { |
Akron | b774905 | 2022-07-22 18:03:26 +0200 | [diff] [blame] | 126 | &:not(.no-anno) { |
| 127 | background-color: $darker-orange; |
| 128 | } |
| 129 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 130 | border-top-width: 0px !important; |
| 131 | text-align: center; |
| 132 | |
| 133 | &:nth-of-type(1), |
| 134 | &:nth-of-type(2) { |
| 135 | text-align: left; |
| 136 | } |
| 137 | |
| 138 | &.mark { |
| 139 | background-color: $darkest-orange; |
| 140 | } |
Akron | b774905 | 2022-07-22 18:03:26 +0200 | [diff] [blame] | 141 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 142 | &.cutted { |
| 143 | background-color: $light-orange; |
| 144 | |
| 145 | &::after { |
| 146 | @include icon-font; |
| 147 | content: $fa-cut; |
| 148 | color: $light-green; |
| 149 | padding: { |
| 150 | left: 4pt; |
| 151 | right: 4pt; |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | tbody > tr:nth-of-type(1) > th { |
| 158 | border-top-color: transparent; |
| 159 | } |
| 160 | } |