blob: bb098f34cd9c0ab647126b38d3752d1713c6f0fe [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$left-padding: 4em; // 32pt; // 2.8em;
Nils Diewalda944fab2015-04-08 21:02:04 +00005$border-size: 2px;
Nils Diewald359a72c2015-04-20 17:40:29 +00006$bracket-size: .4em; // 4pt;
Nils Diewalda944fab2015-04-08 21:02:04 +00007
Nils Diewald359a72c2015-04-20 17:40:29 +00008/**
9 * Virtual Collection Builder
10 */
Akron5c829e92017-05-12 18:10:00 +020011
Akron49f88cc2018-09-11 11:06:19 +020012.vc {
Nils Diewald359a72c2015-04-20 17:40:29 +000013 margin-top: 4pt;
14
Nils Diewalda944fab2015-04-08 21:02:04 +000015 .docGroup {
16 position: relative;
Akron90654812018-08-29 18:57:23 +020017
Nils Diewalda944fab2015-04-08 21:02:04 +000018 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +000019 margin-left: $left-padding; // 28pt
20
21 .docGroup { display: block; }
22
Nils Diewald359a72c2015-04-20 17:40:29 +000023 padding: 4pt 2pt 4pt 0pt;
Nils Diewalda944fab2015-04-08 21:02:04 +000024 border: {
25 radius: $standard-border-radius * 2;
26 style: solid;
Nils Diewald359a72c2015-04-20 17:40:29 +000027 width: 0 $bracket-size; // .6em .5em
Nils Diewalda944fab2015-04-08 21:02:04 +000028 }
29
Nils Diewald359a72c2015-04-20 17:40:29 +000030 &[data-operation] {
31 > .doc:first-child::before,
32 > .docGroup:first-child::before {
Akron76c3dd62018-05-29 20:58:27 +020033 content: none;
Nils Diewald359a72c2015-04-20 17:40:29 +000034 }
35 > .doc::before,
36 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020037 display: inline-block;
38 position: absolute;
39 text-align: right;
40 width: $left-padding;
41 margin-left: -1 * ($left-padding + .5em); // -28pt
Akron76c3dd62018-05-29 20:58:27 +020042 line-height: 1.5em;
43 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000044 }
45 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020046 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
Nils Diewald359a72c2015-04-20 17:40:29 +000047 }
48 }
49
50 // Or operation
51 &[data-operation=or] {
Nils Diewald359a72c2015-04-20 17:40:29 +000052 > .doc::before,
53 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020054 // This will be overruled by JS!
55 content: "or";
Nils Diewald359a72c2015-04-20 17:40:29 +000056 }
57 }
58
59 // And operation
60 &[data-operation=and] {
61 > .doc::before,
62 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020063 // This will be overruled by JS!
64 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +000065 }
66 }
67
68
69 /**
70 * All operators on groups
71 */
Nils Diewalda944fab2015-04-08 21:02:04 +000072 > .operators {
73 position: absolute;
74 display: block;
75 top: 10px;
76 vertical-align: middle;
77 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +000078 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +020079 border: {
80 top-left-radius: 0;
81 bottom-left-radius: 0;
82 }
Nils Diewald359a72c2015-04-20 17:40:29 +000083 }
Nils Diewalda944fab2015-04-08 21:02:04 +000084 margin-left: 100%;
85 padding: 0;
86 }
Nils Diewalda944fab2015-04-08 21:02:04 +000087 }
88
Akron49f88cc2018-09-11 11:06:19 +020089
Nils Diewald359a72c2015-04-20 17:40:29 +000090 /**
91 * All document rules
92 */
Nils Diewalda944fab2015-04-08 21:02:04 +000093 .doc {
Akron49f88cc2018-09-11 11:06:19 +020094 line-height: 170%;
Nils Diewald359a72c2015-04-20 17:40:29 +000095 padding-left: $left-padding;
Nils Diewald4c221252015-04-21 20:19:25 +000096 > span + span,
Akron79452372018-04-11 14:24:19 +020097 > span + div + span,
98 > span + ul + span {
Nils Diewalda944fab2015-04-08 21:02:04 +000099 margin-left: 5pt;
100 }
Nils Diewald9c125062015-05-05 23:54:17 +0000101
Nils Diewalda944fab2015-04-08 21:02:04 +0000102 > span.key,
103 > span.value {
104 font-weight: bold;
Akronb19803c2018-08-16 16:39:42 +0200105 }
106 > span.value {
Nils Diewald9c125062015-05-05 23:54:17 +0000107 &[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200108 font-style: italic;
109 &::after,
110 &::before {
111 content: '/';
112 }
Nils Diewald9c125062015-05-05 23:54:17 +0000113 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000114 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000115
Akronebc96662018-08-29 17:36:20 +0200116 // Unspecified value
117 &.unspecified > span, span.unspecified {
118 padding: 0 4px;
119 box-shadow: $choose-box-shadow;
120 border: {
121 style: solid;
122 width: $border-size;
123 radius: $standard-border-radius;
124 }
125 @include choose-item;
126 &:hover {
127 @include choose-hover;
128 }
129 }
130
Akronb19803c2018-08-16 16:39:42 +0200131 > span.key.fixed {
132 color: $light-green;
133 }
134
Nils Diewald359a72c2015-04-20 17:40:29 +0000135 /**
136 * All operators on docs
137 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000138 > .operators {
139 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000140 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000141 }
142 > span.key {
143 position: relative;
144 > ul {
Akron76c3dd62018-05-29 20:58:27 +0200145 margin: 0;
146 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000147 }
148 }
149 }
150
151 .rewritten {
152 .rewrite {
153 margin-left: 4pt;
154 display: inline-block;
155 color: $dark-orange;
156 &::after {
Akron76c3dd62018-05-29 20:58:27 +0200157 font: {
158 family: FontAwesome;
159 style: normal;
160 weight: normal;
161 }
162 content: $fa-rewrite;
163 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000164 }
Akron76c3dd62018-05-29 20:58:27 +0200165 > span {
166 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000167 }
168 }
169 }
170
Nils Diewald359a72c2015-04-20 17:40:29 +0000171 /**
172 * All operators
173 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000174 .operators {
175 opacity: 0;
176 white-space: nowrap;
177 padding: 0;
178 font-size: 0;
179 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000180 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000181 }
182
183 > .docGroup {
184 margin-left: 0;
185 }
186
Nils Diewald4c221252015-04-21 20:19:25 +0000187 .menu {
188 display: inline-block;
189 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000190
Akron3ad46942018-08-22 16:47:14 +0200191 .menu li[data-type=ref]:before,
192 span.key.ref:before {
193 content: $fa-referto;
194 font-family: 'FontAwesome';
Akrond82e42a2018-08-22 17:08:59 +0200195 padding-right: 4pt;
Akron3ad46942018-08-22 16:47:14 +0200196 style: normal;
197 weight: normal;
Akron49f88cc2018-09-11 11:06:19 +0200198 }
Akron3ad46942018-08-22 16:47:14 +0200199
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000200 div.value {
201 position: absolute;
202 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200203 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000204 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200205 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000206 border: {
207 width: $border-size;
208 style: solid;
209 radius: $standard-border-radius;
210 }
211 input {
212 border-width: 0;
213 }
214 > div {
215 padding: 2pt;
216 cursor: pointer;
217 font: {
Akron76c3dd62018-05-29 20:58:27 +0200218 size: 80%;
219 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000220 }
221 display: inline-block;
222 @include choose-item;
223 border: {
Akron76c3dd62018-05-29 20:58:27 +0200224 width: $border-size;
225 style: solid;
226 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000227 }
228
229 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200230 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000231 }
232 }
233 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000234 > input {
Akron76c3dd62018-05-29 20:58:27 +0200235 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000236 }
237
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000238 > div {
Akron76c3dd62018-05-29 20:58:27 +0200239 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000240 }
241 }
242 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000243}
244
Akron49f88cc2018-09-11 11:06:19 +0200245.vc:not(.fragment) {
246 .docGroup, .doc {
247 // color: $nearly-white;
248 // color: $dark-green;
249 color: $dark-grey;
250 // text-shadow: $light-shadow;
251 }
252
253 /**
254 * Rules for all docGroups
255 */
256 // Whiten on hover
257 .docGroup:hover {
258 // background-color: rgba(255,255,255,.06);
259 background-color: rgba(255,255,255,.3);
260 }
261
262 .doc > span.key.fixed {
263 color: $light-green;
264 }
265
266 .doc > span:not(.fixed) {
267 cursor: pointer;
268 &:hover {
269 // color: $dark-green;
270 color: $dark-orange;
271 }
272 }
273
274 .rewritten .rewrite {
275 color: $dark-orange;
276 }
277
278 .doc, .docGroup {
279 &:hover > .operators {
280 opacity: 1;
281 }
282 }
283
284 .docGroup {
285 &[data-operation] {
286 > .doc::before,
287 > .docGroup::before {
288 // color: $dark-green;
289 color: $dark-orange;
290 }
291 }
292 &[data-operation=or] {
293 border-color: $dark-orange;
294 }
295 }
296
297 div.value {
298 @include choose-item;
299 box-shadow: $choose-box-shadow;
300 }
301}
302
Nils Diewalda944fab2015-04-08 21:02:04 +0000303
Nils Diewald359a72c2015-04-20 17:40:29 +0000304/**
305 * The z-index cascade for groups.
306 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000307$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000308.docGroup {
309 > .operators {
310 z-index: $dg-index;
311 }
312 .docGroup {
313 > .operators {
314 z-index: $dg-index + 1;
315 }
316 .docGroup {
317 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200318 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000319 }
320 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200321 > .operators {
322 z-index: $dg-index + 3;
323 }
324 .docGroup {
325 > .operators {
326 z-index: $dg-index + 4;
327 }
328 .docGroup {
329 > .operators {
330 z-index: $dg-index + 5;
331 }
332 .docGroup {
333 > .operators {
334 z-index: $dg-index + 6;
335 }
336 }
337 }
338 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000339 }
340 }
341 }
342}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000343
Akron49f88cc2018-09-11 11:06:19 +0200344.vc.fragment {
345 .doc {
346 margin-right: 2em;
347 }
348}
349
Akronc1457bf2015-06-11 19:24:00 +0200350#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000351 line-height: 1em;
352 border-radius: $standard-border-radius;
353}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000354
Akronec6bb8e2018-08-29 13:07:56 +0200355/*
Akron2f979122018-07-25 17:00:23 +0200356header #vc-view > div {
357 margin: 1.3em 0 .5em 0;
358}
Akronec6bb8e2018-08-29 13:07:56 +0200359*/
Akron5c829e92017-05-12 18:10:00 +0200360
361#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000362 &::after {
Akron5c829e92017-05-12 18:10:00 +0200363 color: $dark-orange;
364 padding: 0;
365 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200366 font: {
367 family: FontAwesome;
368 style: normal;
369 weight: normal;
370 }
371 content: $fa-rewrite;
372 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000373 }
Akron6bb71582016-06-10 20:41:08 +0200374}
hebastae2ff0702018-06-29 14:26:00 +0200375
Akronec6bb8e2018-08-29 13:07:56 +0200376div#vc-view {
377 position:relative;
378 > div.vc {
379 display: none;
380 &.active {
381 display: block;
382 }
383 margin: 1.3em 0 .5em 0;
384 border: 2px solid $dark-green;
385 background-color: $nearly-white;
386 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200387 // margin: 1.3em;
388 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200389 }
hebastae2ff0702018-06-29 14:26:00 +0200390 }
391}
392
Akron2f979122018-07-25 17:00:23 +0200393div.panel.vcinfo {
394 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200395 background-color: $dark-green;
Akronec6bb8e2018-08-29 13:07:56 +0200396 div.button-group > span {
397 box-shadow: none;
398 }
hebastae2ff0702018-06-29 14:26:00 +0200399}