blob: ef019554dc65ccaee58fb1e5920590e957a9f646 [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 {
40 &:empty {
41 cursor: default;
42 // Fix for empty annotation lines:
43 &::after {
44 content: " ";
45 white-space: pre;
46 }
47 }
48
49 // table for key-value pairs
50 &.matchkeyvalues {
51 padding: 0;
52 > div {
53 @include cell-info;
54 > span {
55 color: $darkest-orange;
56 text-align: right;
57 padding-right: .5em;
58 &::after {
59 content: ":"
60 }
61 }
62 }
63 }
64 }
65
66 tr {
67 outline: none;
68
69 // equal to dd.chosen
70 td.chosen,
71 th.chosen,
72 div.chosen {
73 background-color: $light-green !important;
74 color: $nearly-white;
75 }
76
77 /**
78 * The first two columns.
79 */
80 > th:nth-of-type(1),
81 > th:nth-of-type(2) {
82 @include matchinfo-head;
83 position: absolute;
84 z-index: 80;
85 vertical-align: middle;
86 left: 0px;
87 }
88
89 > th:nth-of-type(2) {
Akronbaba3b62021-11-22 17:24:48 +010090 left: math.div($left-width,2) + $border-size;
Akron7e5afce2020-08-25 15:50:19 +020091 }
92
93 // Includes header line as well
94 > * {
95 @include cell-info;
Akronbaba3b62021-11-22 17:24:48 +010096 border: math.div($border-size,2) solid $dark-orange;
Akron7e5afce2020-08-25 15:50:19 +020097 }
98
99 > td {
100 background-color: $middle-orange;
101 white-space: nowrap;
102 vertical-align: top;
103 text-align: center;
104 &.mark {
105 background-color: $light-orange;
106 }
107 }
108
109 &:nth-child(even) > td {
110 background-color: $light-orange;
111 &.mark {
112 background-color: $middle-orange;
113 }
114 }
115 }
116
117 thead th {
118 background-color: $darker-orange;
119 border-top-width: 0px !important;
120 text-align: center;
121
122 &:nth-of-type(1),
123 &:nth-of-type(2) {
124 text-align: left;
125 }
126
127 &.mark {
128 background-color: $darkest-orange;
129 }
130
131 &.cutted {
132 background-color: $light-orange;
133
134 &::after {
135 @include icon-font;
136 content: $fa-cut;
137 color: $light-green;
138 padding: {
139 left: 4pt;
140 right: 4pt;
141 }
142 }
143 }
144 }
145
146 tbody > tr:nth-of-type(1) > th {
147 border-top-color: transparent;
148 }
149}