blob: cf70ecc376379a9c2173e11fe796dfe16f0649f1 [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
Akron451ed5e2018-11-12 10:52:33 +010015 .builder {
16 position: initial;
17 }
18
Nils Diewalda944fab2015-04-08 21:02:04 +000019 .docGroup {
20 position: relative;
Akron90654812018-08-29 18:57:23 +020021
Nils Diewalda944fab2015-04-08 21:02:04 +000022 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +000023 margin-left: $left-padding; // 28pt
24
25 .docGroup { display: block; }
26
Nils Diewald359a72c2015-04-20 17:40:29 +000027 padding: 4pt 2pt 4pt 0pt;
Nils Diewalda944fab2015-04-08 21:02:04 +000028 border: {
29 radius: $standard-border-radius * 2;
30 style: solid;
Nils Diewald359a72c2015-04-20 17:40:29 +000031 width: 0 $bracket-size; // .6em .5em
Nils Diewalda944fab2015-04-08 21:02:04 +000032 }
33
Nils Diewald359a72c2015-04-20 17:40:29 +000034 &[data-operation] {
35 > .doc:first-child::before,
36 > .docGroup:first-child::before {
Akron76c3dd62018-05-29 20:58:27 +020037 content: none;
Nils Diewald359a72c2015-04-20 17:40:29 +000038 }
39 > .doc::before,
40 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020041 display: inline-block;
42 position: absolute;
43 text-align: right;
44 width: $left-padding;
45 margin-left: -1 * ($left-padding + .5em); // -28pt
Akron76c3dd62018-05-29 20:58:27 +020046 line-height: 1.5em;
47 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000048 }
49 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020050 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
Nils Diewald359a72c2015-04-20 17:40:29 +000051 }
52 }
53
54 // Or operation
55 &[data-operation=or] {
Nils Diewald359a72c2015-04-20 17:40:29 +000056 > .doc::before,
57 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020058 // This will be overruled by JS!
59 content: "or";
Nils Diewald359a72c2015-04-20 17:40:29 +000060 }
61 }
62
63 // And operation
64 &[data-operation=and] {
65 > .doc::before,
66 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020067 // This will be overruled by JS!
68 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +000069 }
70 }
71
72
73 /**
74 * All operators on groups
75 */
Nils Diewalda944fab2015-04-08 21:02:04 +000076 > .operators {
77 position: absolute;
78 display: block;
79 top: 10px;
80 vertical-align: middle;
81 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +000082 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +020083 border: {
84 top-left-radius: 0;
85 bottom-left-radius: 0;
86 }
Nils Diewald359a72c2015-04-20 17:40:29 +000087 }
Nils Diewalda944fab2015-04-08 21:02:04 +000088 margin-left: 100%;
89 padding: 0;
90 }
Nils Diewalda944fab2015-04-08 21:02:04 +000091 }
92
Akron49f88cc2018-09-11 11:06:19 +020093
Nils Diewald359a72c2015-04-20 17:40:29 +000094 /**
95 * All document rules
96 */
Nils Diewalda944fab2015-04-08 21:02:04 +000097 .doc {
Akron49f88cc2018-09-11 11:06:19 +020098 line-height: 170%;
Nils Diewald359a72c2015-04-20 17:40:29 +000099 padding-left: $left-padding;
Nils Diewald4c221252015-04-21 20:19:25 +0000100 > span + span,
Akron79452372018-04-11 14:24:19 +0200101 > span + div + span,
102 > span + ul + span {
Nils Diewalda944fab2015-04-08 21:02:04 +0000103 margin-left: 5pt;
104 }
Nils Diewald9c125062015-05-05 23:54:17 +0000105
Nils Diewalda944fab2015-04-08 21:02:04 +0000106 > span.key,
107 > span.value {
108 font-weight: bold;
Akronb19803c2018-08-16 16:39:42 +0200109 }
110 > span.value {
Nils Diewald9c125062015-05-05 23:54:17 +0000111 &[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200112 font-style: italic;
113 &::after,
114 &::before {
115 content: '/';
116 }
Nils Diewald9c125062015-05-05 23:54:17 +0000117 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000118 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000119
Akronebc96662018-08-29 17:36:20 +0200120 // Unspecified value
121 &.unspecified > span, span.unspecified {
122 padding: 0 4px;
123 box-shadow: $choose-box-shadow;
124 border: {
125 style: solid;
126 width: $border-size;
127 radius: $standard-border-radius;
128 }
129 @include choose-item;
130 &:hover {
131 @include choose-hover;
132 }
133 }
134
Akronb19803c2018-08-16 16:39:42 +0200135 > span.key.fixed {
136 color: $light-green;
137 }
138
Nils Diewald359a72c2015-04-20 17:40:29 +0000139 /**
140 * All operators on docs
141 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000142 > .operators {
143 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000144 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000145 }
146 > span.key {
147 position: relative;
148 > ul {
Akron76c3dd62018-05-29 20:58:27 +0200149 margin: 0;
150 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000151 }
152 }
153 }
154
155 .rewritten {
156 .rewrite {
157 margin-left: 4pt;
158 display: inline-block;
159 color: $dark-orange;
160 &::after {
Akron76c3dd62018-05-29 20:58:27 +0200161 font: {
162 family: FontAwesome;
163 style: normal;
164 weight: normal;
165 }
166 content: $fa-rewrite;
167 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000168 }
Akron76c3dd62018-05-29 20:58:27 +0200169 > span {
170 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000171 }
172 }
173 }
174
Nils Diewald359a72c2015-04-20 17:40:29 +0000175 /**
176 * All operators
177 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000178 .operators {
179 opacity: 0;
180 white-space: nowrap;
181 padding: 0;
182 font-size: 0;
183 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000184 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000185 }
186
187 > .docGroup {
188 margin-left: 0;
189 }
190
Nils Diewald4c221252015-04-21 20:19:25 +0000191 .menu {
192 display: inline-block;
193 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000194
Akron3ad46942018-08-22 16:47:14 +0200195 .menu li[data-type=ref]:before,
196 span.key.ref:before {
197 content: $fa-referto;
198 font-family: 'FontAwesome';
Akrond82e42a2018-08-22 17:08:59 +0200199 padding-right: 4pt;
Akron3ad46942018-08-22 16:47:14 +0200200 style: normal;
201 weight: normal;
Akron49f88cc2018-09-11 11:06:19 +0200202 }
Akron3ad46942018-08-22 16:47:14 +0200203
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000204 div.value {
205 position: absolute;
206 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200207 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000208 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200209 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000210 border: {
211 width: $border-size;
212 style: solid;
213 radius: $standard-border-radius;
214 }
215 input {
216 border-width: 0;
217 }
218 > div {
219 padding: 2pt;
220 cursor: pointer;
221 font: {
Akron76c3dd62018-05-29 20:58:27 +0200222 size: 80%;
223 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000224 }
225 display: inline-block;
226 @include choose-item;
227 border: {
Akron76c3dd62018-05-29 20:58:27 +0200228 width: $border-size;
229 style: solid;
230 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000231 }
232
233 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200234 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000235 }
236 }
237 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000238 > input {
Akron76c3dd62018-05-29 20:58:27 +0200239 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000240 }
241
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000242 > div {
Akron76c3dd62018-05-29 20:58:27 +0200243 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000244 }
245 }
246 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000247}
248
Akron49f88cc2018-09-11 11:06:19 +0200249.vc:not(.fragment) {
250 .docGroup, .doc {
251 // color: $nearly-white;
252 // color: $dark-green;
253 color: $dark-grey;
254 // text-shadow: $light-shadow;
255 }
256
257 /**
258 * Rules for all docGroups
259 */
260 // Whiten on hover
261 .docGroup:hover {
262 // background-color: rgba(255,255,255,.06);
263 background-color: rgba(255,255,255,.3);
264 }
265
266 .doc > span.key.fixed {
267 color: $light-green;
268 }
269
270 .doc > span:not(.fixed) {
271 cursor: pointer;
272 &:hover {
273 // color: $dark-green;
274 color: $dark-orange;
275 }
276 }
277
278 .rewritten .rewrite {
279 color: $dark-orange;
280 }
281
282 .doc, .docGroup {
283 &:hover > .operators {
284 opacity: 1;
285 }
286 }
287
288 .docGroup {
289 &[data-operation] {
290 > .doc::before,
291 > .docGroup::before {
292 // color: $dark-green;
293 color: $dark-orange;
294 }
295 }
296 &[data-operation=or] {
297 border-color: $dark-orange;
298 }
299 }
300
301 div.value {
302 @include choose-item;
303 box-shadow: $choose-box-shadow;
304 }
305}
306
Nils Diewalda944fab2015-04-08 21:02:04 +0000307
Nils Diewald359a72c2015-04-20 17:40:29 +0000308/**
309 * The z-index cascade for groups.
310 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000311$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000312.docGroup {
313 > .operators {
314 z-index: $dg-index;
315 }
316 .docGroup {
317 > .operators {
318 z-index: $dg-index + 1;
319 }
320 .docGroup {
321 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200322 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000323 }
324 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200325 > .operators {
326 z-index: $dg-index + 3;
327 }
328 .docGroup {
329 > .operators {
330 z-index: $dg-index + 4;
331 }
332 .docGroup {
333 > .operators {
334 z-index: $dg-index + 5;
335 }
336 .docGroup {
337 > .operators {
338 z-index: $dg-index + 6;
339 }
340 }
341 }
342 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000343 }
344 }
345 }
346}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000347
Akron49f88cc2018-09-11 11:06:19 +0200348.vc.fragment {
349 .doc {
350 margin-right: 2em;
351 }
352}
353
Akronc1457bf2015-06-11 19:24:00 +0200354#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000355 line-height: 1em;
356 border-radius: $standard-border-radius;
357}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000358
Akronec6bb8e2018-08-29 13:07:56 +0200359/*
Akron2f979122018-07-25 17:00:23 +0200360header #vc-view > div {
361 margin: 1.3em 0 .5em 0;
362}
Akronec6bb8e2018-08-29 13:07:56 +0200363*/
Akron5c829e92017-05-12 18:10:00 +0200364
365#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000366 &::after {
Akron5c829e92017-05-12 18:10:00 +0200367 color: $dark-orange;
368 padding: 0;
369 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200370 font: {
371 family: FontAwesome;
372 style: normal;
373 weight: normal;
374 }
375 content: $fa-rewrite;
376 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000377 }
Akron6bb71582016-06-10 20:41:08 +0200378}
hebastae2ff0702018-06-29 14:26:00 +0200379
Akronec6bb8e2018-08-29 13:07:56 +0200380div#vc-view {
381 position:relative;
382 > div.vc {
383 display: none;
384 &.active {
385 display: block;
386 }
387 margin: 1.3em 0 .5em 0;
388 border: 2px solid $dark-green;
389 background-color: $nearly-white;
390 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200391 // margin: 1.3em;
392 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200393 }
hebastae2ff0702018-06-29 14:26:00 +0200394 }
395}
396
Akron2f979122018-07-25 17:00:23 +0200397div.panel.vcinfo {
398 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200399 background-color: $dark-green;
Akronec6bb8e2018-08-29 13:07:56 +0200400 div.button-group > span {
401 box-shadow: none;
402 }
hebastae2ff0702018-06-29 14:26:00 +0200403}