blob: 3b3fd50c1f62da7fdc0df61d4631cb975c0ee9b5 [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
236 div.value {
237 position: absolute;
238 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200239 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000240 @include choose-item;
241 box-shadow: $choose-box-shadow;
242 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200243 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000244 border: {
245 width: $border-size;
246 style: solid;
247 radius: $standard-border-radius;
248 }
249 input {
250 border-width: 0;
251 }
252 > div {
253 padding: 2pt;
254 cursor: pointer;
255 font: {
Akron76c3dd62018-05-29 20:58:27 +0200256 size: 80%;
257 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000258 }
259 display: inline-block;
260 @include choose-item;
261 border: {
Akron76c3dd62018-05-29 20:58:27 +0200262 width: $border-size;
263 style: solid;
264 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000265 }
266
267 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200268 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000269 }
270 }
271 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000272 > input {
Akron76c3dd62018-05-29 20:58:27 +0200273 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000274 }
275
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000276 > div {
Akron76c3dd62018-05-29 20:58:27 +0200277 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000278 }
279 }
280 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000281}
282
283
Nils Diewald359a72c2015-04-20 17:40:29 +0000284/**
285 * The z-index cascade for groups.
286 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000287$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000288.docGroup {
289 > .operators {
290 z-index: $dg-index;
291 }
292 .docGroup {
293 > .operators {
294 z-index: $dg-index + 1;
295 }
296 .docGroup {
297 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200298 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000299 }
300 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200301 > .operators {
302 z-index: $dg-index + 3;
303 }
304 .docGroup {
305 > .operators {
306 z-index: $dg-index + 4;
307 }
308 .docGroup {
309 > .operators {
310 z-index: $dg-index + 5;
311 }
312 .docGroup {
313 > .operators {
314 z-index: $dg-index + 6;
315 }
316 }
317 }
318 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000319 }
320 }
321 }
322}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000323
Akronc1457bf2015-06-11 19:24:00 +0200324#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000325 line-height: 1em;
326 border-radius: $standard-border-radius;
327}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000328
Akron2f979122018-07-25 17:00:23 +0200329header #vc-view > div {
330 margin: 1.3em 0 .5em 0;
331}
332
Akron5c829e92017-05-12 18:10:00 +0200333
334#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000335 &::after {
Akron5c829e92017-05-12 18:10:00 +0200336 color: $dark-orange;
337 padding: 0;
338 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200339 font: {
340 family: FontAwesome;
341 style: normal;
342 weight: normal;
343 }
344 content: $fa-rewrite;
345 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000346 }
Akron6bb71582016-06-10 20:41:08 +0200347}
hebastae2ff0702018-06-29 14:26:00 +0200348
Akron2f979122018-07-25 17:00:23 +0200349div#vc-view > div.vc {
350 border: 2px solid $dark-green;
351 background-color: $nearly-white;
352 > div:first-child {
353 margin: 1.3em;
hebastae2ff0702018-06-29 14:26:00 +0200354 }
355}
356
Akron2f979122018-07-25 17:00:23 +0200357div.panel.vcinfo {
358 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200359 background-color: $dark-green;
Akron2f979122018-07-25 17:00:23 +0200360 /*
361 div.button-group {
362 display: inline-block;
363 margin-right: .5em;
364 > span {
365 position: relative;
366 box-shadow: none;
hebastae2ff0702018-06-29 14:26:00 +0200367 }
hebastae2ff0702018-06-29 14:26:00 +0200368 }
Akron2f979122018-07-25 17:00:23 +0200369*/
hebastae2ff0702018-06-29 14:26:00 +0200370}
371
Akron2f979122018-07-25 17:00:23 +0200372/*
373.button-group.vcstatistic{
374 position:relative;
375 }
376*/