blob: b9567bd0e9bc950e17fa5381f66a9aa77a719498 [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
Akronebc96662018-08-29 17:36:20 +0200134 // Unspecified value
135 &.unspecified > span, span.unspecified {
136 padding: 0 4px;
137 box-shadow: $choose-box-shadow;
138 border: {
139 style: solid;
140 width: $border-size;
141 radius: $standard-border-radius;
142 }
143 @include choose-item;
144 &:hover {
145 @include choose-hover;
146 }
147 }
148
Akronb19803c2018-08-16 16:39:42 +0200149 > span.key.fixed {
150 color: $light-green;
151 }
152
Nils Diewald359a72c2015-04-20 17:40:29 +0000153 /**
154 * All operators on docs
155 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000156 > .operators {
157 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000158 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000159 }
160 > span.key {
161 position: relative;
162 > ul {
Akron76c3dd62018-05-29 20:58:27 +0200163 margin: 0;
164 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000165 }
166 }
167 }
168
169 .rewritten {
170 .rewrite {
171 margin-left: 4pt;
172 display: inline-block;
173 color: $dark-orange;
174 &::after {
Akron76c3dd62018-05-29 20:58:27 +0200175 font: {
176 family: FontAwesome;
177 style: normal;
178 weight: normal;
179 }
180 content: $fa-rewrite;
181 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000182 }
Akron76c3dd62018-05-29 20:58:27 +0200183 > span {
184 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000185 }
186 }
187 }
188
Akronb19803c2018-08-16 16:39:42 +0200189 .doc > span:not(.fixed) {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000190 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000191 &:hover {
Akron2f979122018-07-25 17:00:23 +0200192 // color: $dark-green;
193 color: $dark-orange;
Nils Diewald4c221252015-04-21 20:19:25 +0000194 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000195 }
196
Nils Diewald359a72c2015-04-20 17:40:29 +0000197 /**
198 * All operators
199 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000200 .operators {
201 opacity: 0;
202 white-space: nowrap;
203 padding: 0;
204 font-size: 0;
205 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000206 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000207 }
208
209 > .docGroup {
210 margin-left: 0;
211 }
212
Nils Diewalda944fab2015-04-08 21:02:04 +0000213 .doc, .docGroup {
214 &:hover > .operators {
215 opacity: 1;
216 }
217 }
218
Nils Diewald4c221252015-04-21 20:19:25 +0000219 .menu {
220 display: inline-block;
221 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000222
Akron3ad46942018-08-22 16:47:14 +0200223 .menu li[data-type=ref]:before,
224 span.key.ref:before {
225 content: $fa-referto;
226 font-family: 'FontAwesome';
Akrond82e42a2018-08-22 17:08:59 +0200227 padding-right: 4pt;
Akron3ad46942018-08-22 16:47:14 +0200228 style: normal;
229 weight: normal;
230 }
231
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000232 div.value {
233 position: absolute;
234 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200235 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000236 @include choose-item;
237 box-shadow: $choose-box-shadow;
238 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200239 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000240 border: {
241 width: $border-size;
242 style: solid;
243 radius: $standard-border-radius;
244 }
245 input {
246 border-width: 0;
247 }
248 > div {
249 padding: 2pt;
250 cursor: pointer;
251 font: {
Akron76c3dd62018-05-29 20:58:27 +0200252 size: 80%;
253 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000254 }
255 display: inline-block;
256 @include choose-item;
257 border: {
Akron76c3dd62018-05-29 20:58:27 +0200258 width: $border-size;
259 style: solid;
260 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000261 }
262
263 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200264 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000265 }
266 }
267 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000268 > input {
Akron76c3dd62018-05-29 20:58:27 +0200269 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000270 }
271
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000272 > div {
Akron76c3dd62018-05-29 20:58:27 +0200273 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000274 }
275 }
276 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000277}
278
279
Nils Diewald359a72c2015-04-20 17:40:29 +0000280/**
281 * The z-index cascade for groups.
282 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000283$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000284.docGroup {
285 > .operators {
286 z-index: $dg-index;
287 }
288 .docGroup {
289 > .operators {
290 z-index: $dg-index + 1;
291 }
292 .docGroup {
293 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200294 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000295 }
296 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200297 > .operators {
298 z-index: $dg-index + 3;
299 }
300 .docGroup {
301 > .operators {
302 z-index: $dg-index + 4;
303 }
304 .docGroup {
305 > .operators {
306 z-index: $dg-index + 5;
307 }
308 .docGroup {
309 > .operators {
310 z-index: $dg-index + 6;
311 }
312 }
313 }
314 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000315 }
316 }
317 }
318}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000319
Akronc1457bf2015-06-11 19:24:00 +0200320#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000321 line-height: 1em;
322 border-radius: $standard-border-radius;
323}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000324
Akronec6bb8e2018-08-29 13:07:56 +0200325/*
Akron2f979122018-07-25 17:00:23 +0200326header #vc-view > div {
327 margin: 1.3em 0 .5em 0;
328}
Akronec6bb8e2018-08-29 13:07:56 +0200329*/
Akron5c829e92017-05-12 18:10:00 +0200330
331#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000332 &::after {
Akron5c829e92017-05-12 18:10:00 +0200333 color: $dark-orange;
334 padding: 0;
335 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200336 font: {
337 family: FontAwesome;
338 style: normal;
339 weight: normal;
340 }
341 content: $fa-rewrite;
342 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000343 }
Akron6bb71582016-06-10 20:41:08 +0200344}
hebastae2ff0702018-06-29 14:26:00 +0200345
Akronec6bb8e2018-08-29 13:07:56 +0200346div#vc-view {
347 position:relative;
348 > div.vc {
349 display: none;
350 &.active {
351 display: block;
352 }
353 margin: 1.3em 0 .5em 0;
354 border: 2px solid $dark-green;
355 background-color: $nearly-white;
356 > div:first-child {
357 margin: 1.3em;
358 }
hebastae2ff0702018-06-29 14:26:00 +0200359 }
360}
361
Akron2f979122018-07-25 17:00:23 +0200362div.panel.vcinfo {
363 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200364 background-color: $dark-green;
Akronec6bb8e2018-08-29 13:07:56 +0200365 div.button-group > span {
366 box-shadow: none;
367 }
hebastae2ff0702018-06-29 14:26:00 +0200368}