blob: 2afea29750393b41d20e8a860502348b6b6ada87 [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
15 /**
16 * Rules for all docGroups
17 */
Nils Diewalda944fab2015-04-08 21:02:04 +000018 .docGroup {
19 position: relative;
20 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +000021 margin-left: $left-padding; // 28pt
22
23 .docGroup { display: block; }
24
Nils Diewalda944fab2015-04-08 21:02:04 +000025 color: $nearly-white;
Nils Diewald359a72c2015-04-20 17:40:29 +000026 padding: 4pt 2pt 4pt 0pt;
Nils Diewalda944fab2015-04-08 21:02:04 +000027 border: {
28 radius: $standard-border-radius * 2;
29 style: solid;
Nils Diewald359a72c2015-04-20 17:40:29 +000030 width: 0 $bracket-size; // .6em .5em
Nils Diewalda944fab2015-04-08 21:02:04 +000031 }
32
Nils Diewald359a72c2015-04-20 17:40:29 +000033 // Whiten on hover
34 &:hover {
35 background-color: rgba(255,255,255,.06);
Nils Diewalda944fab2015-04-08 21:02:04 +000036 }
37
Nils Diewald359a72c2015-04-20 17:40:29 +000038 &[data-operation] {
39 > .doc:first-child::before,
40 > .docGroup:first-child::before {
41 content: none;
42 }
43 > .doc::before,
44 > .docGroup::before {
45 display: inline-block;
46 position: absolute;
47 text-align: right;
48 width: $left-padding;
49 margin-left: -1 * ($left-padding + .5em); // -28pt
50 color: $dark-green;
Nils Diewald1fcb2ad2015-04-20 19:19:18 +000051 line-height: 1.5em;
52 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000053 }
54 > .docGroup::before {
55 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
56 }
57 }
58
59 // Or operation
60 &[data-operation=or] {
61 border-color: $dark-orange;
62 > .doc::before,
63 > .docGroup::before {
64 // This will be overruled by JS!
65 content: "or";
66 }
67 }
68
69 // And operation
70 &[data-operation=and] {
71 > .doc::before,
72 > .docGroup::before {
73 // This will be overruled by JS!
74 content: "and";
75 }
76 }
77
78
79 /**
80 * All operators on groups
81 */
Nils Diewalda944fab2015-04-08 21:02:04 +000082 > .operators {
83 position: absolute;
84 display: block;
85 top: 10px;
86 vertical-align: middle;
87 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +000088 > span:first-child {
Akron8b592d42018-01-26 18:33:06 +010089 border: {
90 top-left-radius: 0;
91 bottom-left-radius: 0;
92 }
Nils Diewald359a72c2015-04-20 17:40:29 +000093 }
Nils Diewalda944fab2015-04-08 21:02:04 +000094 margin-left: 100%;
95 padding: 0;
96 }
Nils Diewalda944fab2015-04-08 21:02:04 +000097 }
98
Nils Diewald359a72c2015-04-20 17:40:29 +000099
100 /**
101 * All document rules
102 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000103 .doc {
Nils Diewald359a72c2015-04-20 17:40:29 +0000104 padding-left: $left-padding;
Nils Diewald4c221252015-04-21 20:19:25 +0000105 > span + span,
Nils Diewald9c125062015-05-05 23:54:17 +0000106 > span + div + span {
Nils Diewalda944fab2015-04-08 21:02:04 +0000107 margin-left: 5pt;
108 }
Nils Diewald9c125062015-05-05 23:54:17 +0000109
Nils Diewalda944fab2015-04-08 21:02:04 +0000110 > span.key,
111 > span.value {
112 font-weight: bold;
Nils Diewald9c125062015-05-05 23:54:17 +0000113 &[data-type=regex] {
114 font-style: italic;
115 &::after, &::before {
116 content: '/';
117 }
118 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000119 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000120
121 /**
122 * All operators on docs
123 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000124 > .operators {
125 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000126 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000127 }
128 > span.key {
129 position: relative;
130 > ul {
Akron8b592d42018-01-26 18:33:06 +0100131 margin: 0;
132 margin-left: 3.3em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000133 }
134 }
135 }
136
137 .rewritten {
138 .rewrite {
139 margin-left: 4pt;
140 display: inline-block;
141 color: $dark-orange;
142 &::after {
Akron5c829e92017-05-12 18:10:00 +0200143 font: {
144 family: FontAwesome;
145 style: normal;
146 weight: normal;
147 }
148 content: $fa-rewrite;
149 text-decoration: underline;
Nils Diewalda944fab2015-04-08 21:02:04 +0000150 }
151 span {
Akron5c829e92017-05-12 18:10:00 +0200152 display: none;
Nils Diewalda944fab2015-04-08 21:02:04 +0000153 }
154 }
155 }
156
Nils Diewald4c221252015-04-21 20:19:25 +0000157 .doc > span {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000158 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000159 &:hover {
160 color: $dark-green;
161 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000162 }
163
Nils Diewald359a72c2015-04-20 17:40:29 +0000164 /**
165 * All operators
166 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000167 .operators {
168 opacity: 0;
169 white-space: nowrap;
170 padding: 0;
171 font-size: 0;
172 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000173 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000174 }
175
176 > .docGroup {
177 margin-left: 0;
178 }
179
Nils Diewalda944fab2015-04-08 21:02:04 +0000180 .doc, .docGroup {
181 &:hover > .operators {
182 opacity: 1;
183 }
184 }
185
Nils Diewald4c221252015-04-21 20:19:25 +0000186 .menu {
187 display: inline-block;
188 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000189
190 div.value {
191 position: absolute;
192 display: inline-block;
Akronc1457bf2015-06-11 19:24:00 +0200193 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000194 @include choose-item;
195 box-shadow: $choose-box-shadow;
196 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200197 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000198 border: {
199 width: $border-size;
200 style: solid;
201 radius: $standard-border-radius;
202 }
203 input {
204 border-width: 0;
205 }
206 > div {
207 padding: 2pt;
208 cursor: pointer;
209 font: {
210 size: 80%;
211 style: italic;
212 }
213 display: inline-block;
214 @include choose-item;
215 border: {
216 width: $border-size;
217 style: solid;
218 radius: $standard-border-radius;
219 }
220
221 &:hover {
222 @include choose-hover;
223 }
224 }
225 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000226 > input {
227 font-style: italic;
228 }
229
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000230 > div {
231 @include choose-active;
232 }
233 }
234 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000235}
236
Akron8b592d42018-01-26 18:33:06 +0100237.vc .operators,
238div.action.bottom {
239 > span {
240 cursor: pointer;
241 box-shadow: $choose-box-shadow;
242 font-size: 9pt;
243 line-height: 1.5em;
244 padding: 0 4px;
245 display: inline-block;
246 @include choose-item;
247 border-style: solid;
248 border-width: $border-size 0;
249 &:hover {
250 @include choose-hover;
251 }
252 &:first-child {
253 border: {
254 left-width: $border-size;
255 top-left-radius: $standard-border-radius;
256 bottom-left-radius: $standard-border-radius;
257 }
258 }
259 &:last-child {
260 border: {
261 right-width: $border-size;
262 top-right-radius: $standard-border-radius;
263 bottom-right-radius: $standard-border-radius;
264 }
265 }
266 }
267}
268
Nils Diewalda944fab2015-04-08 21:02:04 +0000269
Nils Diewald359a72c2015-04-20 17:40:29 +0000270/**
271 * The z-index cascade for groups.
272 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000273$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000274.docGroup {
275 > .operators {
276 z-index: $dg-index;
277 }
278 .docGroup {
279 > .operators {
280 z-index: $dg-index + 1;
281 }
282 .docGroup {
283 > .operators {
284 z-index: $dg-index + 2;
285 }
286 .docGroup {
287 > .operators {
288 z-index: $dg-index + 3;
289 }
290 .docGroup {
291 > .operators {
292 z-index: $dg-index + 4;
293 }
294 .docGroup {
295 > .operators {
296 z-index: $dg-index + 5;
297 }
298 .docGroup {
299 > .operators {
300 z-index: $dg-index + 6;
301 }
302 }
303 }
304 }
305 }
306 }
307 }
308}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000309
Akronc1457bf2015-06-11 19:24:00 +0200310#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000311 line-height: 1em;
312 border-radius: $standard-border-radius;
313}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000314
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;
321 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}