blob: 559a98202a95d6c1b6266a2e14b54038926695f1 [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 */
Nils Diewalda944fab2015-04-08 21:02:04 +000011.vc {
Nils Diewald359a72c2015-04-20 17:40:29 +000012 margin-top: 4pt;
13
14 /**
15 * Rules for all docGroups
16 */
Nils Diewalda944fab2015-04-08 21:02:04 +000017 .docGroup {
18 position: relative;
19 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +000020 margin-left: $left-padding; // 28pt
21
22 .docGroup { display: block; }
23
Nils Diewalda944fab2015-04-08 21:02:04 +000024 color: $nearly-white;
Nils Diewald359a72c2015-04-20 17:40:29 +000025 padding: 4pt 2pt 4pt 0pt;
Nils Diewalda944fab2015-04-08 21:02:04 +000026 border: {
27 radius: $standard-border-radius * 2;
28 style: solid;
Nils Diewald359a72c2015-04-20 17:40:29 +000029 width: 0 $bracket-size; // .6em .5em
Nils Diewalda944fab2015-04-08 21:02:04 +000030 }
31
Nils Diewald359a72c2015-04-20 17:40:29 +000032 // Whiten on hover
33 &:hover {
34 background-color: rgba(255,255,255,.06);
Nils Diewalda944fab2015-04-08 21:02:04 +000035 }
36
Nils Diewald359a72c2015-04-20 17:40:29 +000037 &[data-operation] {
38 > .doc:first-child::before,
39 > .docGroup:first-child::before {
40 content: none;
41 }
42 > .doc::before,
43 > .docGroup::before {
44 display: inline-block;
45 position: absolute;
46 text-align: right;
47 width: $left-padding;
48 margin-left: -1 * ($left-padding + .5em); // -28pt
49 color: $dark-green;
Nils Diewald1fcb2ad2015-04-20 19:19:18 +000050 line-height: 1.5em;
51 border-top: $border-size solid transparent;
Nils Diewald359a72c2015-04-20 17:40:29 +000052 }
53 > .docGroup::before {
54 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
55 }
56 }
57
58 // Or operation
59 &[data-operation=or] {
60 border-color: $dark-orange;
61 > .doc::before,
62 > .docGroup::before {
63 // This will be overruled by JS!
64 content: "or";
65 }
66 }
67
68 // And operation
69 &[data-operation=and] {
70 > .doc::before,
71 > .docGroup::before {
72 // This will be overruled by JS!
73 content: "and";
74 }
75 }
76
77
78 /**
79 * All operators on groups
80 */
Nils Diewalda944fab2015-04-08 21:02:04 +000081 > .operators {
82 position: absolute;
83 display: block;
84 top: 10px;
85 vertical-align: middle;
86 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +000087 > span:first-child {
88 border: {
89 top-left-radius: 0;
90 bottom-left-radius: 0;
91 }
92 }
Nils Diewalda944fab2015-04-08 21:02:04 +000093 margin-left: 100%;
94 padding: 0;
95 }
Nils Diewalda944fab2015-04-08 21:02:04 +000096 }
97
Nils Diewald359a72c2015-04-20 17:40:29 +000098
99 /**
100 * All document rules
101 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000102 .doc {
Nils Diewald359a72c2015-04-20 17:40:29 +0000103 padding-left: $left-padding;
Nils Diewald4c221252015-04-21 20:19:25 +0000104 > span + span,
Nils Diewald9c125062015-05-05 23:54:17 +0000105 > span + div + span {
Nils Diewalda944fab2015-04-08 21:02:04 +0000106 margin-left: 5pt;
107 }
Nils Diewald9c125062015-05-05 23:54:17 +0000108
Nils Diewalda944fab2015-04-08 21:02:04 +0000109 > span.key,
110 > span.value {
111 font-weight: bold;
Nils Diewald9c125062015-05-05 23:54:17 +0000112 &[data-type=regex] {
113 font-style: italic;
114 &::after, &::before {
115 content: '/';
116 }
117 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000118 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000119
120 /**
121 * All operators on docs
122 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000123 > .operators {
124 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000125 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000126 }
127 > span.key {
128 position: relative;
129 > ul {
130 margin: 0;
131 margin-left: 3.3em;
132 }
133 }
134 }
135
136 .rewritten {
137 .rewrite {
138 margin-left: 4pt;
139 display: inline-block;
140 color: $dark-orange;
141 &::after {
Nils Diewald359a72c2015-04-20 17:40:29 +0000142 font: {
143 family: FontAwesome;
144 style: normal;
145 weight: normal;
146 }
Nils Diewald2488d052015-04-09 21:46:02 +0000147 content: $fa-rewrite;
Nils Diewalda944fab2015-04-08 21:02:04 +0000148 text-decoration: underline;
149 }
150 span {
151 display: none;
152 }
153 }
154 }
155
Nils Diewald4c221252015-04-21 20:19:25 +0000156 .doc > span {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000157 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000158 &:hover {
159 color: $dark-green;
160 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000161 }
162
Nils Diewald359a72c2015-04-20 17:40:29 +0000163 /**
164 * All operators
165 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000166 .operators {
167 opacity: 0;
168 white-space: nowrap;
169 padding: 0;
170 font-size: 0;
171 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000172 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000173
174 > span {
Nils Diewald359a72c2015-04-20 17:40:29 +0000175 box-shadow: $choose-box-shadow;
Nils Diewalda944fab2015-04-08 21:02:04 +0000176 cursor: pointer;
177 font-size: 9pt;
Nils Diewald359a72c2015-04-20 17:40:29 +0000178 line-height: 1.5em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000179 padding: 0 4px;
180 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +0000181 @include choose-item;
182 border-style: solid;
183 border-width: $border-size 0;
184 &:hover {
185 @include choose-hover;
Nils Diewalda944fab2015-04-08 21:02:04 +0000186 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000187 &:first-child {
188 border: {
189 left-width: $border-size;
190 top-left-radius: $standard-border-radius;
191 bottom-left-radius: $standard-border-radius;
192 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000193 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000194 &:last-child {
195 border: {
196 right-width: $border-size;
197 top-right-radius: $standard-border-radius;
198 bottom-right-radius: $standard-border-radius;
199 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000200 }
201 }
202 }
203
204 > .docGroup {
205 margin-left: 0;
206 }
207
Nils Diewalda944fab2015-04-08 21:02:04 +0000208 .doc, .docGroup {
209 &:hover > .operators {
210 opacity: 1;
211 }
212 }
213
Nils Diewald4c221252015-04-21 20:19:25 +0000214 .menu {
215 display: inline-block;
216 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000217
218 div.value {
219 position: absolute;
220 display: inline-block;
221 @include choose-item;
222 box-shadow: $choose-box-shadow;
223 padding: 4pt;
224 margin-top: -2pt;
225 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: {
237 size: 80%;
238 style: italic;
239 }
240 display: inline-block;
241 @include choose-item;
242 border: {
243 width: $border-size;
244 style: solid;
245 radius: $standard-border-radius;
246 }
247
248 &:hover {
249 @include choose-hover;
250 }
251 }
252 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000253 > input {
254 font-style: italic;
255 }
256
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000257 > div {
258 @include choose-active;
259 }
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 {
279 z-index: $dg-index + 2;
280 }
281 .docGroup {
282 > .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 }
300 }
301 }
302 }
303}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000304
Nils Diewald7148c6f2015-05-04 15:07:53 +0000305#vc {
306 line-height: 1em;
307 border-radius: $standard-border-radius;
308}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000309
310#vc-choose {
311 &::after {
312 content: $fa-down;
313 padding: {
314 left: 2pt;
315 right: 4pt;
316 }
317 }
318 &.active::after {
319 content: $fa-up;
320 }
321}