blob: 1f73cefd64944b3cb3320ac4fca07604dd55fce1 [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,
105 > span + .menu + span{
Nils Diewalda944fab2015-04-08 21:02:04 +0000106 margin-left: 5pt;
107 }
108 > span.key,
109 > span.value {
110 font-weight: bold;
111 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000112
113 /**
114 * All operators on docs
115 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000116 > .operators {
117 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000118 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000119 }
120 > span.key {
121 position: relative;
122 > ul {
123 margin: 0;
124 margin-left: 3.3em;
125 }
126 }
127 }
128
129 .rewritten {
130 .rewrite {
131 margin-left: 4pt;
132 display: inline-block;
133 color: $dark-orange;
134 &::after {
Nils Diewald359a72c2015-04-20 17:40:29 +0000135 font: {
136 family: FontAwesome;
137 style: normal;
138 weight: normal;
139 }
Nils Diewald2488d052015-04-09 21:46:02 +0000140 content: $fa-rewrite;
Nils Diewalda944fab2015-04-08 21:02:04 +0000141 text-decoration: underline;
142 }
143 span {
144 display: none;
145 }
146 }
147 }
148
Nils Diewald4c221252015-04-21 20:19:25 +0000149 .doc > span {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000150 cursor: pointer;
Nils Diewald4c221252015-04-21 20:19:25 +0000151 &:hover {
152 color: $dark-green;
153 }
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000154 }
155
Nils Diewald359a72c2015-04-20 17:40:29 +0000156 /**
157 * All operators
158 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000159 .operators {
160 opacity: 0;
161 white-space: nowrap;
162 padding: 0;
163 font-size: 0;
164 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000165 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000166
167 > span {
Nils Diewald359a72c2015-04-20 17:40:29 +0000168 box-shadow: $choose-box-shadow;
Nils Diewalda944fab2015-04-08 21:02:04 +0000169 cursor: pointer;
170 font-size: 9pt;
Nils Diewald359a72c2015-04-20 17:40:29 +0000171 line-height: 1.5em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000172 padding: 0 4px;
173 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +0000174 @include choose-item;
175 border-style: solid;
176 border-width: $border-size 0;
177 &:hover {
178 @include choose-hover;
Nils Diewalda944fab2015-04-08 21:02:04 +0000179 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000180 &:first-child {
181 border: {
182 left-width: $border-size;
183 top-left-radius: $standard-border-radius;
184 bottom-left-radius: $standard-border-radius;
185 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000186 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000187 &:last-child {
188 border: {
189 right-width: $border-size;
190 top-right-radius: $standard-border-radius;
191 bottom-right-radius: $standard-border-radius;
192 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000193 }
194 }
195 }
196
197 > .docGroup {
198 margin-left: 0;
199 }
200
Nils Diewalda944fab2015-04-08 21:02:04 +0000201 .doc, .docGroup {
202 &:hover > .operators {
203 opacity: 1;
204 }
205 }
206
Nils Diewald4c221252015-04-21 20:19:25 +0000207 .menu {
208 display: inline-block;
209 }
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000210
211 div.value {
212 position: absolute;
213 display: inline-block;
214 @include choose-item;
215 box-shadow: $choose-box-shadow;
216 padding: 4pt;
217 margin-top: -2pt;
218 border: {
219 width: $border-size;
220 style: solid;
221 radius: $standard-border-radius;
222 }
223 input {
224 border-width: 0;
225 }
226 > div {
227 padding: 2pt;
228 cursor: pointer;
229 font: {
230 size: 80%;
231 style: italic;
232 }
233 display: inline-block;
234 @include choose-item;
235 border: {
236 width: $border-size;
237 style: solid;
238 radius: $standard-border-radius;
239 }
240
241 &:hover {
242 @include choose-hover;
243 }
244 }
245 &.regex {
246 > div {
247 @include choose-active;
248 }
249 }
250 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000251}
252
253
Nils Diewald359a72c2015-04-20 17:40:29 +0000254/**
255 * The z-index cascade for groups.
256 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000257$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000258.docGroup {
259 > .operators {
260 z-index: $dg-index;
261 }
262 .docGroup {
263 > .operators {
264 z-index: $dg-index + 1;
265 }
266 .docGroup {
267 > .operators {
268 z-index: $dg-index + 2;
269 }
270 .docGroup {
271 > .operators {
272 z-index: $dg-index + 3;
273 }
274 .docGroup {
275 > .operators {
276 z-index: $dg-index + 4;
277 }
278 .docGroup {
279 > .operators {
280 z-index: $dg-index + 5;
281 }
282 .docGroup {
283 > .operators {
284 z-index: $dg-index + 6;
285 }
286 }
287 }
288 }
289 }
290 }
291 }
292}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000293
Nils Diewald7148c6f2015-05-04 15:07:53 +0000294#vc {
295 line-height: 1em;
296 border-radius: $standard-border-radius;
297}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000298
299#vc-choose {
300 &::after {
301 content: $fa-down;
302 padding: {
303 left: 2pt;
304 right: 4pt;
305 }
306 }
307 &.active::after {
308 content: $fa-up;
309 }
310}