blob: edd83e91ced331597420852923b2171d99a77067 [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;
Akrondbbe5ee2020-12-03 12:39:46 +0100215 min-width: max-content;
Akron7e5afce2020-08-25 15:50:19 +0200216 z-index: 8000;
217 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200218 margin-top: -6pt;
Akron7e5afce2020-08-25 15:50:19 +0200219
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000220 border: {
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000221 radius: $standard-border-radius;
Akron7e5afce2020-08-25 15:50:19 +0200222 width: $border-size;
223 style: solid;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000224 }
Akron7e5afce2020-08-25 15:50:19 +0200225
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000226 input {
227 border-width: 0;
Akrondbbe5ee2020-12-03 12:39:46 +0100228 outline-width: 0;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000229 }
Akron7e5afce2020-08-25 15:50:19 +0200230
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000231 > div {
Akron7e5afce2020-08-25 15:50:19 +0200232 @include choose-item;
233 display: inline-block;
Akrondbbe5ee2020-12-03 12:39:46 +0100234 padding: 0 4pt;
235 margin-left: 4pt;
Akron7e5afce2020-08-25 15:50:19 +0200236
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000237 font: {
Akron7e5afce2020-08-25 15:50:19 +0200238 size: 80%;
Akron76c3dd62018-05-29 20:58:27 +0200239 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000240 }
Akron7e5afce2020-08-25 15:50:19 +0200241
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000242 border: {
Akron7e5afce2020-08-25 15:50:19 +0200243 width: $border-size;
244 style: solid;
Akron76c3dd62018-05-29 20:58:27 +0200245 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000246 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000247 }
Akron7e5afce2020-08-25 15:50:19 +0200248
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000249 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000250 > input {
Akron76c3dd62018-05-29 20:58:27 +0200251 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000252 }
253
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000254 > div {
Akron76c3dd62018-05-29 20:58:27 +0200255 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000256 }
257 }
258 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000259}
260
Akron7e5afce2020-08-25 15:50:19 +0200261/* Rules for vcs excluding fragments,
262 * i.e. includingy dynamic changes.
263 */
Akron49f88cc2018-09-11 11:06:19 +0200264.vc:not(.fragment) {
Akron7e5afce2020-08-25 15:50:19 +0200265
266 .docGroup,
267 .doc {
Akron49f88cc2018-09-11 11:06:19 +0200268 color: $dark-grey;
Akron49f88cc2018-09-11 11:06:19 +0200269 }
270
271 /**
272 * Rules for all docGroups
273 */
274 // Whiten on hover
275 .docGroup:hover {
Akron49f88cc2018-09-11 11:06:19 +0200276 background-color: rgba(255,255,255,.3);
277 }
278
Akron49f88cc2018-09-11 11:06:19 +0200279 .doc > span:not(.fixed) {
280 cursor: pointer;
281 &:hover {
Akron49f88cc2018-09-11 11:06:19 +0200282 color: $dark-orange;
283 }
284 }
285
Akron7e5afce2020-08-25 15:50:19 +0200286 // Unspecified value
287 .doc.unspecified > span,
288 span.unspecified {
289 &:hover {
290 @include choose-hover;
291 }
Akron49f88cc2018-09-11 11:06:19 +0200292 }
Akron7e5afce2020-08-25 15:50:19 +0200293
Akron49f88cc2018-09-11 11:06:19 +0200294 .doc, .docGroup {
295 &:hover > .operators {
296 opacity: 1;
297 }
298 }
299
300 .docGroup {
301 &[data-operation] {
302 > .doc::before,
303 > .docGroup::before {
Akron49f88cc2018-09-11 11:06:19 +0200304 color: $dark-orange;
305 }
306 }
307 &[data-operation=or] {
308 border-color: $dark-orange;
309 }
310 }
311
312 div.value {
313 @include choose-item;
314 box-shadow: $choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +0200315
316 > div {
317 cursor: pointer;
318 &:hover {
319 @include choose-hover;
320 }
321 }
Akron49f88cc2018-09-11 11:06:19 +0200322 }
323}
324
Nils Diewalda944fab2015-04-08 21:02:04 +0000325
Nils Diewald359a72c2015-04-20 17:40:29 +0000326/**
327 * The z-index cascade for groups.
328 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000329$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000330.docGroup {
331 > .operators {
332 z-index: $dg-index;
333 }
334 .docGroup {
335 > .operators {
336 z-index: $dg-index + 1;
337 }
338 .docGroup {
339 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200340 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000341 }
342 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200343 > .operators {
344 z-index: $dg-index + 3;
345 }
346 .docGroup {
347 > .operators {
348 z-index: $dg-index + 4;
349 }
350 .docGroup {
351 > .operators {
352 z-index: $dg-index + 5;
353 }
354 .docGroup {
355 > .operators {
356 z-index: $dg-index + 6;
357 }
358 }
359 }
360 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000361 }
362 }
363 }
364}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000365
Akron49f88cc2018-09-11 11:06:19 +0200366.vc.fragment {
Akrond45a1702018-11-19 18:15:17 +0100367 > div > div.docGroup {
368 margin-left: 0;
369 }
Akron49f88cc2018-09-11 11:06:19 +0200370 .doc {
371 margin-right: 2em;
372 }
373}
374
Akronc1457bf2015-06-11 19:24:00 +0200375#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000376 line-height: 1em;
377 border-radius: $standard-border-radius;
378}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000379
Akron7e5afce2020-08-25 15:50:19 +0200380#vc-choose > span.rewritten::after {
381 @include icon-font;
382 color: $dark-orange;
383 padding: 0;
384 padding-left: 4px;
385 content: $fa-rewrite;
386 text-decoration: underline;
387 font-style: normal;
388 font-weight: normal;
Akron6bb71582016-06-10 20:41:08 +0200389}
hebastae2ff0702018-06-29 14:26:00 +0200390
Akronec6bb8e2018-08-29 13:07:56 +0200391div#vc-view {
392 position:relative;
Akron7e5afce2020-08-25 15:50:19 +0200393
Akronec6bb8e2018-08-29 13:07:56 +0200394 > div.vc {
Akron7e5afce2020-08-25 15:50:19 +0200395 display: none;
396 margin: 1.3em 0 .5em 0;
397 border: 2px solid $dark-green;
398 background-color: $nearly-white;
399
Akronec6bb8e2018-08-29 13:07:56 +0200400 &.active {
401 display: block;
402 }
Akron7e5afce2020-08-25 15:50:19 +0200403
Akronec6bb8e2018-08-29 13:07:56 +0200404 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200405 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200406 }
hebastae2ff0702018-06-29 14:26:00 +0200407 }
408}
409
Akron2f979122018-07-25 17:00:23 +0200410div.panel.vcinfo {
Akron7e5afce2020-08-25 15:50:19 +0200411 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200412 background-color: $dark-green;
Akron7e5afce2020-08-25 15:50:19 +0200413
Akronec6bb8e2018-08-29 13:07:56 +0200414 div.button-group > span {
415 box-shadow: none;
416 }
hebastae2ff0702018-06-29 14:26:00 +0200417}