blob: cdc700b4121862ab553bdbbe8dd495b239af2647 [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;
Akron7e5afce2020-08-25 15:50:19 +0200206 style: normal;
207 weight: normal;
Akron49f88cc2018-09-11 11:06:19 +0200208 }
Akron3ad46942018-08-22 16:47:14 +0200209
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000210 div.value {
Akron7e5afce2020-08-25 15:50:19 +0200211 position: absolute;
212 display: inline-block;
213 z-index: 8000;
214 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200215 margin-top: -6pt;
Akron7e5afce2020-08-25 15:50:19 +0200216
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000217 border: {
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000218 radius: $standard-border-radius;
Akron7e5afce2020-08-25 15:50:19 +0200219 width: $border-size;
220 style: solid;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000221 }
Akron7e5afce2020-08-25 15:50:19 +0200222
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000223 input {
224 border-width: 0;
225 }
Akron7e5afce2020-08-25 15:50:19 +0200226
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000227 > div {
Akron7e5afce2020-08-25 15:50:19 +0200228 @include choose-item;
229 display: inline-block;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000230 padding: 2pt;
Akron7e5afce2020-08-25 15:50:19 +0200231
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000232 font: {
Akron7e5afce2020-08-25 15:50:19 +0200233 size: 80%;
Akron76c3dd62018-05-29 20:58:27 +0200234 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000235 }
Akron7e5afce2020-08-25 15:50:19 +0200236
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000237 border: {
Akron7e5afce2020-08-25 15:50:19 +0200238 width: $border-size;
239 style: solid;
Akron76c3dd62018-05-29 20:58:27 +0200240 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000241 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000242 }
Akron7e5afce2020-08-25 15:50:19 +0200243
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000244 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000245 > input {
Akron76c3dd62018-05-29 20:58:27 +0200246 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000247 }
248
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000249 > div {
Akron76c3dd62018-05-29 20:58:27 +0200250 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000251 }
252 }
253 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000254}
255
Akron7e5afce2020-08-25 15:50:19 +0200256/* Rules for vcs excluding fragments,
257 * i.e. includingy dynamic changes.
258 */
Akron49f88cc2018-09-11 11:06:19 +0200259.vc:not(.fragment) {
Akron7e5afce2020-08-25 15:50:19 +0200260
261 .docGroup,
262 .doc {
Akron49f88cc2018-09-11 11:06:19 +0200263 color: $dark-grey;
Akron49f88cc2018-09-11 11:06:19 +0200264 }
265
266 /**
267 * Rules for all docGroups
268 */
269 // Whiten on hover
270 .docGroup:hover {
Akron49f88cc2018-09-11 11:06:19 +0200271 background-color: rgba(255,255,255,.3);
272 }
273
Akron49f88cc2018-09-11 11:06:19 +0200274 .doc > span:not(.fixed) {
275 cursor: pointer;
276 &:hover {
Akron49f88cc2018-09-11 11:06:19 +0200277 color: $dark-orange;
278 }
279 }
280
Akron7e5afce2020-08-25 15:50:19 +0200281 // Unspecified value
282 .doc.unspecified > span,
283 span.unspecified {
284 &:hover {
285 @include choose-hover;
286 }
Akron49f88cc2018-09-11 11:06:19 +0200287 }
Akron7e5afce2020-08-25 15:50:19 +0200288
Akron49f88cc2018-09-11 11:06:19 +0200289 .doc, .docGroup {
290 &:hover > .operators {
291 opacity: 1;
292 }
293 }
294
295 .docGroup {
296 &[data-operation] {
297 > .doc::before,
298 > .docGroup::before {
Akron49f88cc2018-09-11 11:06:19 +0200299 color: $dark-orange;
300 }
301 }
302 &[data-operation=or] {
303 border-color: $dark-orange;
304 }
305 }
306
307 div.value {
308 @include choose-item;
309 box-shadow: $choose-box-shadow;
Akron7e5afce2020-08-25 15:50:19 +0200310
311 > div {
312 cursor: pointer;
313 &:hover {
314 @include choose-hover;
315 }
316 }
Akron49f88cc2018-09-11 11:06:19 +0200317 }
318}
319
Nils Diewalda944fab2015-04-08 21:02:04 +0000320
Nils Diewald359a72c2015-04-20 17:40:29 +0000321/**
322 * The z-index cascade for groups.
323 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000324$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000325.docGroup {
326 > .operators {
327 z-index: $dg-index;
328 }
329 .docGroup {
330 > .operators {
331 z-index: $dg-index + 1;
332 }
333 .docGroup {
334 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200335 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000336 }
337 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200338 > .operators {
339 z-index: $dg-index + 3;
340 }
341 .docGroup {
342 > .operators {
343 z-index: $dg-index + 4;
344 }
345 .docGroup {
346 > .operators {
347 z-index: $dg-index + 5;
348 }
349 .docGroup {
350 > .operators {
351 z-index: $dg-index + 6;
352 }
353 }
354 }
355 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000356 }
357 }
358 }
359}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000360
Akron49f88cc2018-09-11 11:06:19 +0200361.vc.fragment {
Akrond45a1702018-11-19 18:15:17 +0100362 > div > div.docGroup {
363 margin-left: 0;
364 }
Akron49f88cc2018-09-11 11:06:19 +0200365 .doc {
366 margin-right: 2em;
367 }
368}
369
Akronc1457bf2015-06-11 19:24:00 +0200370#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000371 line-height: 1em;
372 border-radius: $standard-border-radius;
373}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000374
Akron7e5afce2020-08-25 15:50:19 +0200375#vc-choose > span.rewritten::after {
376 @include icon-font;
377 color: $dark-orange;
378 padding: 0;
379 padding-left: 4px;
380 content: $fa-rewrite;
381 text-decoration: underline;
382 font-style: normal;
383 font-weight: normal;
Akron6bb71582016-06-10 20:41:08 +0200384}
hebastae2ff0702018-06-29 14:26:00 +0200385
Akronec6bb8e2018-08-29 13:07:56 +0200386div#vc-view {
387 position:relative;
Akron7e5afce2020-08-25 15:50:19 +0200388
Akronec6bb8e2018-08-29 13:07:56 +0200389 > div.vc {
Akron7e5afce2020-08-25 15:50:19 +0200390 display: none;
391 margin: 1.3em 0 .5em 0;
392 border: 2px solid $dark-green;
393 background-color: $nearly-white;
394
Akronec6bb8e2018-08-29 13:07:56 +0200395 &.active {
396 display: block;
397 }
Akron7e5afce2020-08-25 15:50:19 +0200398
Akronec6bb8e2018-08-29 13:07:56 +0200399 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200400 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200401 }
hebastae2ff0702018-06-29 14:26:00 +0200402 }
403}
404
Akron2f979122018-07-25 17:00:23 +0200405div.panel.vcinfo {
Akron7e5afce2020-08-25 15:50:19 +0200406 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200407 background-color: $dark-green;
Akron7e5afce2020-08-25 15:50:19 +0200408
Akronec6bb8e2018-08-29 13:07:56 +0200409 div.button-group > span {
410 box-shadow: none;
411 }
hebastae2ff0702018-06-29 14:26:00 +0200412}