blob: bc6bb64d6bc8397241dacdc5d08b62da81451019 [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
Akronadab5e52018-08-20 13:50:53 +020012.vc .builder {
Akron2167ff52018-08-29 18:04:06 +020013 overflow-x: auto;
Nils Diewald359a72c2015-04-20 17:40:29 +000014 margin-top: 4pt;
15
Akron2f979122018-07-25 17:00:23 +020016 .docGroup, .doc {
17 // color: $nearly-white;
18 // color: $dark-green;
19 color: $dark-grey;
20 // text-shadow: $light-shadow;
21 }
22
Nils Diewald359a72c2015-04-20 17:40:29 +000023 /**
24 * Rules for all docGroups
25 */
Nils Diewalda944fab2015-04-08 21:02:04 +000026 .docGroup {
27 position: relative;
28 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +000029 margin-left: $left-padding; // 28pt
30
31 .docGroup { display: block; }
32
Nils Diewald359a72c2015-04-20 17:40:29 +000033 padding: 4pt 2pt 4pt 0pt;
Nils Diewalda944fab2015-04-08 21:02:04 +000034 border: {
35 radius: $standard-border-radius * 2;
36 style: solid;
Nils Diewald359a72c2015-04-20 17:40:29 +000037 width: 0 $bracket-size; // .6em .5em
Nils Diewalda944fab2015-04-08 21:02:04 +000038 }
39
hebastae2ff0702018-06-29 14:26:00 +020040
Nils Diewald359a72c2015-04-20 17:40:29 +000041 // Whiten on hover
42 &:hover {
Akron2f979122018-07-25 17:00:23 +020043 // background-color: rgba(255,255,255,.06);
44 background-color: rgba(255,255,255,.3);
Nils Diewalda944fab2015-04-08 21:02:04 +000045 }
46
Nils Diewald359a72c2015-04-20 17:40:29 +000047 &[data-operation] {
48 > .doc:first-child::before,
49 > .docGroup:first-child::before {
Akron76c3dd62018-05-29 20:58:27 +020050 content: none;
Nils Diewald359a72c2015-04-20 17:40:29 +000051 }
52 > .doc::before,
53 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020054 display: inline-block;
55 position: absolute;
56 text-align: right;
57 width: $left-padding;
58 margin-left: -1 * ($left-padding + .5em); // -28pt
Akron2f979122018-07-25 17:00:23 +020059 // color: $dark-green;
60 color: $dark-orange;
Akron76c3dd62018-05-29 20:58:27 +020061 line-height: 1.5em;
62 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000063 }
64 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020065 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
Nils Diewald359a72c2015-04-20 17:40:29 +000066 }
67 }
68
69 // Or operation
70 &[data-operation=or] {
71 border-color: $dark-orange;
72 > .doc::before,
73 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020074 // This will be overruled by JS!
75 content: "or";
Nils Diewald359a72c2015-04-20 17:40:29 +000076 }
77 }
78
79 // And operation
80 &[data-operation=and] {
81 > .doc::before,
82 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020083 // This will be overruled by JS!
84 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +000085 }
86 }
87
88
89 /**
90 * All operators on groups
91 */
Nils Diewalda944fab2015-04-08 21:02:04 +000092 > .operators {
93 position: absolute;
94 display: block;
95 top: 10px;
96 vertical-align: middle;
97 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +000098 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +020099 border: {
100 top-left-radius: 0;
101 bottom-left-radius: 0;
102 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000103 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000104 margin-left: 100%;
105 padding: 0;
106 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000107 }
108
Nils Diewald359a72c2015-04-20 17:40:29 +0000109
110 /**
111 * All document rules
112 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000113 .doc {
Nils Diewald359a72c2015-04-20 17:40:29 +0000114 padding-left: $left-padding;
Nils Diewald4c221252015-04-21 20:19:25 +0000115 > span + span,
Akron79452372018-04-11 14:24:19 +0200116 > span + div + span,
117 > span + ul + span {
Nils Diewalda944fab2015-04-08 21:02:04 +0000118 margin-left: 5pt;
119 }
Nils Diewald9c125062015-05-05 23:54:17 +0000120
Nils Diewalda944fab2015-04-08 21:02:04 +0000121 > span.key,
122 > span.value {
123 font-weight: bold;
Akronb19803c2018-08-16 16:39:42 +0200124 }
125 > span.value {
Nils Diewald9c125062015-05-05 23:54:17 +0000126 &[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200127 font-style: italic;
128 &::after,
129 &::before {
130 content: '/';
131 }
Nils Diewald9c125062015-05-05 23:54:17 +0000132 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000133 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000134
Akronebc96662018-08-29 17:36:20 +0200135 // Unspecified value
136 &.unspecified > span, span.unspecified {
137 padding: 0 4px;
138 box-shadow: $choose-box-shadow;
139 border: {
140 style: solid;
141 width: $border-size;
142 radius: $standard-border-radius;
143 }
144 @include choose-item;
145 &:hover {
146 @include choose-hover;
147 }
148 }
149
Akronb19803c2018-08-16 16:39:42 +0200150 > span.key.fixed {
151 color: $light-green;
152 }
153
Nils Diewald359a72c2015-04-20 17:40:29 +0000154 /**
155 * All operators on docs
156 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000157 > .operators {
158 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000159 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000160 }
161 > span.key {
162 position: relative;
163 > ul {
Akron76c3dd62018-05-29 20:58:27 +0200164 margin: 0;
165 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000166 }
167 }
168 }
169
170 .rewritten {
171 .rewrite {
172 margin-left: 4pt;
173 display: inline-block;
174 color: $dark-orange;
175 &::after {
Akron76c3dd62018-05-29 20:58:27 +0200176 font: {
177 family: FontAwesome;
178 style: normal;
179 weight: normal;
180 }
181 content: $fa-rewrite;
182 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000183 }
Akron76c3dd62018-05-29 20:58:27 +0200184 > span {
185 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000186 }
187 }
188 }
189
Akronb19803c2018-08-16 16:39:42 +0200190 .doc > span:not(.fixed) {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000191 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000192 &:hover {
Akron2f979122018-07-25 17:00:23 +0200193 // color: $dark-green;
194 color: $dark-orange;
Nils Diewald4c221252015-04-21 20:19:25 +0000195 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000196 }
197
Nils Diewald359a72c2015-04-20 17:40:29 +0000198 /**
199 * All operators
200 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000201 .operators {
202 opacity: 0;
203 white-space: nowrap;
204 padding: 0;
205 font-size: 0;
206 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000207 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000208 }
209
210 > .docGroup {
211 margin-left: 0;
212 }
213
Nils Diewalda944fab2015-04-08 21:02:04 +0000214 .doc, .docGroup {
215 &:hover > .operators {
216 opacity: 1;
217 }
218 }
219
Nils Diewald4c221252015-04-21 20:19:25 +0000220 .menu {
221 display: inline-block;
222 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000223
Akron3ad46942018-08-22 16:47:14 +0200224 .menu li[data-type=ref]:before,
225 span.key.ref:before {
226 content: $fa-referto;
227 font-family: 'FontAwesome';
Akrond82e42a2018-08-22 17:08:59 +0200228 padding-right: 4pt;
Akron3ad46942018-08-22 16:47:14 +0200229 style: normal;
230 weight: normal;
231 }
232
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000233 div.value {
234 position: absolute;
235 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200236 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000237 @include choose-item;
238 box-shadow: $choose-box-shadow;
239 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200240 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000241 border: {
242 width: $border-size;
243 style: solid;
244 radius: $standard-border-radius;
245 }
246 input {
247 border-width: 0;
248 }
249 > div {
250 padding: 2pt;
251 cursor: pointer;
252 font: {
Akron76c3dd62018-05-29 20:58:27 +0200253 size: 80%;
254 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000255 }
256 display: inline-block;
257 @include choose-item;
258 border: {
Akron76c3dd62018-05-29 20:58:27 +0200259 width: $border-size;
260 style: solid;
261 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000262 }
263
264 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200265 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000266 }
267 }
268 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000269 > input {
Akron76c3dd62018-05-29 20:58:27 +0200270 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000271 }
272
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000273 > div {
Akron76c3dd62018-05-29 20:58:27 +0200274 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000275 }
276 }
277 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000278}
279
280
Nils Diewald359a72c2015-04-20 17:40:29 +0000281/**
282 * The z-index cascade for groups.
283 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000284$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000285.docGroup {
286 > .operators {
287 z-index: $dg-index;
288 }
289 .docGroup {
290 > .operators {
291 z-index: $dg-index + 1;
292 }
293 .docGroup {
294 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200295 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000296 }
297 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200298 > .operators {
299 z-index: $dg-index + 3;
300 }
301 .docGroup {
302 > .operators {
303 z-index: $dg-index + 4;
304 }
305 .docGroup {
306 > .operators {
307 z-index: $dg-index + 5;
308 }
309 .docGroup {
310 > .operators {
311 z-index: $dg-index + 6;
312 }
313 }
314 }
315 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000316 }
317 }
318 }
319}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000320
Akronc1457bf2015-06-11 19:24:00 +0200321#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000322 line-height: 1em;
323 border-radius: $standard-border-radius;
324}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000325
Akronec6bb8e2018-08-29 13:07:56 +0200326/*
Akron2f979122018-07-25 17:00:23 +0200327header #vc-view > div {
328 margin: 1.3em 0 .5em 0;
329}
Akronec6bb8e2018-08-29 13:07:56 +0200330*/
Akron5c829e92017-05-12 18:10:00 +0200331
332#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000333 &::after {
Akron5c829e92017-05-12 18:10:00 +0200334 color: $dark-orange;
335 padding: 0;
336 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200337 font: {
338 family: FontAwesome;
339 style: normal;
340 weight: normal;
341 }
342 content: $fa-rewrite;
343 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000344 }
Akron6bb71582016-06-10 20:41:08 +0200345}
hebastae2ff0702018-06-29 14:26:00 +0200346
Akronec6bb8e2018-08-29 13:07:56 +0200347div#vc-view {
348 position:relative;
349 > div.vc {
350 display: none;
351 &.active {
352 display: block;
353 }
354 margin: 1.3em 0 .5em 0;
355 border: 2px solid $dark-green;
356 background-color: $nearly-white;
357 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200358 // margin: 1.3em;
359 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200360 }
hebastae2ff0702018-06-29 14:26:00 +0200361 }
362}
363
Akron2f979122018-07-25 17:00:23 +0200364div.panel.vcinfo {
365 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200366 background-color: $dark-green;
Akronec6bb8e2018-08-29 13:07:56 +0200367 div.button-group > span {
368 box-shadow: none;
369 }
hebastae2ff0702018-06-29 14:26:00 +0200370}