blob: c5d7e7e64dbfa4c5cde6eb381c27c3824e9a1115 [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;
50 }
51 > .docGroup::before {
52 margin-left: -1 * ($left-padding + .5em) + (-1 * $bracket-size);
53 }
54 }
55
56 // Or operation
57 &[data-operation=or] {
58 border-color: $dark-orange;
59 > .doc::before,
60 > .docGroup::before {
61 // This will be overruled by JS!
62 content: "or";
63 }
64 }
65
66 // And operation
67 &[data-operation=and] {
68 > .doc::before,
69 > .docGroup::before {
70 // This will be overruled by JS!
71 content: "and";
72 }
73 }
74
75
76 /**
77 * All operators on groups
78 */
Nils Diewalda944fab2015-04-08 21:02:04 +000079 > .operators {
80 position: absolute;
81 display: block;
82 top: 10px;
83 vertical-align: middle;
84 left: 3px;
Nils Diewald359a72c2015-04-20 17:40:29 +000085 > span:first-child {
86 border: {
87 top-left-radius: 0;
88 bottom-left-radius: 0;
89 }
90 }
Nils Diewalda944fab2015-04-08 21:02:04 +000091 margin-left: 100%;
92 padding: 0;
93 }
Nils Diewalda944fab2015-04-08 21:02:04 +000094 }
95
Nils Diewald359a72c2015-04-20 17:40:29 +000096
97 /**
98 * All document rules
99 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000100 .doc {
Nils Diewald359a72c2015-04-20 17:40:29 +0000101 padding-left: $left-padding;
Nils Diewalda944fab2015-04-08 21:02:04 +0000102 > span + span {
103 margin-left: 5pt;
104 }
105 > span.key,
106 > span.value {
107 font-weight: bold;
108 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000109
110 /**
111 * All operators on docs
112 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000113 > .operators {
114 display: inline-block;
Nils Diewalda944fab2015-04-08 21:02:04 +0000115 margin-left: 10px;
Nils Diewalda944fab2015-04-08 21:02:04 +0000116 }
117 > span.key {
118 position: relative;
119 > ul {
120 margin: 0;
121 margin-left: 3.3em;
122 }
123 }
124 }
125
126 .rewritten {
127 .rewrite {
128 margin-left: 4pt;
129 display: inline-block;
130 color: $dark-orange;
131 &::after {
Nils Diewald359a72c2015-04-20 17:40:29 +0000132 font: {
133 family: FontAwesome;
134 style: normal;
135 weight: normal;
136 }
Nils Diewald2488d052015-04-09 21:46:02 +0000137 content: $fa-rewrite;
Nils Diewalda944fab2015-04-08 21:02:04 +0000138 text-decoration: underline;
139 }
140 span {
141 display: none;
142 }
143 }
144 }
145
Nils Diewald359a72c2015-04-20 17:40:29 +0000146 /**
147 * All operators
148 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000149 .operators {
150 opacity: 0;
151 white-space: nowrap;
152 padding: 0;
153 font-size: 0;
154 line-height: 0;
Nils Diewalda944fab2015-04-08 21:02:04 +0000155 text-align: center;
Nils Diewalda944fab2015-04-08 21:02:04 +0000156
157 > span {
Nils Diewald359a72c2015-04-20 17:40:29 +0000158 box-shadow: $choose-box-shadow;
Nils Diewalda944fab2015-04-08 21:02:04 +0000159 cursor: pointer;
160 font-size: 9pt;
Nils Diewald359a72c2015-04-20 17:40:29 +0000161 line-height: 1.5em;
Nils Diewalda944fab2015-04-08 21:02:04 +0000162 padding: 0 4px;
163 display: inline-block;
Nils Diewald359a72c2015-04-20 17:40:29 +0000164 @include choose-item;
165 border-style: solid;
166 border-width: $border-size 0;
167 &:hover {
168 @include choose-hover;
Nils Diewalda944fab2015-04-08 21:02:04 +0000169 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000170 &:first-child {
171 border: {
172 left-width: $border-size;
173 top-left-radius: $standard-border-radius;
174 bottom-left-radius: $standard-border-radius;
175 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000176 }
Nils Diewald359a72c2015-04-20 17:40:29 +0000177 &:last-child {
178 border: {
179 right-width: $border-size;
180 top-right-radius: $standard-border-radius;
181 bottom-right-radius: $standard-border-radius;
182 }
Nils Diewalda944fab2015-04-08 21:02:04 +0000183 }
184 }
185 }
186
187 > .docGroup {
188 margin-left: 0;
189 }
190
Nils Diewalda944fab2015-04-08 21:02:04 +0000191 .doc, .docGroup {
192 &:hover > .operators {
193 opacity: 1;
194 }
195 }
196
197}
198
199
Nils Diewald359a72c2015-04-20 17:40:29 +0000200/**
201 * The z-index cascade for groups.
202 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000203$dg-index : 30;
Nils Diewalda944fab2015-04-08 21:02:04 +0000204.docGroup {
205 > .operators {
206 z-index: $dg-index;
207 }
208 .docGroup {
209 > .operators {
210 z-index: $dg-index + 1;
211 }
212 .docGroup {
213 > .operators {
214 z-index: $dg-index + 2;
215 }
216 .docGroup {
217 > .operators {
218 z-index: $dg-index + 3;
219 }
220 .docGroup {
221 > .operators {
222 z-index: $dg-index + 4;
223 }
224 .docGroup {
225 > .operators {
226 z-index: $dg-index + 5;
227 }
228 .docGroup {
229 > .operators {
230 z-index: $dg-index + 6;
231 }
232 }
233 }
234 }
235 }
236 }
237 }
238}