blob: 799a6ef8cac372210adcf52f10badd7cc240a540 [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 {
Akron90654812018-08-29 18:57:23 +020013 position: initial;
14
15 // Unfortunately that does not work:
16 // overflow-x: auto;
Nils Diewald359a72c2015-04-20 17:40:29 +000017 margin-top: 4pt;
18
Akron2f979122018-07-25 17:00:23 +020019 .docGroup, .doc {
20 // color: $nearly-white;
21 // color: $dark-green;
22 color: $dark-grey;
23 // text-shadow: $light-shadow;
24 }
25
Nils Diewald359a72c2015-04-20 17:40:29 +000026 /**
27 * Rules for all docGroups
28 */
Nils Diewalda944fab2015-04-08 21:02:04 +000029 .docGroup {
30 position: relative;
Akron90654812018-08-29 18:57:23 +020031
Nils Diewalda944fab2015-04-08 21:02:04 +000032 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +000033 margin-left: $left-padding; // 28pt
34
35 .docGroup { display: block; }
36
Nils Diewald359a72c2015-04-20 17:40:29 +000037 padding: 4pt 2pt 4pt 0pt;
Nils Diewalda944fab2015-04-08 21:02:04 +000038 border: {
39 radius: $standard-border-radius * 2;
40 style: solid;
Nils Diewald359a72c2015-04-20 17:40:29 +000041 width: 0 $bracket-size; // .6em .5em
Nils Diewalda944fab2015-04-08 21:02:04 +000042 }
43
hebastae2ff0702018-06-29 14:26:00 +020044
Nils Diewald359a72c2015-04-20 17:40:29 +000045 // Whiten on hover
46 &:hover {
Akron2f979122018-07-25 17:00:23 +020047 // background-color: rgba(255,255,255,.06);
48 background-color: rgba(255,255,255,.3);
Nils Diewalda944fab2015-04-08 21:02:04 +000049 }
50
Nils Diewald359a72c2015-04-20 17:40:29 +000051 &[data-operation] {
52 > .doc:first-child::before,
53 > .docGroup:first-child::before {
Akron76c3dd62018-05-29 20:58:27 +020054 content: none;
Nils Diewald359a72c2015-04-20 17:40:29 +000055 }
56 > .doc::before,
57 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020058 display: inline-block;
59 position: absolute;
60 text-align: right;
61 width: $left-padding;
62 margin-left: -1 * ($left-padding + .5em); // -28pt
Akron2f979122018-07-25 17:00:23 +020063 // color: $dark-green;
64 color: $dark-orange;
Akron76c3dd62018-05-29 20:58:27 +020065 line-height: 1.5em;
66 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000067 }
68 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020069 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
Nils Diewald359a72c2015-04-20 17:40:29 +000070 }
71 }
72
73 // Or operation
74 &[data-operation=or] {
75 border-color: $dark-orange;
76 > .doc::before,
77 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020078 // This will be overruled by JS!
79 content: "or";
Nils Diewald359a72c2015-04-20 17:40:29 +000080 }
81 }
82
83 // And operation
84 &[data-operation=and] {
85 > .doc::before,
86 > .docGroup::before {
Akron76c3dd62018-05-29 20:58:27 +020087 // This will be overruled by JS!
88 content: "and";
Nils Diewald359a72c2015-04-20 17:40:29 +000089 }
90 }
91
92
93 /**
94 * All operators on groups
95 */
Nils Diewalda944fab2015-04-08 21:02:04 +000096 > .operators {
97 position: absolute;
98 display: block;
99 top: 10px;
100 vertical-align: middle;
101 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +0000102 > span:first-child {
Akron76c3dd62018-05-29 20:58:27 +0200103 border: {
104 top-left-radius: 0;
105 bottom-left-radius: 0;
106 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000107 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000108 margin-left: 100%;
109 padding: 0;
110 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000111 }
112
Nils Diewald359a72c2015-04-20 17:40:29 +0000113
114 /**
115 * All document rules
116 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000117 .doc {
Nils Diewald359a72c2015-04-20 17:40:29 +0000118 padding-left: $left-padding;
Nils Diewald4c221252015-04-21 20:19:25 +0000119 > span + span,
Akron79452372018-04-11 14:24:19 +0200120 > span + div + span,
121 > span + ul + span {
Nils Diewalda944fab2015-04-08 21:02:04 +0000122 margin-left: 5pt;
123 }
Nils Diewald9c125062015-05-05 23:54:17 +0000124
Nils Diewalda944fab2015-04-08 21:02:04 +0000125 > span.key,
126 > span.value {
127 font-weight: bold;
Akronb19803c2018-08-16 16:39:42 +0200128 }
129 > span.value {
Nils Diewald9c125062015-05-05 23:54:17 +0000130 &[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200131 font-style: italic;
132 &::after,
133 &::before {
134 content: '/';
135 }
Nils Diewald9c125062015-05-05 23:54:17 +0000136 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000137 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000138
Akronebc96662018-08-29 17:36:20 +0200139 // Unspecified value
140 &.unspecified > span, span.unspecified {
141 padding: 0 4px;
142 box-shadow: $choose-box-shadow;
143 border: {
144 style: solid;
145 width: $border-size;
146 radius: $standard-border-radius;
147 }
148 @include choose-item;
149 &:hover {
150 @include choose-hover;
151 }
152 }
153
Akronb19803c2018-08-16 16:39:42 +0200154 > span.key.fixed {
155 color: $light-green;
156 }
157
Nils Diewald359a72c2015-04-20 17:40:29 +0000158 /**
159 * All operators on docs
160 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000161 > .operators {
162 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000163 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000164 }
165 > span.key {
166 position: relative;
167 > ul {
Akron76c3dd62018-05-29 20:58:27 +0200168 margin: 0;
169 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000170 }
171 }
172 }
173
174 .rewritten {
175 .rewrite {
176 margin-left: 4pt;
177 display: inline-block;
178 color: $dark-orange;
179 &::after {
Akron76c3dd62018-05-29 20:58:27 +0200180 font: {
181 family: FontAwesome;
182 style: normal;
183 weight: normal;
184 }
185 content: $fa-rewrite;
186 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000187 }
Akron76c3dd62018-05-29 20:58:27 +0200188 > span {
189 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000190 }
191 }
192 }
193
Akronb19803c2018-08-16 16:39:42 +0200194 .doc > span:not(.fixed) {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000195 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000196 &:hover {
Akron2f979122018-07-25 17:00:23 +0200197 // color: $dark-green;
198 color: $dark-orange;
Nils Diewald4c221252015-04-21 20:19:25 +0000199 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000200 }
201
Nils Diewald359a72c2015-04-20 17:40:29 +0000202 /**
203 * All operators
204 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000205 .operators {
206 opacity: 0;
207 white-space: nowrap;
208 padding: 0;
209 font-size: 0;
210 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000211 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000212 }
213
214 > .docGroup {
215 margin-left: 0;
216 }
217
Nils Diewalda944fab2015-04-08 21:02:04 +0000218 .doc, .docGroup {
219 &:hover > .operators {
220 opacity: 1;
221 }
222 }
223
Nils Diewald4c221252015-04-21 20:19:25 +0000224 .menu {
225 display: inline-block;
226 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000227
Akron3ad46942018-08-22 16:47:14 +0200228 .menu li[data-type=ref]:before,
229 span.key.ref:before {
230 content: $fa-referto;
231 font-family: 'FontAwesome';
Akrond82e42a2018-08-22 17:08:59 +0200232 padding-right: 4pt;
Akron3ad46942018-08-22 16:47:14 +0200233 style: normal;
234 weight: normal;
235 }
236
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000237 div.value {
238 position: absolute;
239 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200240 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000241 @include choose-item;
242 box-shadow: $choose-box-shadow;
243 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200244 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000245 border: {
246 width: $border-size;
247 style: solid;
248 radius: $standard-border-radius;
249 }
250 input {
251 border-width: 0;
252 }
253 > div {
254 padding: 2pt;
255 cursor: pointer;
256 font: {
Akron76c3dd62018-05-29 20:58:27 +0200257 size: 80%;
258 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000259 }
260 display: inline-block;
261 @include choose-item;
262 border: {
Akron76c3dd62018-05-29 20:58:27 +0200263 width: $border-size;
264 style: solid;
265 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000266 }
267
268 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200269 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000270 }
271 }
272 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000273 > input {
Akron76c3dd62018-05-29 20:58:27 +0200274 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000275 }
276
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000277 > div {
Akron76c3dd62018-05-29 20:58:27 +0200278 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000279 }
280 }
281 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000282}
283
284
Nils Diewald359a72c2015-04-20 17:40:29 +0000285/**
286 * The z-index cascade for groups.
287 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000288$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000289.docGroup {
290 > .operators {
291 z-index: $dg-index;
292 }
293 .docGroup {
294 > .operators {
295 z-index: $dg-index + 1;
296 }
297 .docGroup {
298 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200299 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000300 }
301 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200302 > .operators {
303 z-index: $dg-index + 3;
304 }
305 .docGroup {
306 > .operators {
307 z-index: $dg-index + 4;
308 }
309 .docGroup {
310 > .operators {
311 z-index: $dg-index + 5;
312 }
313 .docGroup {
314 > .operators {
315 z-index: $dg-index + 6;
316 }
317 }
318 }
319 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000320 }
321 }
322 }
323}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000324
Akronc1457bf2015-06-11 19:24:00 +0200325#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000326 line-height: 1em;
327 border-radius: $standard-border-radius;
328}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000329
Akronec6bb8e2018-08-29 13:07:56 +0200330/*
Akron2f979122018-07-25 17:00:23 +0200331header #vc-view > div {
332 margin: 1.3em 0 .5em 0;
333}
Akronec6bb8e2018-08-29 13:07:56 +0200334*/
Akron5c829e92017-05-12 18:10:00 +0200335
336#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000337 &::after {
Akron5c829e92017-05-12 18:10:00 +0200338 color: $dark-orange;
339 padding: 0;
340 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200341 font: {
342 family: FontAwesome;
343 style: normal;
344 weight: normal;
345 }
346 content: $fa-rewrite;
347 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000348 }
Akron6bb71582016-06-10 20:41:08 +0200349}
hebastae2ff0702018-06-29 14:26:00 +0200350
Akronec6bb8e2018-08-29 13:07:56 +0200351div#vc-view {
352 position:relative;
353 > div.vc {
354 display: none;
355 &.active {
356 display: block;
357 }
358 margin: 1.3em 0 .5em 0;
359 border: 2px solid $dark-green;
360 background-color: $nearly-white;
361 > div:first-child {
Akron2167ff52018-08-29 18:04:06 +0200362 // margin: 1.3em;
363 padding: 1.3em;
Akronec6bb8e2018-08-29 13:07:56 +0200364 }
hebastae2ff0702018-06-29 14:26:00 +0200365 }
366}
367
Akron2f979122018-07-25 17:00:23 +0200368div.panel.vcinfo {
369 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200370 background-color: $dark-green;
Akronec6bb8e2018-08-29 13:07:56 +0200371 div.button-group > span {
372 box-shadow: none;
373 }
hebastae2ff0702018-06-29 14:26:00 +0200374}