blob: 5776004c126ee8ed13bdf62f670b6580be8a19c6 [file] [log] [blame]
Akron49bfdbf2016-11-22 21:47:33 +01001@charset "utf-8";
2@import "../util";
3
4$border-size: 2px;
Akron08b82d62016-12-05 15:06:05 +01005$font-size: 10pt;
Akron49bfdbf2016-11-22 21:47:33 +01006
7#search {
8 position: relative;
9 margin-bottom: 30px;
10 overflow: visible;
Akron3bb91bc2016-12-02 16:43:17 +010011// margin-top: 14pt;
Akron49bfdbf2016-11-22 21:47:33 +010012}
13
14#search > ol {
15 overflow-x: hidden;
16 overflow-y: visible;
17 width: auto;
18 border: 1px solid black;
19 text-indent: 0;
20 list-style-type: none;
21 margin: 0;
22 padding: 0;
23 border: 1px solid $kwic-border;
Akron08b82d62016-12-05 15:06:05 +010024 font-size: $font-size;
Akron49bfdbf2016-11-22 21:47:33 +010025
26 > li {
27 display: table-row;
28 table-layout: auto;
29 div.meta {
30 position: relative;
31 display: table-cell;
Akron625fe0c2017-05-03 16:15:08 +020032 text-align: left;
Akron67b51812017-05-01 14:10:55 +020033 cursor: initial;
Akron97d42802016-11-26 22:45:46 +010034 width: 2px;
Akron49bfdbf2016-11-22 21:47:33 +010035 z-index: 5;
36 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010037 white-space: nowrap;
Akron67b51812017-05-01 14:10:55 +020038 background-color: lighten($middle-grey, 5%);
39 // @include light-noise;
Akron08b82d62016-12-05 15:06:05 +010040 border: {
Akron46b9f212017-05-01 13:55:17 +020041 color: $dark-grey;
Akron08b82d62016-12-05 15:06:05 +010042 style: solid;
Akron46b9f212017-05-01 13:55:17 +020043 width: 2px 1px 0 0;
44 }
45 &:empty {
46 border-width: 0 1px 0 0;
47 }
48 &.flip {
Akron67b51812017-05-01 14:10:55 +020049 background-color: lighten($middle-grey, 17%);
Akron08b82d62016-12-05 15:06:05 +010050 }
Akron3bb91bc2016-12-02 16:43:17 +010051 color: $nearly-white;
Akron46b9f212017-05-01 13:55:17 +020052 font-size: 75%;
Akron3bb91bc2016-12-02 16:43:17 +010053 padding: 0 5pt;
Akron49bfdbf2016-11-22 21:47:33 +010054 }
Akron97d42802016-11-26 22:45:46 +010055 &:first-of-type div.meta {
Akron08b82d62016-12-05 15:06:05 +010056 border-top-width: 0;
Akron97d42802016-11-26 22:45:46 +010057 }
Akron08b82d62016-12-05 15:06:05 +010058 &:last-of-type div.meta {
59 border-bottom-width: 0;
60 }
Akron49bfdbf2016-11-22 21:47:33 +010061 }
62}
63
64#search > ol > li {
65 border: {
66 style: solid;
67 color: $dark-orange;
68 width: 0;
69 }
70}
71
72#search {
73 div.meta, div.match-main {
74 position: relative;
Akron08b82d62016-12-05 15:06:05 +010075 cursor: pointer;
Akron49bfdbf2016-11-22 21:47:33 +010076 }
77 /*
78 &:not(.active):not(:target) {
79 &:nth-of-type(even) div.main-col {
80 */
81 div.match-main {
82 display: table-cell;
83 z-index: 4;
84 > div.match-wrap {
85 width: 99999%;
86 margin-left: -49999.5%;
87 background-color: $kwic-line-noneven;
88 overflow-x: hidden;
89 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010090 white-space: normal;
Akron49bfdbf2016-11-22 21:47:33 +010091 }
92 }
93}
94
95#search ol li:nth-of-type(even) div.match-main div.match-wrap {
96 background-color: $kwic-line-even;
97}
98
99
100div.snippet {
101 text-overflow: ellipsis;
102 text-indent: 0;
103 text-shadow: $light-shadow;
Akron08b82d62016-12-05 15:06:05 +0100104 font-size: 0;
Akron49bfdbf2016-11-22 21:47:33 +0100105 > span, mark {
Akron08b82d62016-12-05 15:06:05 +0100106 font-size: $font-size;
Akron49bfdbf2016-11-22 21:47:33 +0100107 padding: 5pt 0 6pt 0;
108 white-space: no-wrap !important;
109 > span {
110 white-space: no-wrap !important;
111 }
112 }
113 > mark, > span.match {
114 font-weight: bold;
Akron08b82d62016-12-05 15:06:05 +0100115 color: $black;
116 text-shadow: none;
Akron49bfdbf2016-11-22 21:47:33 +0100117 padding-left: 4pt;
118 padding-right: 2pt;
119 }
120}
121
122
123
124#search div.matchinfo {
125 display: none;
126}
127
Akron3bb91bc2016-12-02 16:43:17 +0100128#search li.active div.matchinfo {
129 display: block;
130}
131
132
133
Akron49bfdbf2016-11-22 21:47:33 +0100134/*
135#search ol > li:focus:not(.active) {
136 background-color: $dark-orange !important;
137 &:not(:target) div.flag {
138 border-right-color: $nearly-white;
139 }
140 div.snippet {
141 color: $nearly-white;
142 text-shadow: none !important;
143 .class-3 {
144 border-color: $nearly-white;
145 }
146 }
147 }
148*/
149
150#search div.match-main {
151 position: relative;
152 z-index: 4;
153 > div.match-wrap {
154 margin-left: -49999.5%;
155 width: 99999%;
156 overflow-x: hidden;
157 overflow-y: visible;
158 position: relative;
159 box-sizing: border-box;
160 }
161}
162
163div.snippet.startMore:before,
164div.snippet.endMore:after {
165 content: "…";
166 padding-left: 2pt;
167 padding-right: 2pt;
168}
169
170/**
171 * flag
172 */
173div.snippet div.flag {
174 position: absolute;
175 height: 100%;
Akron3bb91bc2016-12-02 16:43:17 +0100176 top: 0;
177 // margin-left: -49999.5%;
178 // margin-left: 50%;
Akron49bfdbf2016-11-22 21:47:33 +0100179 margin-left: 50%;
180 width: 11px;
181 background-color: $dark-orange;
182 border-right-color: $nearly-white;
183 border-right: 1px solid $darkest-orange;
184}
185
186/**
187 * References
188 */
189#search > ol > li p.ref {
190 display: none;
191}
192
193/**
194 * Active
195 */
196#search > ol {
197 > li.active,
198 > li:target {
Akron3bb91bc2016-12-02 16:43:17 +0100199 background-color: $dark-orange;
200 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100201 text-align: left;
Akron49bfdbf2016-11-22 21:47:33 +0100202 position: relative;
203 border-width: 2px;
204 white-space: wrap;
205 height: auto;
206 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100207
208 div.match-main > div.match-wrap {
209 cursor: default;
210 }
Akron49bfdbf2016-11-22 21:47:33 +0100211 }
212}
213
214#search > ol > li.active {
Akron3bb91bc2016-12-02 16:43:17 +0100215 span {
216 display: inline !important;
217 }
218 ul.action {
219 display: block;
220 }
Akron49bfdbf2016-11-22 21:47:33 +0100221 div.match-wrap {
222 min-height: 20pt;
223 div.snippet {
224 background-color: $light-orange;
225 > * {
226 background-color: transparent;
227 }
228 div.flag {
229 display: none;
230 }
231 padding: 2pt 0 5pt 5pt;
232 margin: {
233 top: 0;
234 right: $right-match-distance; // 3em;
235 bottom: 0;
236 left: 0; // 5pt margin-top
237 }
238 > span {
Akron08b82d62016-12-05 15:06:05 +0100239 // color: black;
Akron49bfdbf2016-11-22 21:47:33 +0100240 line-height: 1.4em;
241 width: auto;
242 &.context-left {
243 margin-left: 0;
244 display: inline;
245 overflow: visible;
246 text-align: left;
247 width: auto;
248 }
249 }
250 }
251 }
252}
253
254#search > ol > li.active {
255 overflow: hidden;
256 div.meta {
Akron97d42802016-11-26 22:45:46 +0100257 display: none;
258 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100259 }
260 div.match-main {
Akron3bb91bc2016-12-02 16:43:17 +0100261 width: 100%;
Akron97d42802016-11-26 22:45:46 +0100262 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100263 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100264 background-color: $dark-orange;
265 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100266 margin-left: 0;
267 overflow-x: visible;
268 white-space: wrap;
269 }
270 }
271 p.ref {
272 display: block;
Akron08b82d62016-12-05 15:06:05 +0100273 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100274 padding: 3pt 10pt 3pt 3pt;
275 padding-right: $right-match-distance;
276 margin: 0pt;
277 width: 100%;
278 bottom: 0;
279 z-index: 30;
280 > span.sigle {
281 font-size: 75%;
282 vertical-align: top;
283 color: $light-orange;
284 float: right;
285 }
286 }
287}
288
289
290
291/**
292 * Right aligned
293 */
294
295#search ol span.context-left {
296 display: inline-block;
297 width: 50.01%;
298 text-align: right;
299}
300
301#search ol.align-right {
302 text-align: right;
303 div.match-main span.context-right {
304 display: inline-block;
305 width: 49.915%;
306 text-align: left;
307 }
308}
309
Akron01231002017-06-29 20:47:58 +0200310// fix empty contexts
311#search ol span.context-left,
312#search ol span.context-right {
313 &:empty::after {
314 content: " ";
315 display: inline-block;
316 }
317}
Akron49bfdbf2016-11-22 21:47:33 +0100318
319/**
320 * Highlights
321 */
322mark {
323 background-color: inherit;
324 color: inherit;
325}
326
327mark > mark,
328em,
329.level-0 {
330 border-bottom-width: 2px;
331 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100332 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100333 font-style: normal;
334}
335
336mark > mark > mark,
337em > em,
338.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100339 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100340}
341
342mark > mark > mark > mark,
343em > em > em,
344.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100345 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100346}
347
348
349#search > ol > li {
350 &:not(.active) mark > mark > mark > mark,
351 &:not(.active) em > em > em {
352 line-height: 180%;
353 }
354 &.active mark > mark > mark > mark,
355 &.active em > em > em {
356 line-height: 250%;
357 }
358}
359
360.class-1 { border-color: $kwic-highlight-1; }
361.class-2 { border-color: $kwic-highlight-2; }
362.class-3 { border-color: $kwic-highlight-3; }
363.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100364
365
366/**
367 * Actions
368 */
369
370ul.action {
371 display: none;
372 // background-color: $dark-orange;
373 font-size: 12pt;
Akron08b82d62016-12-05 15:06:05 +0100374 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100375 text: {
376 shadow: none;
377 indent: 0;
378 }
379 margin: 0;
380 padding: 0;
381 z-index: 5;
382
383 list-style: {
384 type: none;
385 position: inline;
386 }
387 &.right {
388 position: absolute;
Akron08b82d62016-12-05 15:06:05 +0100389 z-index: 4;
Akron3bb91bc2016-12-02 16:43:17 +0100390 width: $right-match-distance;
391 float: right;
392 text-align: center;
393 padding: 0pt 3pt;
394 height: 100%;
395 right: 0;
396 top: 0;
397 li {
398 cursor: pointer;
Akron08b82d62016-12-05 15:06:05 +0100399 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100400 text-decoration: none;
401
402 > span {
403 @include blind;
404 }
405 &.close::after {
406 font-family: "FontAwesome";
407 content: $fa-close;
408 }
409 &.info::after {
410 font-family: "FontAwesome";
411 content: $fa-info;
412 }
413 }
414 }
415}
416