blob: ca2d3ed6d318160a4aaa52b33d6c0c2bad962b08 [file] [log] [blame]
Akronbaba3b62021-11-22 17:24:48 +01001@use 'sass:math';
Akron7636edf2025-11-04 12:44:53 +01002@use "../../util";
3@use "../../base/colors";
4@use "../../base/icons";
5@use "../../base/lengths";
6@use "../../base/mixins";
Akron7e5afce2020-08-25 15:50:19 +02007
8/**
9 * Table view
10 *
11 * The table view is complicated, as the
12 * first column has to be static.
13 */
14div.matchtable {
15
16 > div {
17 z-index: 20;
Akron7636edf2025-11-04 12:44:53 +010018 margin-left: lengths.$left-distance - math.div(lengths.$border-size,2);
19 margin-right: lengths.$right-view-distance;
Akron7e5afce2020-08-25 15:50:19 +020020 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 {
Akron7636edf2025-11-04 12:44:53 +010033 color: colors.$nearly-white;
Akron7e5afce2020-08-25 15:50:19 +020034 }
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 {
Akronb7749052022-07-22 18:03:26 +020044 empty-cells: hide;
45 &.not-empty:empty {
Akron7e5afce2020-08-25 15:50:19 +020046 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 {
Akron7636edf2025-11-04 12:44:53 +010058 @include mixins.cell-info;
Akron7e5afce2020-08-25 15:50:19 +020059 > span {
Akron7636edf2025-11-04 12:44:53 +010060 color: colors.$darkest-orange;
Akron7e5afce2020-08-25 15:50:19 +020061 text-align: right;
62 padding-right: .5em;
63 &::after {
64 content: ":"
65 }
66 }
67 }
68 }
69 }
70
Akron9fe23dc2025-06-11 11:43:50 +020071 td, div {
72 &.notinindex {
Akron7636edf2025-11-04 12:44:53 +010073 background-color: colors.$ids-grey-2 !important;
Akron9fe23dc2025-06-11 11:43:50 +020074 cursor: default;
75 }
76 }
77
Akron7e5afce2020-08-25 15:50:19 +020078 tr {
79 outline: none;
80
81 // equal to dd.chosen
82 td.chosen,
83 th.chosen,
84 div.chosen {
Akron7636edf2025-11-04 12:44:53 +010085 background-color: colors.$light-green !important;
86 color: colors.$nearly-white;
Akron7e5afce2020-08-25 15:50:19 +020087 }
88
89 /**
90 * The first two columns.
91 */
92 > th:nth-of-type(1),
93 > th:nth-of-type(2) {
Akron7636edf2025-11-04 12:44:53 +010094 @include mixins.matchinfo-head;
Akron7e5afce2020-08-25 15:50:19 +020095 position: absolute;
96 z-index: 80;
97 vertical-align: middle;
98 left: 0px;
99 }
100
101 > th:nth-of-type(2) {
Akron7636edf2025-11-04 12:44:53 +0100102 left: math.div(lengths.$left-width,2) + lengths.$border-size;
Akron7e5afce2020-08-25 15:50:19 +0200103 }
104
105 // Includes header line as well
106 > * {
Akron7636edf2025-11-04 12:44:53 +0100107 @include mixins.cell-info;
108 border: math.div(lengths.$border-size,2) solid colors.$dark-orange;
Akron7e5afce2020-08-25 15:50:19 +0200109 }
110
111 > td {
Akron7636edf2025-11-04 12:44:53 +0100112 background-color: colors.$middle-orange;
Akron7e5afce2020-08-25 15:50:19 +0200113 white-space: nowrap;
114 vertical-align: top;
115 text-align: center;
116 &.mark {
Akron7636edf2025-11-04 12:44:53 +0100117 background-color: colors.$light-orange;
Akron7e5afce2020-08-25 15:50:19 +0200118 }
119 }
120
121 &:nth-child(even) > td {
Akron7636edf2025-11-04 12:44:53 +0100122 background-color: colors.$light-orange;
Akron7e5afce2020-08-25 15:50:19 +0200123 &.mark {
Akron7636edf2025-11-04 12:44:53 +0100124 background-color: colors.$middle-orange;
Akron7e5afce2020-08-25 15:50:19 +0200125 }
126 }
127 }
128
129 thead th {
Akronc6c68212025-10-22 14:33:51 +0200130 border-top-width: 0px !important;
131 text-align: center;
132
Akronb7749052022-07-22 18:03:26 +0200133 &:not(.no-anno) {
Akron7636edf2025-11-04 12:44:53 +0100134 background-color: colors.$darker-orange;
Akronb7749052022-07-22 18:03:26 +0200135 }
136
Akron7e5afce2020-08-25 15:50:19 +0200137 &:nth-of-type(1),
138 &:nth-of-type(2) {
139 text-align: left;
140 }
141
142 &.mark {
Akron7636edf2025-11-04 12:44:53 +0100143 background-color: colors.$darkest-orange;
Akron7e5afce2020-08-25 15:50:19 +0200144 }
Akronb7749052022-07-22 18:03:26 +0200145
Akron7e5afce2020-08-25 15:50:19 +0200146 &.cutted {
Akron7636edf2025-11-04 12:44:53 +0100147 background-color: colors.$light-orange;
Akron7e5afce2020-08-25 15:50:19 +0200148
149 &::after {
Akron7636edf2025-11-04 12:44:53 +0100150 @include mixins.icon-font;
151 content: icons.$fa-cut;
152 color: colors.$light-green;
Akron7e5afce2020-08-25 15:50:19 +0200153 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}