blob: 6e4fa0d5111f832833d35f8d845876b990b9d0c1 [file] [log] [blame]
Akronbaba3b62021-11-22 17:24:48 +01001@use 'sass:math';
Akron7e5afce2020-08-25 15:50:19 +02002@import "../../util";
3
4/**
5 * Table view
6 *
7 * The table view is complicated, as the
8 * first column has to be static.
9 */
10div.matchtable {
11
12 > div {
13 z-index: 20;
Akronbaba3b62021-11-22 17:24:48 +010014 margin-left: $left-distance - math.div($border-size,2);
Akron7e5afce2020-08-25 15:50:19 +020015 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 {
Akronb7749052022-07-22 18:03:26 +020040 empty-cells: hide;
41 &.not-empty:empty {
Akron7e5afce2020-08-25 15:50:19 +020042 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
Akron9fe23dc2025-06-11 11:43:50 +020067 td, div {
68 &.notinindex {
69 background-color: $ids-grey-2 !important;
70 cursor: default;
71 }
72 }
73
Akron7e5afce2020-08-25 15:50:19 +020074 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) {
Akronbaba3b62021-11-22 17:24:48 +010098 left: math.div($left-width,2) + $border-size;
Akron7e5afce2020-08-25 15:50:19 +020099 }
100
101 // Includes header line as well
102 > * {
103 @include cell-info;
Akronbaba3b62021-11-22 17:24:48 +0100104 border: math.div($border-size,2) solid $dark-orange;
Akron7e5afce2020-08-25 15:50:19 +0200105 }
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 {
Akronb7749052022-07-22 18:03:26 +0200126 &:not(.no-anno) {
127 background-color: $darker-orange;
128 }
129
Akron7e5afce2020-08-25 15:50:19 +0200130 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 }
Akronb7749052022-07-22 18:03:26 +0200141
Akron7e5afce2020-08-25 15:50:19 +0200142 &.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}