blob: 45899dae10f9c74a3a0d3e9bf61f45247fbf6229 [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;
Akronc1457bf2015-06-11 19:24:00 +0200221 z-index: 8000;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000222 @include choose-item;
223 box-shadow: $choose-box-shadow;
224 padding: 4pt;
Akronc1457bf2015-06-11 19:24:00 +0200225 margin-top: -6pt;
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000226 border: {
227 width: $border-size;
228 style: solid;
229 radius: $standard-border-radius;
230 }
231 input {
232 border-width: 0;
233 }
234 > div {
235 padding: 2pt;
236 cursor: pointer;
237 font: {
238 size: 80%;
239 style: italic;
240 }
241 display: inline-block;
242 @include choose-item;
243 border: {
244 width: $border-size;
245 style: solid;
246 radius: $standard-border-radius;
247 }
248
249 &:hover {
250 @include choose-hover;
251 }
252 }
253 &.regex {
Nils Diewald9c125062015-05-05 23:54:17 +0000254 > input {
255 font-style: italic;
256 }
257
Nils Diewaldc4c4b832015-05-05 16:00:08 +0000258 > div {
259 @include choose-active;
260 }
261 }
262 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000263}
264
265
Nils Diewald359a72c2015-04-20 17:40:29 +0000266/**
267 * The z-index cascade for groups.
268 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000269$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000270.docGroup {
271 > .operators {
272 z-index: $dg-index;
273 }
274 .docGroup {
275 > .operators {
276 z-index: $dg-index + 1;
277 }
278 .docGroup {
279 > .operators {
280 z-index: $dg-index + 2;
281 }
282 .docGroup {
283 > .operators {
284 z-index: $dg-index + 3;
285 }
286 .docGroup {
287 > .operators {
288 z-index: $dg-index + 4;
289 }
290 .docGroup {
291 > .operators {
292 z-index: $dg-index + 5;
293 }
294 .docGroup {
295 > .operators {
296 z-index: $dg-index + 6;
297 }
298 }
299 }
300 }
301 }
302 }
303 }
304}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000305
Akronc1457bf2015-06-11 19:24:00 +0200306#collection {
Nils Diewald7148c6f2015-05-04 15:07:53 +0000307 line-height: 1em;
308 border-radius: $standard-border-radius;
309}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000310
311#vc-choose {
312 &::after {
313 content: $fa-down;
314 padding: {
315 left: 2pt;
316 right: 4pt;
317 }
318 }
319 &.active::after {
320 content: $fa-up;
321 }
322}