blob: a8acb09a0dbe8e92ec52807f67613c5e9dff69e7 [file] [log] [blame]
Nils Diewalda944fab2015-04-08 21:02:04 +00001@charset "utf-8";
Akron7636edf2025-11-04 12:44:53 +01002@use "../util";
3@use "../base/choose";
4@use "../base/colors";
5@use "../base/icons";
6@use "../base/lengths";
7@use "../base/mixins";
Nils Diewalda944fab2015-04-08 21:02:04 +00008
Nils Diewald359a72c2015-04-20 17:40:29 +00009/**
10 * Virtual Collection Builder
11 */
Akron5c829e92017-05-12 18:10:00 +020012
Akron7e5afce2020-08-25 15:50:19 +020013$left-padding: 4em;
14$bracket-size: .4em;
15
16// Rules for VC view (including fragments)
Akron49f88cc2018-09-11 11:06:19 +020017.vc {
Nils Diewald359a72c2015-04-20 17:40:29 +000018 margin-top: 4pt;
19
Akron451ed5e2018-11-12 10:52:33 +010020 .builder {
21 position: initial;
Uyen-Nhu Tran243fe732024-04-10 01:17:24 +020022
23 + .action {
24 .minimize::after {
Akron7636edf2025-11-04 12:44:53 +010025 color: colors.$dark-grey !important;
Uyen-Nhu Tran243fe732024-04-10 01:17:24 +020026 }
27 }
Akron451ed5e2018-11-12 10:52:33 +010028 }
29
Nils Diewalda944fab2015-04-08 21:02:04 +000030 .docGroup {
Akron7e5afce2020-08-25 15:50:19 +020031 position: relative;
32 display: inline-block;
33 margin-left: $left-padding;
34 padding: 4pt 2pt 4pt 0pt;
Akron90654812018-08-29 18:57:23 +020035
Nils Diewalda944fab2015-04-08 21:02:04 +000036 border: {
Akron7636edf2025-11-04 12:44:53 +010037 radius: lengths.$standard-border-radius * 2;
Akron7e5afce2020-08-25 15:50:19 +020038 style: solid;
39 width: 0 $bracket-size;
Nils Diewalda944fab2015-04-08 21:02:04 +000040 }
41
Akronc6c68212025-10-22 14:33:51 +020042 .docGroup {
43 display: block;
44 }
45
Nils Diewald359a72c2015-04-20 17:40:29 +000046 &[data-operation] {
Akron7e5afce2020-08-25 15:50:19 +020047
Nils Diewald359a72c2015-04-20 17:40:29 +000048 > .doc:first-child::before,
49 > .docGroup:first-child::before {
Akron76c3dd62018-05-29 20:58:27 +020050 content: none;
Nils Diewald359a72c2015-04-20 17:40:29 +000051 }
Akron7e5afce2020-08-25 15:50:19 +020052
Nils Diewald359a72c2015-04-20 17:40:29 +000053 > .doc::before,
54 > .docGroup::before {
Akron7e5afce2020-08-25 15:50:19 +020055 position: absolute;
56 display: inline-block;
57 text-align: right;
58 width: $left-padding;
59 margin-left: -1 * ($left-padding + .5em);
Akron76c3dd62018-05-29 20:58:27 +020060 line-height: 1.5em;
Akron7636edf2025-11-04 12:44:53 +010061 border-top: lengths.$border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000062 }
Akron7e5afce2020-08-25 15:50:19 +020063
Nils Diewald359a72c2015-04-20 17:40:29 +000064 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020065 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
Nils Diewald359a72c2015-04-20 17:40:29 +000066 }
67 }
68
69 // Or operation
70 &[data-operation=or] {
Nils Diewald359a72c2015-04-20 17:40:29 +000071 > .doc::before,
72 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020073 // This will be overruled by JS!
74 content: "or";
Nils Diewald359a72c2015-04-20 17:40:29 +000075 }
76 }
77
78 // And operation
79 &[data-operation=and] {
80 > .doc::before,
81 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020082 // This will be overruled by JS!
83 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +000084 }
85 }
86
87
88 /**
89 * All operators on groups
90 */
Nils Diewalda944fab2015-04-08 21:02:04 +000091 > .operators {
Akron7e5afce2020-08-25 15:50:19 +020092 position: absolute;
93 display: block;
Nils Diewalda944fab2015-04-08 21:02:04 +000094 vertical-align: middle;
Akron7e5afce2020-08-25 15:50:19 +020095 top: 10px;
96 left: 3px;
97 margin-left: 100%;
98 padding: 0;
99
Nils Diewald359a72c2015-04-20 17:40:29 +0000100 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +0200101 border: {
Akron7e5afce2020-08-25 15:50:19 +0200102 top-left-radius: 0;
103 bottom-left-radius: 0;
104 }
Akron76c3dd62018-05-29 20:58:27 +0200105 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000106 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000107 }
108
Akron49f88cc2018-09-11 11:06:19 +0200109
Nils Diewald359a72c2015-04-20 17:40:29 +0000110 /**
111 * All document rules
112 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000113 .doc {
Akron49f88cc2018-09-11 11:06:19 +0200114 line-height: 170%;
Nils Diewald359a72c2015-04-20 17:40:29 +0000115 padding-left: $left-padding;
Nils Diewald9c125062015-05-05 23:54:17 +0000116
Akron7e5afce2020-08-25 15:50:19 +0200117 > span {
118
119 + span,
120 + div + span,
121 + ul + span {
122 margin-left: 5pt;
123 }
124
125 &.key,
126 &.value {
127 font-weight: bold;
128 }
129
130 &.value[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200131 font-style: italic;
Akron7e5afce2020-08-25 15:50:19 +0200132
Akron76c3dd62018-05-29 20:58:27 +0200133 &::after,
134 &::before {
135 content: '/';
136 }
Nils Diewald9c125062015-05-05 23:54:17 +0000137 }
Akron7e5afce2020-08-25 15:50:19 +0200138
139 &.key {
140 position: relative;
141
142 > ul {
143 margin: 0;
144 margin-left: 3.3em;
145 }
146
147 &.fixed {
Akron7636edf2025-11-04 12:44:53 +0100148 color: colors.$light-green;
Akron7e5afce2020-08-25 15:50:19 +0200149 }
150 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000151 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000152
Akronebc96662018-08-29 17:36:20 +0200153 // Unspecified value
Akron7e5afce2020-08-25 15:50:19 +0200154 &.unspecified > span,
155 span.unspecified {
Akron7636edf2025-11-04 12:44:53 +0100156 @include choose.choose-item;
Akron7e5afce2020-08-25 15:50:19 +0200157 padding: 0 4px;
Akron7636edf2025-11-04 12:44:53 +0100158 box-shadow: choose.$choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +0200159
Akronebc96662018-08-29 17:36:20 +0200160 border: {
Akron7e5afce2020-08-25 15:50:19 +0200161 style: solid;
Akron7636edf2025-11-04 12:44:53 +0100162 width: lengths.$border-size;
163 radius: lengths.$standard-border-radius;
Akronebc96662018-08-29 17:36:20 +0200164 }
Akronebc96662018-08-29 17:36:20 +0200165 }
166
Akron7e5afce2020-08-25 15:50:19 +0200167 // All operators on docs
Nils Diewalda944fab2015-04-08 21:02:04 +0000168 > .operators {
Akron7e5afce2020-08-25 15:50:19 +0200169 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000170 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000171 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000172 }
173
Akron7e5afce2020-08-25 15:50:19 +0200174 .rewritten .rewrite {
175 display: inline-block;
176 margin-left: 4pt;
Akron7636edf2025-11-04 12:44:53 +0100177 color: colors.$dark-orange;
Akron7e5afce2020-08-25 15:50:19 +0200178 &::after {
Akron7636edf2025-11-04 12:44:53 +0100179 @include mixins.icon-font;
Akron7e5afce2020-08-25 15:50:19 +0200180 font-style: normal;
181 font-weight: normal;
Akron7636edf2025-11-04 12:44:53 +0100182 content: icons.$fa-rewrite;
Akron7e5afce2020-08-25 15:50:19 +0200183 text-decoration: underline;
184 }
185
186 > span {
187 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000188 }
189 }
190
Nils Diewald359a72c2015-04-20 17:40:29 +0000191 /**
192 * All operators
193 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000194 .operators {
Akron7e5afce2020-08-25 15:50:19 +0200195 opacity: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000196 white-space: nowrap;
Akron7e5afce2020-08-25 15:50:19 +0200197 padding: 0;
198 font-size: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000199 line-height: 0;
Akron7e5afce2020-08-25 15:50:19 +0200200 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000201 }
202
203 > .docGroup {
204 margin-left: 0;
205 }
206
Nils Diewald4c221252015-04-21 20:19:25 +0000207 .menu {
208 display: inline-block;
209 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000210
Akron7e5afce2020-08-25 15:50:19 +0200211 // referTo entries
212 .menu li[data-type=ref]::before,
213 span.key.ref::before {
Akron7636edf2025-11-04 12:44:53 +0100214 @include mixins.icon-font;
215 content: icons.$fa-referto;
Akrond82e42a2018-08-22 17:08:59 +0200216 padding-right: 4pt;
Akron548ee672020-10-19 17:41:20 +0200217 font: {
218 style: normal;
219 weight: normal;
220 }
Akron49f88cc2018-09-11 11:06:19 +0200221 }
Akron3ad46942018-08-22 16:47:14 +0200222
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000223 div.value {
Akron7e5afce2020-08-25 15:50:19 +0200224 position: absolute;
225 display: inline-block;
Akrondbbe5ee2020-12-03 12:39:46 +0100226 min-width: max-content;
Akron7e5afce2020-08-25 15:50:19 +0200227 z-index: 8000;
228 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200229 margin-top: -6pt;
Akron7e5afce2020-08-25 15:50:19 +0200230
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000231 border: {
Akron7636edf2025-11-04 12:44:53 +0100232 radius: lengths.$standard-border-radius;
233 width: lengths.$border-size;
Akron7e5afce2020-08-25 15:50:19 +0200234 style: solid;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000235 }
Akron7e5afce2020-08-25 15:50:19 +0200236
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000237 input {
238 border-width: 0;
Akrondbbe5ee2020-12-03 12:39:46 +0100239 outline-width: 0;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000240 }
Akron7e5afce2020-08-25 15:50:19 +0200241
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000242 > div {
Akron7636edf2025-11-04 12:44:53 +0100243 @include choose.choose-item;
Akron7e5afce2020-08-25 15:50:19 +0200244 display: inline-block;
Akrondbbe5ee2020-12-03 12:39:46 +0100245 padding: 0 4pt;
246 margin-left: 4pt;
Akron7e5afce2020-08-25 15:50:19 +0200247
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000248 font: {
Akron7e5afce2020-08-25 15:50:19 +0200249 size: 80%;
Akron76c3dd62018-05-29 20:58:27 +0200250 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000251 }
Akron7e5afce2020-08-25 15:50:19 +0200252
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000253 border: {
Akron7636edf2025-11-04 12:44:53 +0100254 width: lengths.$border-size;
Akron7e5afce2020-08-25 15:50:19 +0200255 style: solid;
Akron7636edf2025-11-04 12:44:53 +0100256 radius: lengths.$standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000257 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000258 }
Akron7e5afce2020-08-25 15:50:19 +0200259
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000260 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000261 > input {
Akron76c3dd62018-05-29 20:58:27 +0200262 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000263 }
264
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000265 > div {
Akron7636edf2025-11-04 12:44:53 +0100266 @include choose.choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000267 }
268 }
269 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000270}
271
Akron7e5afce2020-08-25 15:50:19 +0200272/* Rules for vcs excluding fragments,
273 * i.e. includingy dynamic changes.
274 */
Akron49f88cc2018-09-11 11:06:19 +0200275.vc:not(.fragment) {
Akron7e5afce2020-08-25 15:50:19 +0200276
277 .docGroup,
278 .doc {
Akron7636edf2025-11-04 12:44:53 +0100279 color: colors.$dark-grey;
Akron49f88cc2018-09-11 11:06:19 +0200280 }
281
282 /**
283 * Rules for all docGroups
284 */
285 // Whiten on hover
286 .docGroup:hover {
Akron49f88cc2018-09-11 11:06:19 +0200287 background-color: rgba(255,255,255,.3);
288 }
289
Akron49f88cc2018-09-11 11:06:19 +0200290 .doc > span:not(.fixed) {
291 cursor: pointer;
292 &:hover {
Akron7636edf2025-11-04 12:44:53 +0100293 color: colors.$dark-orange;
Akron49f88cc2018-09-11 11:06:19 +0200294 }
295 }
296
Akron7e5afce2020-08-25 15:50:19 +0200297 // Unspecified value
298 .doc.unspecified > span,
299 span.unspecified {
300 &:hover {
Akron7636edf2025-11-04 12:44:53 +0100301 @include choose.choose-hover;
Akron7e5afce2020-08-25 15:50:19 +0200302 }
Akron49f88cc2018-09-11 11:06:19 +0200303 }
Akron7e5afce2020-08-25 15:50:19 +0200304
Akron49f88cc2018-09-11 11:06:19 +0200305 .doc, .docGroup {
306 &:hover > .operators {
307 opacity: 1;
308 }
309 }
310
311 .docGroup {
312 &[data-operation] {
313 > .doc::before,
314 > .docGroup::before {
Akron7636edf2025-11-04 12:44:53 +0100315 color: colors.$dark-orange;
Akron49f88cc2018-09-11 11:06:19 +0200316 }
317 }
318 &[data-operation=or] {
Akron7636edf2025-11-04 12:44:53 +0100319 border-color: colors.$dark-orange;
Akron49f88cc2018-09-11 11:06:19 +0200320 }
321 }
322
323 div.value {
Akron7636edf2025-11-04 12:44:53 +0100324 @include choose.choose-item;
325 box-shadow: choose.$choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +0200326
327 > div {
328 cursor: pointer;
329 &:hover {
Akron7636edf2025-11-04 12:44:53 +0100330 @include choose.choose-hover;
Akron7e5afce2020-08-25 15:50:19 +0200331 }
332 }
Akron49f88cc2018-09-11 11:06:19 +0200333 }
334}
335
Nils Diewalda944fab2015-04-08 21:02:04 +0000336
Nils Diewald359a72c2015-04-20 17:40:29 +0000337/**
338 * The z-index cascade for groups.
339 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000340$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000341.docGroup {
342 > .operators {
343 z-index: $dg-index;
344 }
345 .docGroup {
346 > .operators {
347 z-index: $dg-index + 1;
348 }
349 .docGroup {
350 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200351 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000352 }
353 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200354 > .operators {
355 z-index: $dg-index + 3;
356 }
357 .docGroup {
358 > .operators {
359 z-index: $dg-index + 4;
360 }
361 .docGroup {
362 > .operators {
363 z-index: $dg-index + 5;
364 }
365 .docGroup {
366 > .operators {
367 z-index: $dg-index + 6;
368 }
369 }
370 }
371 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000372 }
373 }
374 }
375}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000376
Akron49f88cc2018-09-11 11:06:19 +0200377.vc.fragment {
Akrond45a1702018-11-19 18:15:17 +0100378 > div > div.docGroup {
379 margin-left: 0;
380 }
Akron49f88cc2018-09-11 11:06:19 +0200381 .doc {
382 margin-right: 2em;
383 }
384}
385
Akronc1457bf2015-06-11 19:24:00 +0200386#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000387 line-height: 1em;
Akron7636edf2025-11-04 12:44:53 +0100388 border-radius: lengths.$standard-border-radius;
Nils Diewald7148c6f2015-05-04 15:07:53 +0000389}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000390
Akron7e5afce2020-08-25 15:50:19 +0200391#vc-choose > span.rewritten::after {
Akron7636edf2025-11-04 12:44:53 +0100392 @include mixins.icon-font;
393 color: colors.$dark-orange;
Akron7e5afce2020-08-25 15:50:19 +0200394 padding: 0;
395 padding-left: 4px;
Akron7636edf2025-11-04 12:44:53 +0100396 content: icons.$fa-rewrite;
Akron7e5afce2020-08-25 15:50:19 +0200397 text-decoration: underline;
398 font-style: normal;
399 font-weight: normal;
Akron6bb71582016-06-10 20:41:08 +0200400}
hebastae2ff0702018-06-29 14:26:00 +0200401
Akronec6bb8e2018-08-29 13:07:56 +0200402div#vc-view {
403 position:relative;
Akron7e5afce2020-08-25 15:50:19 +0200404
Akronec6bb8e2018-08-29 13:07:56 +0200405 > div.vc {
Akron7e5afce2020-08-25 15:50:19 +0200406 display: none;
407 margin: 1.3em 0 .5em 0;
Akron7636edf2025-11-04 12:44:53 +0100408 border: 2px solid colors.$dark-green;
409 background-color: colors.$nearly-white;
Akron7e5afce2020-08-25 15:50:19 +0200410
Akronec6bb8e2018-08-29 13:07:56 +0200411 &.active {
412 display: block;
413 }
Akron7e5afce2020-08-25 15:50:19 +0200414
Akronec6bb8e2018-08-29 13:07:56 +0200415 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200416 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200417 }
hebastae2ff0702018-06-29 14:26:00 +0200418 }
419}
420
Akron2f979122018-07-25 17:00:23 +0200421div.panel.vcinfo {
Akron7e5afce2020-08-25 15:50:19 +0200422 padding: 3pt 0pt 3pt 3pt;
Akron7636edf2025-11-04 12:44:53 +0100423 background-color: colors.$dark-green;
Akron7e5afce2020-08-25 15:50:19 +0200424
Akronec6bb8e2018-08-29 13:07:56 +0200425 div.button-group > span {
426 box-shadow: none;
427 }
hebastae2ff0702018-06-29 14:26:00 +0200428}