blob: d13ba6ef80792679198910ae96e68258f0e4121e [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 Diewalda944fab2015-04-08 21:02:04 +0000210}
211
212
Nils Diewald359a72c2015-04-20 17:40:29 +0000213/**
214 * The z-index cascade for groups.
215 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000216$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000217.docGroup {
218 > .operators {
219 z-index: $dg-index;
220 }
221 .docGroup {
222 > .operators {
223 z-index: $dg-index + 1;
224 }
225 .docGroup {
226 > .operators {
227 z-index: $dg-index + 2;
228 }
229 .docGroup {
230 > .operators {
231 z-index: $dg-index + 3;
232 }
233 .docGroup {
234 > .operators {
235 z-index: $dg-index + 4;
236 }
237 .docGroup {
238 > .operators {
239 z-index: $dg-index + 5;
240 }
241 .docGroup {
242 > .operators {
243 z-index: $dg-index + 6;
244 }
245 }
246 }
247 }
248 }
249 }
250 }
251}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000252
Nils Diewald7148c6f2015-05-04 15:07:53 +0000253#vc {
254 line-height: 1em;
255 border-radius: $standard-border-radius;
256}
Nils Diewaldfccfbcb2015-04-29 20:48:19 +0000257
258#vc-choose {
259 &::after {
260 content: $fa-down;
261 padding: {
262 left: 2pt;
263 right: 4pt;
264 }
265 }
266 &.active::after {
267 content: $fa-up;
268 }
269}