blob: 4ecd4f820d3cb4c54f1acee6d77c2103ab82b1c6 [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;
17 }
18
Nils Diewalda944fab2015-04-08 21:02:04 +000019 .docGroup {
Akron7e5afce2020-08-25 15:50:19 +020020 position: relative;
21 display: inline-block;
22 margin-left: $left-padding;
23 padding: 4pt 2pt 4pt 0pt;
Akron90654812018-08-29 18:57:23 +020024
Akron7e5afce2020-08-25 15:50:19 +020025 .docGroup {
26 display: block;
27 }
Nils Diewald359a72c2015-04-20 17:40:29 +000028
Nils Diewalda944fab2015-04-08 21:02:04 +000029 border: {
30 radius: $standard-border-radius * 2;
Akron7e5afce2020-08-25 15:50:19 +020031 style: solid;
32 width: 0 $bracket-size;
Nils Diewalda944fab2015-04-08 21:02:04 +000033 }
34
Nils Diewald359a72c2015-04-20 17:40:29 +000035 &[data-operation] {
Akron7e5afce2020-08-25 15:50:19 +020036
Nils Diewald359a72c2015-04-20 17:40:29 +000037 > .doc:first-child::before,
38 > .docGroup:first-child::before {
Akron76c3dd62018-05-29 20:58:27 +020039 content: none;
Nils Diewald359a72c2015-04-20 17:40:29 +000040 }
Akron7e5afce2020-08-25 15:50:19 +020041
Nils Diewald359a72c2015-04-20 17:40:29 +000042 > .doc::before,
43 > .docGroup::before {
Akron7e5afce2020-08-25 15:50:19 +020044 position: absolute;
45 display: inline-block;
46 text-align: right;
47 width: $left-padding;
48 margin-left: -1 * ($left-padding + .5em);
Akron76c3dd62018-05-29 20:58:27 +020049 line-height: 1.5em;
Akron7e5afce2020-08-25 15:50:19 +020050 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000051 }
Akron7e5afce2020-08-25 15:50:19 +020052
Nils Diewald359a72c2015-04-20 17:40:29 +000053 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020054 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
Nils Diewald359a72c2015-04-20 17:40:29 +000055 }
56 }
57
58 // Or operation
59 &[data-operation=or] {
Nils Diewald359a72c2015-04-20 17:40:29 +000060 > .doc::before,
61 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020062 // This will be overruled by JS!
63 content: "or";
Nils Diewald359a72c2015-04-20 17:40:29 +000064 }
65 }
66
67 // And operation
68 &[data-operation=and] {
69 > .doc::before,
70 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020071 // This will be overruled by JS!
72 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +000073 }
74 }
75
76
77 /**
78 * All operators on groups
79 */
Nils Diewalda944fab2015-04-08 21:02:04 +000080 > .operators {
Akron7e5afce2020-08-25 15:50:19 +020081 position: absolute;
82 display: block;
Nils Diewalda944fab2015-04-08 21:02:04 +000083 vertical-align: middle;
Akron7e5afce2020-08-25 15:50:19 +020084 top: 10px;
85 left: 3px;
86 margin-left: 100%;
87 padding: 0;
88
Nils Diewald359a72c2015-04-20 17:40:29 +000089 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +020090 border: {
Akron7e5afce2020-08-25 15:50:19 +020091 top-left-radius: 0;
92 bottom-left-radius: 0;
93 }
Akron76c3dd62018-05-29 20:58:27 +020094 }
Nils Diewalda944fab2015-04-08 21:02:04 +000095 }
Nils Diewalda944fab2015-04-08 21:02:04 +000096 }
97
Akron49f88cc2018-09-11 11:06:19 +020098
Nils Diewald359a72c2015-04-20 17:40:29 +000099 /**
100 * All document rules
101 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000102 .doc {
Akron49f88cc2018-09-11 11:06:19 +0200103 line-height: 170%;
Nils Diewald359a72c2015-04-20 17:40:29 +0000104 padding-left: $left-padding;
Nils Diewald9c125062015-05-05 23:54:17 +0000105
Akron7e5afce2020-08-25 15:50:19 +0200106 > span {
107
108 + span,
109 + div + span,
110 + ul + span {
111 margin-left: 5pt;
112 }
113
114 &.key,
115 &.value {
116 font-weight: bold;
117 }
118
119 &.value[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200120 font-style: italic;
Akron7e5afce2020-08-25 15:50:19 +0200121
Akron76c3dd62018-05-29 20:58:27 +0200122 &::after,
123 &::before {
124 content: '/';
125 }
Nils Diewald9c125062015-05-05 23:54:17 +0000126 }
Akron7e5afce2020-08-25 15:50:19 +0200127
128 &.key {
129 position: relative;
130
131 > ul {
132 margin: 0;
133 margin-left: 3.3em;
134 }
135
136 &.fixed {
137 color: $light-green;
138 }
139 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000140 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000141
Akronebc96662018-08-29 17:36:20 +0200142 // Unspecified value
Akron7e5afce2020-08-25 15:50:19 +0200143 &.unspecified > span,
144 span.unspecified {
145 @include choose-item;
146 padding: 0 4px;
Akronebc96662018-08-29 17:36:20 +0200147 box-shadow: $choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +0200148
Akronebc96662018-08-29 17:36:20 +0200149 border: {
Akron7e5afce2020-08-25 15:50:19 +0200150 style: solid;
151 width: $border-size;
Akronebc96662018-08-29 17:36:20 +0200152 radius: $standard-border-radius;
153 }
Akronebc96662018-08-29 17:36:20 +0200154 }
155
Akron7e5afce2020-08-25 15:50:19 +0200156 // All operators on docs
Nils Diewalda944fab2015-04-08 21:02:04 +0000157 > .operators {
Akron7e5afce2020-08-25 15:50:19 +0200158 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000159 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000160 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000161 }
162
Akron7e5afce2020-08-25 15:50:19 +0200163 .rewritten .rewrite {
164 display: inline-block;
165 margin-left: 4pt;
166 color: $dark-orange;
167 &::after {
168 @include icon-font;
169 font-style: normal;
170 font-weight: normal;
171 content: $fa-rewrite;
172 text-decoration: underline;
173 }
174
175 > span {
176 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000177 }
178 }
179
Nils Diewald359a72c2015-04-20 17:40:29 +0000180 /**
181 * All operators
182 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000183 .operators {
Akron7e5afce2020-08-25 15:50:19 +0200184 opacity: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000185 white-space: nowrap;
Akron7e5afce2020-08-25 15:50:19 +0200186 padding: 0;
187 font-size: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000188 line-height: 0;
Akron7e5afce2020-08-25 15:50:19 +0200189 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000190 }
191
192 > .docGroup {
193 margin-left: 0;
194 }
195
Nils Diewald4c221252015-04-21 20:19:25 +0000196 .menu {
197 display: inline-block;
198 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000199
Akron7e5afce2020-08-25 15:50:19 +0200200 // referTo entries
201 .menu li[data-type=ref]::before,
202 span.key.ref::before {
203 @include icon-font;
204 content: $fa-referto;
Akrond82e42a2018-08-22 17:08:59 +0200205 padding-right: 4pt;
Akron548ee672020-10-19 17:41:20 +0200206 font: {
207 style: normal;
208 weight: normal;
209 }
Akron49f88cc2018-09-11 11:06:19 +0200210 }
Akron3ad46942018-08-22 16:47:14 +0200211
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000212 div.value {
Akron7e5afce2020-08-25 15:50:19 +0200213 position: absolute;
214 display: inline-block;
215 z-index: 8000;
216 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200217 margin-top: -6pt;
Akron7e5afce2020-08-25 15:50:19 +0200218
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000219 border: {
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000220 radius: $standard-border-radius;
Akron7e5afce2020-08-25 15:50:19 +0200221 width: $border-size;
222 style: solid;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000223 }
Akron7e5afce2020-08-25 15:50:19 +0200224
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000225 input {
226 border-width: 0;
227 }
Akron7e5afce2020-08-25 15:50:19 +0200228
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000229 > div {
Akron7e5afce2020-08-25 15:50:19 +0200230 @include choose-item;
231 display: inline-block;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000232 padding: 2pt;
Akron7e5afce2020-08-25 15:50:19 +0200233
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000234 font: {
Akron7e5afce2020-08-25 15:50:19 +0200235 size: 80%;
Akron76c3dd62018-05-29 20:58:27 +0200236 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000237 }
Akron7e5afce2020-08-25 15:50:19 +0200238
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000239 border: {
Akron7e5afce2020-08-25 15:50:19 +0200240 width: $border-size;
241 style: solid;
Akron76c3dd62018-05-29 20:58:27 +0200242 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000243 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000244 }
Akron7e5afce2020-08-25 15:50:19 +0200245
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000246 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000247 > input {
Akron76c3dd62018-05-29 20:58:27 +0200248 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000249 }
250
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000251 > div {
Akron76c3dd62018-05-29 20:58:27 +0200252 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000253 }
254 }
255 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000256}
257
Akron7e5afce2020-08-25 15:50:19 +0200258/* Rules for vcs excluding fragments,
259 * i.e. includingy dynamic changes.
260 */
Akron49f88cc2018-09-11 11:06:19 +0200261.vc:not(.fragment) {
Akron7e5afce2020-08-25 15:50:19 +0200262
263 .docGroup,
264 .doc {
Akron49f88cc2018-09-11 11:06:19 +0200265 color: $dark-grey;
Akron49f88cc2018-09-11 11:06:19 +0200266 }
267
268 /**
269 * Rules for all docGroups
270 */
271 // Whiten on hover
272 .docGroup:hover {
Akron49f88cc2018-09-11 11:06:19 +0200273 background-color: rgba(255,255,255,.3);
274 }
275
Akron49f88cc2018-09-11 11:06:19 +0200276 .doc > span:not(.fixed) {
277 cursor: pointer;
278 &:hover {
Akron49f88cc2018-09-11 11:06:19 +0200279 color: $dark-orange;
280 }
281 }
282
Akron7e5afce2020-08-25 15:50:19 +0200283 // Unspecified value
284 .doc.unspecified > span,
285 span.unspecified {
286 &:hover {
287 @include choose-hover;
288 }
Akron49f88cc2018-09-11 11:06:19 +0200289 }
Akron7e5afce2020-08-25 15:50:19 +0200290
Akron49f88cc2018-09-11 11:06:19 +0200291 .doc, .docGroup {
292 &:hover > .operators {
293 opacity: 1;
294 }
295 }
296
297 .docGroup {
298 &[data-operation] {
299 > .doc::before,
300 > .docGroup::before {
Akron49f88cc2018-09-11 11:06:19 +0200301 color: $dark-orange;
302 }
303 }
304 &[data-operation=or] {
305 border-color: $dark-orange;
306 }
307 }
308
309 div.value {
310 @include choose-item;
311 box-shadow: $choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +0200312
313 > div {
314 cursor: pointer;
315 &:hover {
316 @include choose-hover;
317 }
318 }
Akron49f88cc2018-09-11 11:06:19 +0200319 }
320}
321
Nils Diewalda944fab2015-04-08 21:02:04 +0000322
Nils Diewald359a72c2015-04-20 17:40:29 +0000323/**
324 * The z-index cascade for groups.
325 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000326$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000327.docGroup {
328 > .operators {
329 z-index: $dg-index;
330 }
331 .docGroup {
332 > .operators {
333 z-index: $dg-index + 1;
334 }
335 .docGroup {
336 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200337 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000338 }
339 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200340 > .operators {
341 z-index: $dg-index + 3;
342 }
343 .docGroup {
344 > .operators {
345 z-index: $dg-index + 4;
346 }
347 .docGroup {
348 > .operators {
349 z-index: $dg-index + 5;
350 }
351 .docGroup {
352 > .operators {
353 z-index: $dg-index + 6;
354 }
355 }
356 }
357 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000358 }
359 }
360 }
361}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000362
Akron49f88cc2018-09-11 11:06:19 +0200363.vc.fragment {
Akrond45a1702018-11-19 18:15:17 +0100364 > div > div.docGroup {
365 margin-left: 0;
366 }
Akron49f88cc2018-09-11 11:06:19 +0200367 .doc {
368 margin-right: 2em;
369 }
370}
371
Akronc1457bf2015-06-11 19:24:00 +0200372#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000373 line-height: 1em;
374 border-radius: $standard-border-radius;
375}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000376
Akron7e5afce2020-08-25 15:50:19 +0200377#vc-choose > span.rewritten::after {
378 @include icon-font;
379 color: $dark-orange;
380 padding: 0;
381 padding-left: 4px;
382 content: $fa-rewrite;
383 text-decoration: underline;
384 font-style: normal;
385 font-weight: normal;
Akron6bb71582016-06-10 20:41:08 +0200386}
hebastae2ff0702018-06-29 14:26:00 +0200387
Akronec6bb8e2018-08-29 13:07:56 +0200388div#vc-view {
389 position:relative;
Akron7e5afce2020-08-25 15:50:19 +0200390
Akronec6bb8e2018-08-29 13:07:56 +0200391 > div.vc {
Akron7e5afce2020-08-25 15:50:19 +0200392 display: none;
393 margin: 1.3em 0 .5em 0;
394 border: 2px solid $dark-green;
395 background-color: $nearly-white;
396
Akronec6bb8e2018-08-29 13:07:56 +0200397 &.active {
398 display: block;
399 }
Akron7e5afce2020-08-25 15:50:19 +0200400
Akronec6bb8e2018-08-29 13:07:56 +0200401 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200402 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200403 }
hebastae2ff0702018-06-29 14:26:00 +0200404 }
405}
406
Akron2f979122018-07-25 17:00:23 +0200407div.panel.vcinfo {
Akron7e5afce2020-08-25 15:50:19 +0200408 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200409 background-color: $dark-green;
Akron7e5afce2020-08-25 15:50:19 +0200410
Akronec6bb8e2018-08-29 13:07:56 +0200411 div.button-group > span {
412 box-shadow: none;
413 }
hebastae2ff0702018-06-29 14:26:00 +0200414}