blob: 1d0cd0e767aea88d87d70ef8389fbd8c700516a3 [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
Nils Diewalda944fab2015-04-08 21:02:04 +000012.vc {
Nils Diewald359a72c2015-04-20 17:40:29 +000013 margin-top: 4pt;
14
Akron2f979122018-07-25 17:00:23 +020015 .docGroup, .doc {
16 // color: $nearly-white;
17 // color: $dark-green;
18 color: $dark-grey;
19 // text-shadow: $light-shadow;
20 }
21
Nils Diewald359a72c2015-04-20 17:40:29 +000022 /**
23 * Rules for all docGroups
24 */
Nils Diewalda944fab2015-04-08 21:02:04 +000025 .docGroup {
26 position: relative;
27 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +000028 margin-left: $left-padding; // 28pt
29
30 .docGroup { display: block; }
31
Nils Diewald359a72c2015-04-20 17:40:29 +000032 padding: 4pt 2pt 4pt 0pt;
Nils Diewalda944fab2015-04-08 21:02:04 +000033 border: {
34 radius: $standard-border-radius * 2;
35 style: solid;
Nils Diewald359a72c2015-04-20 17:40:29 +000036 width: 0 $bracket-size; // .6em .5em
Nils Diewalda944fab2015-04-08 21:02:04 +000037 }
38
hebastae2ff0702018-06-29 14:26:00 +020039
Nils Diewald359a72c2015-04-20 17:40:29 +000040 // Whiten on hover
41 &:hover {
Akron2f979122018-07-25 17:00:23 +020042 // background-color: rgba(255,255,255,.06);
43 background-color: rgba(255,255,255,.3);
Nils Diewalda944fab2015-04-08 21:02:04 +000044 }
45
Nils Diewald359a72c2015-04-20 17:40:29 +000046 &[data-operation] {
47 > .doc:first-child::before,
48 > .docGroup:first-child::before {
Akron76c3dd62018-05-29 20:58:27 +020049 content: none;
Nils Diewald359a72c2015-04-20 17:40:29 +000050 }
51 > .doc::before,
52 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020053 display: inline-block;
54 position: absolute;
55 text-align: right;
56 width: $left-padding;
57 margin-left: -1 * ($left-padding + .5em); // -28pt
Akron2f979122018-07-25 17:00:23 +020058 // color: $dark-green;
59 color: $dark-orange;
Akron76c3dd62018-05-29 20:58:27 +020060 line-height: 1.5em;
61 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000062 }
63 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020064 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
Nils Diewald359a72c2015-04-20 17:40:29 +000065 }
66 }
67
68 // Or operation
69 &[data-operation=or] {
70 border-color: $dark-orange;
71 > .doc::before,
72 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020073 // This will be overruled by JS!
74 content: "or";
Nils Diewald359a72c2015-04-20 17:40:29 +000075 }
hebastae2ff0702018-06-29 14:26:00 +020076
Akron2f979122018-07-25 17:00:23 +020077 /*
78 &:after {
79 .button-stat {
80 > span {
81 cursor: pointer;
82 box-shadow: $choose-box-shadow;
83 font-size: 9pt;
84 line-height: 1.5em;
85 padding: 0 4px;
86 display: inline-block;
87 @include choose-item;
88 border-style: solid;
89 border-width: $border-size 0;
90 &:hover {
91 @include choose-hover;
92 }
93 &:first-child {
94 border: {
95 left-width: $border-size;
96 right-width: $border-size;
97 }
98 }
99
100 }
101 }
hebastae2ff0702018-06-29 14:26:00 +0200102 }
Akron2f979122018-07-25 17:00:23 +0200103 */
Nils Diewald359a72c2015-04-20 17:40:29 +0000104 }
105
106 // And operation
107 &[data-operation=and] {
108 > .doc::before,
109 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +0200110 // This will be overruled by JS!
111 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +0000112 }
113 }
114
115
116 /**
117 * All operators on groups
118 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000119 > .operators {
120 position: absolute;
121 display: block;
122 top: 10px;
123 vertical-align: middle;
124 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +0000125 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +0200126 border: {
127 top-left-radius: 0;
128 bottom-left-radius: 0;
129 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000130 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000131 margin-left: 100%;
132 padding: 0;
133 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000134 }
135
Nils Diewald359a72c2015-04-20 17:40:29 +0000136
137 /**
138 * All document rules
139 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000140 .doc {
Nils Diewald359a72c2015-04-20 17:40:29 +0000141 padding-left: $left-padding;
Nils Diewald4c221252015-04-21 20:19:25 +0000142 > span + span,
Akron79452372018-04-11 14:24:19 +0200143 > span + div + span,
144 > span + ul + span {
Nils Diewalda944fab2015-04-08 21:02:04 +0000145 margin-left: 5pt;
146 }
Nils Diewald9c125062015-05-05 23:54:17 +0000147
Nils Diewalda944fab2015-04-08 21:02:04 +0000148 > span.key,
149 > span.value {
150 font-weight: bold;
Akronb19803c2018-08-16 16:39:42 +0200151 }
152 > span.value {
Nils Diewald9c125062015-05-05 23:54:17 +0000153 &[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200154 font-style: italic;
155 &::after,
156 &::before {
157 content: '/';
158 }
Nils Diewald9c125062015-05-05 23:54:17 +0000159 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000160 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000161
Akronb19803c2018-08-16 16:39:42 +0200162 > span.key.fixed {
163 color: $light-green;
164 }
165
Nils Diewald359a72c2015-04-20 17:40:29 +0000166 /**
167 * All operators on docs
168 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000169 > .operators {
170 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000171 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000172 }
173 > span.key {
174 position: relative;
175 > ul {
Akron76c3dd62018-05-29 20:58:27 +0200176 margin: 0;
177 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000178 }
179 }
180 }
181
182 .rewritten {
183 .rewrite {
184 margin-left: 4pt;
185 display: inline-block;
186 color: $dark-orange;
187 &::after {
Akron76c3dd62018-05-29 20:58:27 +0200188 font: {
189 family: FontAwesome;
190 style: normal;
191 weight: normal;
192 }
193 content: $fa-rewrite;
194 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000195 }
Akron76c3dd62018-05-29 20:58:27 +0200196 > span {
197 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000198 }
199 }
200 }
201
Akronb19803c2018-08-16 16:39:42 +0200202 .doc > span:not(.fixed) {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000203 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000204 &:hover {
Akron2f979122018-07-25 17:00:23 +0200205 // color: $dark-green;
206 color: $dark-orange;
Nils Diewald4c221252015-04-21 20:19:25 +0000207 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000208 }
209
Nils Diewald359a72c2015-04-20 17:40:29 +0000210 /**
211 * All operators
212 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000213 .operators {
214 opacity: 0;
215 white-space: nowrap;
216 padding: 0;
217 font-size: 0;
218 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000219 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000220 }
221
222 > .docGroup {
223 margin-left: 0;
224 }
225
Nils Diewalda944fab2015-04-08 21:02:04 +0000226 .doc, .docGroup {
227 &:hover > .operators {
228 opacity: 1;
229 }
230 }
231
Nils Diewald4c221252015-04-21 20:19:25 +0000232 .menu {
233 display: inline-block;
234 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000235
Akron3ad46942018-08-22 16:47:14 +0200236 .menu li[data-type=ref]:before,
237 span.key.ref:before {
238 content: $fa-referto;
239 font-family: 'FontAwesome';
Akrond82e42a2018-08-22 17:08:59 +0200240 padding-right: 4pt;
Akron3ad46942018-08-22 16:47:14 +0200241 style: normal;
242 weight: normal;
243 }
244
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000245 div.value {
246 position: absolute;
247 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200248 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000249 @include choose-item;
250 box-shadow: $choose-box-shadow;
251 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200252 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000253 border: {
254 width: $border-size;
255 style: solid;
256 radius: $standard-border-radius;
257 }
258 input {
259 border-width: 0;
260 }
261 > div {
262 padding: 2pt;
263 cursor: pointer;
264 font: {
Akron76c3dd62018-05-29 20:58:27 +0200265 size: 80%;
266 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000267 }
268 display: inline-block;
269 @include choose-item;
270 border: {
Akron76c3dd62018-05-29 20:58:27 +0200271 width: $border-size;
272 style: solid;
273 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000274 }
275
276 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200277 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000278 }
279 }
280 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000281 > input {
Akron76c3dd62018-05-29 20:58:27 +0200282 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000283 }
284
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000285 > div {
Akron76c3dd62018-05-29 20:58:27 +0200286 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000287 }
288 }
289 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000290}
291
292
Nils Diewald359a72c2015-04-20 17:40:29 +0000293/**
294 * The z-index cascade for groups.
295 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000296$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000297.docGroup {
298 > .operators {
299 z-index: $dg-index;
300 }
301 .docGroup {
302 > .operators {
303 z-index: $dg-index + 1;
304 }
305 .docGroup {
306 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200307 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000308 }
309 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200310 > .operators {
311 z-index: $dg-index + 3;
312 }
313 .docGroup {
314 > .operators {
315 z-index: $dg-index + 4;
316 }
317 .docGroup {
318 > .operators {
319 z-index: $dg-index + 5;
320 }
321 .docGroup {
322 > .operators {
323 z-index: $dg-index + 6;
324 }
325 }
326 }
327 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000328 }
329 }
330 }
331}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000332
Akronc1457bf2015-06-11 19:24:00 +0200333#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000334 line-height: 1em;
335 border-radius: $standard-border-radius;
336}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000337
Akron2f979122018-07-25 17:00:23 +0200338header #vc-view > div {
339 margin: 1.3em 0 .5em 0;
340}
341
Akron5c829e92017-05-12 18:10:00 +0200342
343#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000344 &::after {
Akron5c829e92017-05-12 18:10:00 +0200345 color: $dark-orange;
346 padding: 0;
347 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200348 font: {
349 family: FontAwesome;
350 style: normal;
351 weight: normal;
352 }
353 content: $fa-rewrite;
354 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000355 }
Akron6bb71582016-06-10 20:41:08 +0200356}
hebastae2ff0702018-06-29 14:26:00 +0200357
Akron2f979122018-07-25 17:00:23 +0200358div#vc-view > div.vc {
359 border: 2px solid $dark-green;
360 background-color: $nearly-white;
361 > div:first-child {
362 margin: 1.3em;
hebastae2ff0702018-06-29 14:26:00 +0200363 }
364}
365
Akron2f979122018-07-25 17:00:23 +0200366div.panel.vcinfo {
367 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200368 background-color: $dark-green;
Akron2f979122018-07-25 17:00:23 +0200369 /*
370 div.button-group {
371 display: inline-block;
372 margin-right: .5em;
373 > span {
374 position: relative;
375 box-shadow: none;
hebastae2ff0702018-06-29 14:26:00 +0200376 }
hebastae2ff0702018-06-29 14:26:00 +0200377 }
Akron2f979122018-07-25 17:00:23 +0200378*/
hebastae2ff0702018-06-29 14:26:00 +0200379}
380
Akron2f979122018-07-25 17:00:23 +0200381/*
382.button-group.vcstatistic{
383 position:relative;
384 }
385*/