blob: b7b97cd86c31c499093e82febd8dc2d9d6710915 [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;
Nils Diewald9c125062015-05-05 23:54:17 +0000151 &[data-type=regex] {
Akron76c3dd62018-05-29 20:58:27 +0200152 font-style: italic;
153 &::after,
154 &::before {
155 content: '/';
156 }
Nils Diewald9c125062015-05-05 23:54:17 +0000157 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000158 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000159
160 /**
161 * All operators on docs
162 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000163 > .operators {
164 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000165 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000166 }
167 > span.key {
168 position: relative;
169 > ul {
Akron76c3dd62018-05-29 20:58:27 +0200170 margin: 0;
171 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000172 }
173 }
174 }
175
176 .rewritten {
177 .rewrite {
178 margin-left: 4pt;
179 display: inline-block;
180 color: $dark-orange;
181 &::after {
Akron76c3dd62018-05-29 20:58:27 +0200182 font: {
183 family: FontAwesome;
184 style: normal;
185 weight: normal;
186 }
187 content: $fa-rewrite;
188 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000189 }
Akron76c3dd62018-05-29 20:58:27 +0200190 > span {
191 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000192 }
193 }
194 }
195
Nils Diewald4c221252015-04-21 20:19:25 +0000196 .doc > span {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000197 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000198 &:hover {
Akron2f979122018-07-25 17:00:23 +0200199 // color: $dark-green;
200 color: $dark-orange;
Nils Diewald4c221252015-04-21 20:19:25 +0000201 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000202 }
203
Nils Diewald359a72c2015-04-20 17:40:29 +0000204 /**
205 * All operators
206 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000207 .operators {
208 opacity: 0;
209 white-space: nowrap;
210 padding: 0;
211 font-size: 0;
212 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000213 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000214 }
215
216 > .docGroup {
217 margin-left: 0;
218 }
219
Nils Diewalda944fab2015-04-08 21:02:04 +0000220 .doc, .docGroup {
221 &:hover > .operators {
222 opacity: 1;
223 }
224 }
225
Nils Diewald4c221252015-04-21 20:19:25 +0000226 .menu {
227 display: inline-block;
228 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000229
230 div.value {
231 position: absolute;
232 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200233 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000234 @include choose-item;
235 box-shadow: $choose-box-shadow;
236 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200237 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000238 border: {
239 width: $border-size;
240 style: solid;
241 radius: $standard-border-radius;
242 }
243 input {
244 border-width: 0;
245 }
246 > div {
247 padding: 2pt;
248 cursor: pointer;
249 font: {
Akron76c3dd62018-05-29 20:58:27 +0200250 size: 80%;
251 style: italic;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000252 }
253 display: inline-block;
254 @include choose-item;
255 border: {
Akron76c3dd62018-05-29 20:58:27 +0200256 width: $border-size;
257 style: solid;
258 radius: $standard-border-radius;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000259 }
260
261 &:hover {
Akron76c3dd62018-05-29 20:58:27 +0200262 @include choose-hover;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000263 }
264 }
265 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000266 > input {
Akron76c3dd62018-05-29 20:58:27 +0200267 font-style: italic;
Nils Diewald9c125062015-05-05 23:54:17 +0000268 }
269
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000270 > div {
Akron76c3dd62018-05-29 20:58:27 +0200271 @include choose-active;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000272 }
273 }
274 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000275}
276
277
Nils Diewald359a72c2015-04-20 17:40:29 +0000278/**
279 * The z-index cascade for groups.
280 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000281$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000282.docGroup {
283 > .operators {
284 z-index: $dg-index;
285 }
286 .docGroup {
287 > .operators {
288 z-index: $dg-index + 1;
289 }
290 .docGroup {
291 > .operators {
Akron76c3dd62018-05-29 20:58:27 +0200292 z-index: $dg-index + 2;
Nils Diewalda944fab2015-04-08 21:02:04 +0000293 }
294 .docGroup {
Akron76c3dd62018-05-29 20:58:27 +0200295 > .operators {
296 z-index: $dg-index + 3;
297 }
298 .docGroup {
299 > .operators {
300 z-index: $dg-index + 4;
301 }
302 .docGroup {
303 > .operators {
304 z-index: $dg-index + 5;
305 }
306 .docGroup {
307 > .operators {
308 z-index: $dg-index + 6;
309 }
310 }
311 }
312 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000313 }
314 }
315 }
316}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000317
Akronc1457bf2015-06-11 19:24:00 +0200318#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000319 line-height: 1em;
320 border-radius: $standard-border-radius;
321}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000322
Akron2f979122018-07-25 17:00:23 +0200323header #vc-view > div {
324 margin: 1.3em 0 .5em 0;
325}
326
Akron5c829e92017-05-12 18:10:00 +0200327
328#vc-choose > span.rewritten {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000329 &::after {
Akron5c829e92017-05-12 18:10:00 +0200330 color: $dark-orange;
331 padding: 0;
332 padding-left: 4px;
Akron76c3dd62018-05-29 20:58:27 +0200333 font: {
334 family: FontAwesome;
335 style: normal;
336 weight: normal;
337 }
338 content: $fa-rewrite;
339 text-decoration: underline;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000340 }
Akron6bb71582016-06-10 20:41:08 +0200341}
hebastae2ff0702018-06-29 14:26:00 +0200342
Akron2f979122018-07-25 17:00:23 +0200343div#vc-view > div.vc {
344 border: 2px solid $dark-green;
345 background-color: $nearly-white;
346 > div:first-child {
347 margin: 1.3em;
hebastae2ff0702018-06-29 14:26:00 +0200348 }
349}
350
Akron2f979122018-07-25 17:00:23 +0200351div.panel.vcinfo {
352 padding: 3pt 0pt 3pt 3pt;
hebastae2ff0702018-06-29 14:26:00 +0200353 background-color: $dark-green;
Akron2f979122018-07-25 17:00:23 +0200354 /*
355 div.button-group {
356 display: inline-block;
357 margin-right: .5em;
358 > span {
359 position: relative;
360 box-shadow: none;
hebastae2ff0702018-06-29 14:26:00 +0200361 }
hebastae2ff0702018-06-29 14:26:00 +0200362 }
Akron2f979122018-07-25 17:00:23 +0200363*/
hebastae2ff0702018-06-29 14:26:00 +0200364}
365
Akron2f979122018-07-25 17:00:23 +0200366/*
367.button-group.vcstatistic{
368 position:relative;
369 }
370*/