blob: d880e55790a0bb01fa0111870b9922711d13a937 [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 {
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 }
76 }
77
78 // And operation
79 &[data-operation=and] {
80 > .doc::before,
81 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020082 // This will be overruled by JS!
83 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +000084 }
85 }
86
87
88 /**
89 * All operators on groups
90 */
Nils Diewalda944fab2015-04-08 21:02:04 +000091 > .operators {
92 position: absolute;
93 display: block;
94 top: 10px;
95 vertical-align: middle;
96 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +000097 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +020098 border: {
99 top-left-radius: 0;
100 bottom-left-radius: 0;
101 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000102 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000103 margin-left: 100%;
104 padding: 0;
105 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000106 }
107
Nils Diewald359a72c2015-04-20 17:40:29 +0000108
109 /**
110 * All document rules
111 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000112 .doc {
Nils Diewald359a72c2015-04-20 17:40:29 +0000113 padding-left: $left-padding;
Nils Diewald4c221252015-04-21 20:19:25 +0000114 > span + span,
Akron79452372018-04-11 14:24:19 +0200115 > span + div + span,
116 > span + ul + span {
Nils Diewalda944fab2015-04-08 21:02:04 +0000117 margin-left: 5pt;
118 }
Nils Diewald9c125062015-05-05 23:54:17 +0000119
Nils Diewalda944fab2015-04-08 21:02:04 +0000120 > span.key,
121 > span.value {
122 font-weight: bold;
Akronb19803c2018-08-16 16:39:42 +0200123 }
124 > span.value {
Nils Diewald9c125062015-05-05 23:54:17 +0000125 &[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200126 font-style: italic;
127 &::after,
128 &::before {
129 content: '/';
130 }
Nils Diewald9c125062015-05-05 23:54:17 +0000131 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000132 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000133
Akronb19803c2018-08-16 16:39:42 +0200134 > span.key.fixed {
135 color: $light-green;
136 }
137
Nils Diewald359a72c2015-04-20 17:40:29 +0000138 /**
139 * All operators on docs
140 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000141 > .operators {
142 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000143 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000144 }
145 > span.key {
146 position: relative;
147 > ul {
Akron76c3dd62018-05-29 20:58:27 +0200148 margin: 0;
149 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000150 }
151 }
152 }
153
154 .rewritten {
155 .rewrite {
156 margin-left: 4pt;
157 display: inline-block;
158 color: $dark-orange;
159 &::after {
Akron76c3dd62018-05-29 20:58:27 +0200160 font: {
161 family: FontAwesome;
162 style: normal;
163 weight: normal;
164 }
165 content: $fa-rewrite;
166 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000167 }
Akron76c3dd62018-05-29 20:58:27 +0200168 > span {
169 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000170 }
171 }
172 }
173
Akronb19803c2018-08-16 16:39:42 +0200174 .doc > span:not(.fixed) {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000175 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000176 &:hover {
Akron2f979122018-07-25 17:00:23 +0200177 // color: $dark-green;
178 color: $dark-orange;
Nils Diewald4c221252015-04-21 20:19:25 +0000179 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000180 }
181
Nils Diewald359a72c2015-04-20 17:40:29 +0000182 /**
183 * All operators
184 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000185 .operators {
186 opacity: 0;
187 white-space: nowrap;
188 padding: 0;
189 font-size: 0;
190 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000191 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000192 }
193
194 > .docGroup {
195 margin-left: 0;
196 }
197
Nils Diewalda944fab2015-04-08 21:02:04 +0000198 .doc, .docGroup {
199 &:hover > .operators {
200 opacity: 1;
201 }
202 }
203
Nils Diewald4c221252015-04-21 20:19:25 +0000204 .menu {
205 display: inline-block;
206 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000207
Akron3ad46942018-08-22 16:47:14 +0200208 .menu li[data-type=ref]:before,
209 span.key.ref:before {
210 content: $fa-referto;
211 font-family: 'FontAwesome';
Akrond82e42a2018-08-22 17:08:59 +0200212 padding-right: 4pt;
Akron3ad46942018-08-22 16:47:14 +0200213 style: normal;
214 weight: normal;
215 }
216
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000217 div.value {
218 position: absolute;
219 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200220 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000221 @include choose-item;
222 box-shadow: $choose-box-shadow;
223 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200224 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000225 border: {
226 width: $border-size;
227 style: solid;
228 radius: $standard-border-radius;
229 }
230 input {
231 border-width: 0;
232 }
233 > div {
234 padding: 2pt;
235 cursor: pointer;
236 font: {
Akron76c3dd62018-05-29 20:58:27 +0200237 size: 80%;
238 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000239 }
240 display: inline-block;
241 @include choose-item;
242 border: {
Akron76c3dd62018-05-29 20:58:27 +0200243 width: $border-size;
244 style: solid;
245 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000246 }
247
248 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200249 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000250 }
251 }
252 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000253 > input {
Akron76c3dd62018-05-29 20:58:27 +0200254 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000255 }
256
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000257 > div {
Akron76c3dd62018-05-29 20:58:27 +0200258 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000259 }
260 }
261 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000262}
263
264
Nils Diewald359a72c2015-04-20 17:40:29 +0000265/**
266 * The z-index cascade for groups.
267 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000268$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000269.docGroup {
270 > .operators {
271 z-index: $dg-index;
272 }
273 .docGroup {
274 > .operators {
275 z-index: $dg-index + 1;
276 }
277 .docGroup {
278 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200279 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000280 }
281 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200282 > .operators {
283 z-index: $dg-index + 3;
284 }
285 .docGroup {
286 > .operators {
287 z-index: $dg-index + 4;
288 }
289 .docGroup {
290 > .operators {
291 z-index: $dg-index + 5;
292 }
293 .docGroup {
294 > .operators {
295 z-index: $dg-index + 6;
296 }
297 }
298 }
299 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000300 }
301 }
302 }
303}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000304
Akronc1457bf2015-06-11 19:24:00 +0200305#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000306 line-height: 1em;
307 border-radius: $standard-border-radius;
308}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000309
Akronec6bb8e2018-08-29 13:07:56 +0200310/*
Akron2f979122018-07-25 17:00:23 +0200311header #vc-view > div {
312 margin: 1.3em 0 .5em 0;
313}
Akronec6bb8e2018-08-29 13:07:56 +0200314*/
Akron5c829e92017-05-12 18:10:00 +0200315
316#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000317 &::after {
Akron5c829e92017-05-12 18:10:00 +0200318 color: $dark-orange;
319 padding: 0;
320 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200321 font: {
322 family: FontAwesome;
323 style: normal;
324 weight: normal;
325 }
326 content: $fa-rewrite;
327 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000328 }
Akron6bb71582016-06-10 20:41:08 +0200329}
hebastae2ff0702018-06-29 14:26:00 +0200330
Akronec6bb8e2018-08-29 13:07:56 +0200331div#vc-view {
332 position:relative;
333 > div.vc {
334 display: none;
335 &.active {
336 display: block;
337 }
338 margin: 1.3em 0 .5em 0;
339 border: 2px solid $dark-green;
340 background-color: $nearly-white;
341 > div:first-child {
342 margin: 1.3em;
343 }
hebastae2ff0702018-06-29 14:26:00 +0200344 }
345}
346
Akron2f979122018-07-25 17:00:23 +0200347div.panel.vcinfo {
348 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200349 background-color: $dark-green;
Akronec6bb8e2018-08-29 13:07:56 +0200350 div.button-group > span {
351 box-shadow: none;
352 }
hebastae2ff0702018-06-29 14:26:00 +0200353}