blob: 16f62c33840e2c18ad553b886ab29757f722b8b6 [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 Diewalda944fab2015-04-08 21:02:04 +0000104 > span + span {
105 margin-left: 5pt;
106 }
107 > span.key,
108 > span.value {
109 font-weight: bold;
110 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000111
112 /**
113 * All operators on docs
114 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000115 > .operators {
116 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000117 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000118 }
119 > span.key {
120 position: relative;
121 > ul {
122 margin: 0;
123 margin-left: 3.3em;
124 }
125 }
126 }
127
128 .rewritten {
129 .rewrite {
130 margin-left: 4pt;
131 display: inline-block;
132 color: $dark-orange;
133 &::after {
Nils Diewald359a72c2015-04-20 17:40:29 +0000134 font: {
135 family: FontAwesome;
136 style: normal;
137 weight: normal;
138 }
Nils Diewald2488d052015-04-09 21:46:02 +0000139 content: $fa-rewrite;
Nils Diewalda944fab2015-04-08 21:02:04 +0000140 text-decoration: underline;
141 }
142 span {
143 display: none;
144 }
145 }
146 }
147
Nils Diewald1fcb2ad2015-04-20 19:19:18 +0000148 .unspecified > span {
149 cursor: pointer;
150 }
151
Nils Diewald359a72c2015-04-20 17:40:29 +0000152 /**
153 * All operators
154 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000155 .operators {
156 opacity: 0;
157 white-space: nowrap;
158 padding: 0;
159 font-size: 0;
160 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000161 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000162
163 > span {
Nils Diewald359a72c2015-04-20 17:40:29 +0000164 box-shadow: $choose-box-shadow;
Nils Diewalda944fab2015-04-08 21:02:04 +0000165 cursor: pointer;
166 font-size: 9pt;
Nils Diewald359a72c2015-04-20 17:40:29 +0000167 line-height: 1.5em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000168 padding: 0 4px;
169 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +0000170 @include choose-item;
171 border-style: solid;
172 border-width: $border-size 0;
173 &:hover {
174 @include choose-hover;
Nils Diewalda944fab2015-04-08 21:02:04 +0000175 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000176 &:first-child {
177 border: {
178 left-width: $border-size;
179 top-left-radius: $standard-border-radius;
180 bottom-left-radius: $standard-border-radius;
181 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000182 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000183 &:last-child {
184 border: {
185 right-width: $border-size;
186 top-right-radius: $standard-border-radius;
187 bottom-right-radius: $standard-border-radius;
188 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000189 }
190 }
191 }
192
193 > .docGroup {
194 margin-left: 0;
195 }
196
Nils Diewalda944fab2015-04-08 21:02:04 +0000197 .doc, .docGroup {
198 &:hover > .operators {
199 opacity: 1;
200 }
201 }
202
203}
204
205
Nils Diewald359a72c2015-04-20 17:40:29 +0000206/**
207 * The z-index cascade for groups.
208 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000209$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000210.docGroup {
211 > .operators {
212 z-index: $dg-index;
213 }
214 .docGroup {
215 > .operators {
216 z-index: $dg-index + 1;
217 }
218 .docGroup {
219 > .operators {
220 z-index: $dg-index + 2;
221 }
222 .docGroup {
223 > .operators {
224 z-index: $dg-index + 3;
225 }
226 .docGroup {
227 > .operators {
228 z-index: $dg-index + 4;
229 }
230 .docGroup {
231 > .operators {
232 z-index: $dg-index + 5;
233 }
234 .docGroup {
235 > .operators {
236 z-index: $dg-index + 6;
237 }
238 }
239 }
240 }
241 }
242 }
243 }
244}