blob: 9057cade9809667865137e42b76b9e0414bef723 [file] [log] [blame]
Nils Diewalda944fab2015-04-08 21:02:04 +00001@charset "utf-8";
Nils Diewaldab4d3ca2015-04-17 01:48:43 +00002@import "../util";
Nils Diewalda944fab2015-04-08 21:02:04 +00003
Nils Diewald359a72c2015-04-20 17:40:29 +00004/**
5 * Virtual Collection Builder
6 */
Akron5c829e92017-05-12 18:10:00 +02007
Akron7e5afce2020-08-25 15:50:19 +02008$left-padding: 4em;
9$bracket-size: .4em;
10
11// Rules for VC view (including fragments)
Akron49f88cc2018-09-11 11:06:19 +020012.vc {
Nils Diewald359a72c2015-04-20 17:40:29 +000013 margin-top: 4pt;
14
Akron451ed5e2018-11-12 10:52:33 +010015 .builder {
16 position: initial;
Uyen-Nhu Tran243fe732024-04-10 01:17:24 +020017
18 + .action {
19 .minimize::after {
20 color: $dark-grey !important;
21 }
22 }
Akron451ed5e2018-11-12 10:52:33 +010023 }
24
Nils Diewalda944fab2015-04-08 21:02:04 +000025 .docGroup {
Akron7e5afce2020-08-25 15:50:19 +020026 position: relative;
27 display: inline-block;
28 margin-left: $left-padding;
29 padding: 4pt 2pt 4pt 0pt;
Akron90654812018-08-29 18:57:23 +020030
Akron7e5afce2020-08-25 15:50:19 +020031 .docGroup {
32 display: block;
33 }
Nils Diewald359a72c2015-04-20 17:40:29 +000034
Nils Diewalda944fab2015-04-08 21:02:04 +000035 border: {
36 radius: $standard-border-radius * 2;
Akron7e5afce2020-08-25 15:50:19 +020037 style: solid;
38 width: 0 $bracket-size;
Nils Diewalda944fab2015-04-08 21:02:04 +000039 }
40
Nils Diewald359a72c2015-04-20 17:40:29 +000041 &[data-operation] {
Akron7e5afce2020-08-25 15:50:19 +020042
Nils Diewald359a72c2015-04-20 17:40:29 +000043 > .doc:first-child::before,
44 > .docGroup:first-child::before {
Akron76c3dd62018-05-29 20:58:27 +020045 content: none;
Nils Diewald359a72c2015-04-20 17:40:29 +000046 }
Akron7e5afce2020-08-25 15:50:19 +020047
Nils Diewald359a72c2015-04-20 17:40:29 +000048 > .doc::before,
49 > .docGroup::before {
Akron7e5afce2020-08-25 15:50:19 +020050 position: absolute;
51 display: inline-block;
52 text-align: right;
53 width: $left-padding;
54 margin-left: -1 * ($left-padding + .5em);
Akron76c3dd62018-05-29 20:58:27 +020055 line-height: 1.5em;
Akron7e5afce2020-08-25 15:50:19 +020056 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000057 }
Akron7e5afce2020-08-25 15:50:19 +020058
Nils Diewald359a72c2015-04-20 17:40:29 +000059 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020060 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
Nils Diewald359a72c2015-04-20 17:40:29 +000061 }
62 }
63
64 // Or operation
65 &[data-operation=or] {
Nils Diewald359a72c2015-04-20 17:40:29 +000066 > .doc::before,
67 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020068 // This will be overruled by JS!
69 content: "or";
Nils Diewald359a72c2015-04-20 17:40:29 +000070 }
71 }
72
73 // And operation
74 &[data-operation=and] {
75 > .doc::before,
76 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020077 // This will be overruled by JS!
78 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +000079 }
80 }
81
82
83 /**
84 * All operators on groups
85 */
Nils Diewalda944fab2015-04-08 21:02:04 +000086 > .operators {
Akron7e5afce2020-08-25 15:50:19 +020087 position: absolute;
88 display: block;
Nils Diewalda944fab2015-04-08 21:02:04 +000089 vertical-align: middle;
Akron7e5afce2020-08-25 15:50:19 +020090 top: 10px;
91 left: 3px;
92 margin-left: 100%;
93 padding: 0;
94
Nils Diewald359a72c2015-04-20 17:40:29 +000095 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +020096 border: {
Akron7e5afce2020-08-25 15:50:19 +020097 top-left-radius: 0;
98 bottom-left-radius: 0;
99 }
Akron76c3dd62018-05-29 20:58:27 +0200100 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000101 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000102 }
103
Akron49f88cc2018-09-11 11:06:19 +0200104
Nils Diewald359a72c2015-04-20 17:40:29 +0000105 /**
106 * All document rules
107 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000108 .doc {
Akron49f88cc2018-09-11 11:06:19 +0200109 line-height: 170%;
Nils Diewald359a72c2015-04-20 17:40:29 +0000110 padding-left: $left-padding;
Nils Diewald9c125062015-05-05 23:54:17 +0000111
Akron7e5afce2020-08-25 15:50:19 +0200112 > span {
113
114 + span,
115 + div + span,
116 + ul + span {
117 margin-left: 5pt;
118 }
119
120 &.key,
121 &.value {
122 font-weight: bold;
123 }
124
125 &.value[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200126 font-style: italic;
Akron7e5afce2020-08-25 15:50:19 +0200127
Akron76c3dd62018-05-29 20:58:27 +0200128 &::after,
129 &::before {
130 content: '/';
131 }
Nils Diewald9c125062015-05-05 23:54:17 +0000132 }
Akron7e5afce2020-08-25 15:50:19 +0200133
134 &.key {
135 position: relative;
136
137 > ul {
138 margin: 0;
139 margin-left: 3.3em;
140 }
141
142 &.fixed {
143 color: $light-green;
144 }
145 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000146 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000147
Akronebc96662018-08-29 17:36:20 +0200148 // Unspecified value
Akron7e5afce2020-08-25 15:50:19 +0200149 &.unspecified > span,
150 span.unspecified {
151 @include choose-item;
152 padding: 0 4px;
Akronebc96662018-08-29 17:36:20 +0200153 box-shadow: $choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +0200154
Akronebc96662018-08-29 17:36:20 +0200155 border: {
Akron7e5afce2020-08-25 15:50:19 +0200156 style: solid;
157 width: $border-size;
Akronebc96662018-08-29 17:36:20 +0200158 radius: $standard-border-radius;
159 }
Akronebc96662018-08-29 17:36:20 +0200160 }
161
Akron7e5afce2020-08-25 15:50:19 +0200162 // All operators on docs
Nils Diewalda944fab2015-04-08 21:02:04 +0000163 > .operators {
Akron7e5afce2020-08-25 15:50:19 +0200164 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000165 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000166 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000167 }
168
Akron7e5afce2020-08-25 15:50:19 +0200169 .rewritten .rewrite {
170 display: inline-block;
171 margin-left: 4pt;
172 color: $dark-orange;
173 &::after {
174 @include icon-font;
175 font-style: normal;
176 font-weight: normal;
177 content: $fa-rewrite;
178 text-decoration: underline;
179 }
180
181 > span {
182 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000183 }
184 }
185
Nils Diewald359a72c2015-04-20 17:40:29 +0000186 /**
187 * All operators
188 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000189 .operators {
Akron7e5afce2020-08-25 15:50:19 +0200190 opacity: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000191 white-space: nowrap;
Akron7e5afce2020-08-25 15:50:19 +0200192 padding: 0;
193 font-size: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000194 line-height: 0;
Akron7e5afce2020-08-25 15:50:19 +0200195 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000196 }
197
198 > .docGroup {
199 margin-left: 0;
200 }
201
Nils Diewald4c221252015-04-21 20:19:25 +0000202 .menu {
203 display: inline-block;
204 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000205
Akron7e5afce2020-08-25 15:50:19 +0200206 // referTo entries
207 .menu li[data-type=ref]::before,
208 span.key.ref::before {
209 @include icon-font;
210 content: $fa-referto;
Akrond82e42a2018-08-22 17:08:59 +0200211 padding-right: 4pt;
Akron548ee672020-10-19 17:41:20 +0200212 font: {
213 style: normal;
214 weight: normal;
215 }
Akron49f88cc2018-09-11 11:06:19 +0200216 }
Akron3ad46942018-08-22 16:47:14 +0200217
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000218 div.value {
Akron7e5afce2020-08-25 15:50:19 +0200219 position: absolute;
220 display: inline-block;
Akrondbbe5ee2020-12-03 12:39:46 +0100221 min-width: max-content;
Akron7e5afce2020-08-25 15:50:19 +0200222 z-index: 8000;
223 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200224 margin-top: -6pt;
Akron7e5afce2020-08-25 15:50:19 +0200225
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000226 border: {
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000227 radius: $standard-border-radius;
Akron7e5afce2020-08-25 15:50:19 +0200228 width: $border-size;
229 style: solid;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000230 }
Akron7e5afce2020-08-25 15:50:19 +0200231
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000232 input {
233 border-width: 0;
Akrondbbe5ee2020-12-03 12:39:46 +0100234 outline-width: 0;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000235 }
Akron7e5afce2020-08-25 15:50:19 +0200236
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000237 > div {
Akron7e5afce2020-08-25 15:50:19 +0200238 @include choose-item;
239 display: inline-block;
Akrondbbe5ee2020-12-03 12:39:46 +0100240 padding: 0 4pt;
241 margin-left: 4pt;
Akron7e5afce2020-08-25 15:50:19 +0200242
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000243 font: {
Akron7e5afce2020-08-25 15:50:19 +0200244 size: 80%;
Akron76c3dd62018-05-29 20:58:27 +0200245 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000246 }
Akron7e5afce2020-08-25 15:50:19 +0200247
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000248 border: {
Akron7e5afce2020-08-25 15:50:19 +0200249 width: $border-size;
250 style: solid;
Akron76c3dd62018-05-29 20:58:27 +0200251 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000252 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000253 }
Akron7e5afce2020-08-25 15:50:19 +0200254
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000255 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000256 > input {
Akron76c3dd62018-05-29 20:58:27 +0200257 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000258 }
259
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000260 > div {
Akron76c3dd62018-05-29 20:58:27 +0200261 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000262 }
263 }
264 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000265}
266
Akron7e5afce2020-08-25 15:50:19 +0200267/* Rules for vcs excluding fragments,
268 * i.e. includingy dynamic changes.
269 */
Akron49f88cc2018-09-11 11:06:19 +0200270.vc:not(.fragment) {
Akron7e5afce2020-08-25 15:50:19 +0200271
272 .docGroup,
273 .doc {
Akron49f88cc2018-09-11 11:06:19 +0200274 color: $dark-grey;
Akron49f88cc2018-09-11 11:06:19 +0200275 }
276
277 /**
278 * Rules for all docGroups
279 */
280 // Whiten on hover
281 .docGroup:hover {
Akron49f88cc2018-09-11 11:06:19 +0200282 background-color: rgba(255,255,255,.3);
283 }
284
Akron49f88cc2018-09-11 11:06:19 +0200285 .doc > span:not(.fixed) {
286 cursor: pointer;
287 &:hover {
Akron49f88cc2018-09-11 11:06:19 +0200288 color: $dark-orange;
289 }
290 }
291
Akron7e5afce2020-08-25 15:50:19 +0200292 // Unspecified value
293 .doc.unspecified > span,
294 span.unspecified {
295 &:hover {
296 @include choose-hover;
297 }
Akron49f88cc2018-09-11 11:06:19 +0200298 }
Akron7e5afce2020-08-25 15:50:19 +0200299
Akron49f88cc2018-09-11 11:06:19 +0200300 .doc, .docGroup {
301 &:hover > .operators {
302 opacity: 1;
303 }
304 }
305
306 .docGroup {
307 &[data-operation] {
308 > .doc::before,
309 > .docGroup::before {
Akron49f88cc2018-09-11 11:06:19 +0200310 color: $dark-orange;
311 }
312 }
313 &[data-operation=or] {
314 border-color: $dark-orange;
315 }
316 }
317
318 div.value {
319 @include choose-item;
320 box-shadow: $choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +0200321
322 > div {
323 cursor: pointer;
324 &:hover {
325 @include choose-hover;
326 }
327 }
Akron49f88cc2018-09-11 11:06:19 +0200328 }
329}
330
Nils Diewalda944fab2015-04-08 21:02:04 +0000331
Nils Diewald359a72c2015-04-20 17:40:29 +0000332/**
333 * The z-index cascade for groups.
334 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000335$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000336.docGroup {
337 > .operators {
338 z-index: $dg-index;
339 }
340 .docGroup {
341 > .operators {
342 z-index: $dg-index + 1;
343 }
344 .docGroup {
345 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200346 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000347 }
348 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200349 > .operators {
350 z-index: $dg-index + 3;
351 }
352 .docGroup {
353 > .operators {
354 z-index: $dg-index + 4;
355 }
356 .docGroup {
357 > .operators {
358 z-index: $dg-index + 5;
359 }
360 .docGroup {
361 > .operators {
362 z-index: $dg-index + 6;
363 }
364 }
365 }
366 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000367 }
368 }
369 }
370}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000371
Akron49f88cc2018-09-11 11:06:19 +0200372.vc.fragment {
Akrond45a1702018-11-19 18:15:17 +0100373 > div > div.docGroup {
374 margin-left: 0;
375 }
Akron49f88cc2018-09-11 11:06:19 +0200376 .doc {
377 margin-right: 2em;
378 }
379}
380
Akronc1457bf2015-06-11 19:24:00 +0200381#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000382 line-height: 1em;
383 border-radius: $standard-border-radius;
384}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000385
Akron7e5afce2020-08-25 15:50:19 +0200386#vc-choose > span.rewritten::after {
387 @include icon-font;
388 color: $dark-orange;
389 padding: 0;
390 padding-left: 4px;
391 content: $fa-rewrite;
392 text-decoration: underline;
393 font-style: normal;
394 font-weight: normal;
Akron6bb71582016-06-10 20:41:08 +0200395}
hebastae2ff0702018-06-29 14:26:00 +0200396
Akronec6bb8e2018-08-29 13:07:56 +0200397div#vc-view {
398 position:relative;
Akron7e5afce2020-08-25 15:50:19 +0200399
Akronec6bb8e2018-08-29 13:07:56 +0200400 > div.vc {
Akron7e5afce2020-08-25 15:50:19 +0200401 display: none;
402 margin: 1.3em 0 .5em 0;
403 border: 2px solid $dark-green;
404 background-color: $nearly-white;
405
Akronec6bb8e2018-08-29 13:07:56 +0200406 &.active {
407 display: block;
408 }
Akron7e5afce2020-08-25 15:50:19 +0200409
Akronec6bb8e2018-08-29 13:07:56 +0200410 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200411 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200412 }
hebastae2ff0702018-06-29 14:26:00 +0200413 }
414}
415
Akron2f979122018-07-25 17:00:23 +0200416div.panel.vcinfo {
Akron7e5afce2020-08-25 15:50:19 +0200417 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200418 background-color: $dark-green;
Akron7e5afce2020-08-25 15:50:19 +0200419
Akronec6bb8e2018-08-29 13:07:56 +0200420 div.button-group > span {
421 box-shadow: none;
422 }
hebastae2ff0702018-06-29 14:26:00 +0200423}