blob: 4bed2389942b24c9e01f11839b1e88ee8e55f3d1 [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
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) {
Akronbaba3b62021-11-22 17:24:48 +010091 left: math.div($left-width,2) + $border-size;
Akron7e5afce2020-08-25 15:50:19 +020092 }
93
94 // Includes header line as well
95 > * {
96 @include cell-info;
Akronbaba3b62021-11-22 17:24:48 +010097 border: math.div($border-size,2) solid $dark-orange;
Akron7e5afce2020-08-25 15:50:19 +020098 }
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 {
Akronb7749052022-07-22 18:03:26 +0200119 &:not(.no-anno) {
120 background-color: $darker-orange;
121 }
122
Akron7e5afce2020-08-25 15:50:19 +0200123 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 }
Akronb7749052022-07-22 18:03:26 +0200134
Akron7e5afce2020-08-25 15:50:19 +0200135 &.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}