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