blob: 670897afa765a5d7de41635b5651e7e5fa402e72 [file] [log] [blame]
Akron49bfdbf2016-11-22 21:47:33 +01001@charset "utf-8";
2@import "../util";
3
4$border-size: 2px;
5
6#search {
7 position: relative;
8 margin-bottom: 30px;
9 overflow: visible;
Akron3bb91bc2016-12-02 16:43:17 +010010// margin-top: 14pt;
Akron49bfdbf2016-11-22 21:47:33 +010011}
12
13#search > ol {
14 overflow-x: hidden;
15 overflow-y: visible;
16 width: auto;
17 border: 1px solid black;
18 text-indent: 0;
19 list-style-type: none;
20 margin: 0;
21 padding: 0;
22 border: 1px solid $kwic-border;
23 font-size: 10pt;
24
25 > li {
26 display: table-row;
27 table-layout: auto;
28 div.meta {
29 position: relative;
30 display: table-cell;
Akron97d42802016-11-26 22:45:46 +010031 width: 2px;
Akron49bfdbf2016-11-22 21:47:33 +010032 z-index: 5;
33 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010034 white-space: nowrap;
35 background-color: $light-green;
36 color: $nearly-white;
37 font-size: 80%;
38 padding: 0 5pt;
Akron49bfdbf2016-11-22 21:47:33 +010039 }
Akron97d42802016-11-26 22:45:46 +010040/*
41 &:first-of-type div.meta {
42 background-color: blue;
43 }
44*/
Akron49bfdbf2016-11-22 21:47:33 +010045 }
46}
47
48#search > ol > li {
49 border: {
50 style: solid;
51 color: $dark-orange;
52 width: 0;
53 }
54}
55
56#search {
57 div.meta, div.match-main {
58 position: relative;
59 }
60 /*
61 &:not(.active):not(:target) {
62 &:nth-of-type(even) div.main-col {
63 */
64 div.match-main {
65 display: table-cell;
66 z-index: 4;
67 > div.match-wrap {
68 width: 99999%;
69 margin-left: -49999.5%;
70 background-color: $kwic-line-noneven;
71 overflow-x: hidden;
72 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010073 white-space: normal;
Akron49bfdbf2016-11-22 21:47:33 +010074 cursor: pointer;
75 }
76 }
77}
78
79#search ol li:nth-of-type(even) div.match-main div.match-wrap {
80 background-color: $kwic-line-even;
81}
82
83
84div.snippet {
85 text-overflow: ellipsis;
86 text-indent: 0;
87 text-shadow: $light-shadow;
88 > span, mark {
89 padding: 5pt 0 6pt 0;
90 white-space: no-wrap !important;
91 > span {
92 white-space: no-wrap !important;
93 }
94 }
95 > mark, > span.match {
96 font-weight: bold;
97 padding-left: 4pt;
98 padding-right: 2pt;
99 }
100}
101
102
103
104#search div.matchinfo {
105 display: none;
106}
107
Akron3bb91bc2016-12-02 16:43:17 +0100108#search li.active div.matchinfo {
109 display: block;
110}
111
112
113
Akron49bfdbf2016-11-22 21:47:33 +0100114/*
115#search ol > li:focus:not(.active) {
116 background-color: $dark-orange !important;
117 &:not(:target) div.flag {
118 border-right-color: $nearly-white;
119 }
120 div.snippet {
121 color: $nearly-white;
122 text-shadow: none !important;
123 .class-3 {
124 border-color: $nearly-white;
125 }
126 }
127 }
128*/
129
130#search div.match-main {
131 position: relative;
132 z-index: 4;
133 > div.match-wrap {
134 margin-left: -49999.5%;
135 width: 99999%;
136 overflow-x: hidden;
137 overflow-y: visible;
138 position: relative;
139 box-sizing: border-box;
140 }
141}
142
143div.snippet.startMore:before,
144div.snippet.endMore:after {
145 content: "…";
146 padding-left: 2pt;
147 padding-right: 2pt;
148}
149
150/**
151 * flag
152 */
153div.snippet div.flag {
154 position: absolute;
155 height: 100%;
Akron3bb91bc2016-12-02 16:43:17 +0100156 top: 0;
157 // margin-left: -49999.5%;
158 // margin-left: 50%;
Akron49bfdbf2016-11-22 21:47:33 +0100159 margin-left: 50%;
160 width: 11px;
161 background-color: $dark-orange;
162 border-right-color: $nearly-white;
163 border-right: 1px solid $darkest-orange;
164}
165
166/**
167 * References
168 */
169#search > ol > li p.ref {
170 display: none;
171}
172
173/**
174 * Active
175 */
176#search > ol {
177 > li.active,
178 > li:target {
Akron3bb91bc2016-12-02 16:43:17 +0100179 background-color: $dark-orange;
180 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100181 text-align: left;
Akron49bfdbf2016-11-22 21:47:33 +0100182 position: relative;
183 border-width: 2px;
184 white-space: wrap;
185 height: auto;
186 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100187
188 div.match-main > div.match-wrap {
189 cursor: default;
190 }
Akron49bfdbf2016-11-22 21:47:33 +0100191 }
192}
193
194#search > ol > li.active {
Akron3bb91bc2016-12-02 16:43:17 +0100195 span {
196 display: inline !important;
197 }
198 ul.action {
199 display: block;
200 }
Akron49bfdbf2016-11-22 21:47:33 +0100201 div.match-wrap {
202 min-height: 20pt;
203 div.snippet {
204 background-color: $light-orange;
205 > * {
206 background-color: transparent;
207 }
208 div.flag {
209 display: none;
210 }
211 padding: 2pt 0 5pt 5pt;
212 margin: {
213 top: 0;
214 right: $right-match-distance; // 3em;
215 bottom: 0;
216 left: 0; // 5pt margin-top
217 }
218 > span {
219 color: black;
220 line-height: 1.4em;
221 width: auto;
222 &.context-left {
223 margin-left: 0;
224 display: inline;
225 overflow: visible;
226 text-align: left;
227 width: auto;
228 }
229 }
230 }
231 }
232}
233
234#search > ol > li.active {
235 overflow: hidden;
236 div.meta {
Akron97d42802016-11-26 22:45:46 +0100237 display: none;
238 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100239 }
240 div.match-main {
Akron3bb91bc2016-12-02 16:43:17 +0100241 width: 100%;
Akron97d42802016-11-26 22:45:46 +0100242 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100243 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100244 background-color: $dark-orange;
245 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100246 margin-left: 0;
247 overflow-x: visible;
248 white-space: wrap;
249 }
250 }
251 p.ref {
252 display: block;
253 color: white;
254 padding: 3pt 10pt 3pt 3pt;
255 padding-right: $right-match-distance;
256 margin: 0pt;
257 width: 100%;
258 bottom: 0;
259 z-index: 30;
260 > span.sigle {
261 font-size: 75%;
262 vertical-align: top;
263 color: $light-orange;
264 float: right;
265 }
266 }
267}
268
269
270
271/**
272 * Right aligned
273 */
274
275#search ol span.context-left {
276 display: inline-block;
277 width: 50.01%;
278 text-align: right;
279}
280
281#search ol.align-right {
282 text-align: right;
283 div.match-main span.context-right {
284 display: inline-block;
285 width: 49.915%;
286 text-align: left;
287 }
288}
289
290
291/**
292 * Highlights
293 */
294mark {
295 background-color: inherit;
296 color: inherit;
297}
298
299mark > mark,
300em,
301.level-0 {
302 border-bottom-width: 2px;
303 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100304 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100305 font-style: normal;
306}
307
308mark > mark > mark,
309em > em,
310.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100311 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100312}
313
314mark > mark > mark > mark,
315em > em > em,
316.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100317 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100318}
319
320
321#search > ol > li {
322 &:not(.active) mark > mark > mark > mark,
323 &:not(.active) em > em > em {
324 line-height: 180%;
325 }
326 &.active mark > mark > mark > mark,
327 &.active em > em > em {
328 line-height: 250%;
329 }
330}
331
332.class-1 { border-color: $kwic-highlight-1; }
333.class-2 { border-color: $kwic-highlight-2; }
334.class-3 { border-color: $kwic-highlight-3; }
335.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100336
337
338/**
339 * Actions
340 */
341
342ul.action {
343 display: none;
344 // background-color: $dark-orange;
345 font-size: 12pt;
346 color: white;
347 text: {
348 shadow: none;
349 indent: 0;
350 }
351 margin: 0;
352 padding: 0;
353 z-index: 5;
354
355 list-style: {
356 type: none;
357 position: inline;
358 }
359 &.right {
360 position: absolute;
361 width: $right-match-distance;
362 float: right;
363 text-align: center;
364 padding: 0pt 3pt;
365 height: 100%;
366 right: 0;
367 top: 0;
368 li {
369 cursor: pointer;
370 color: white;
371 text-decoration: none;
372
373 > span {
374 @include blind;
375 }
376 &.close::after {
377 font-family: "FontAwesome";
378 content: $fa-close;
379 }
380 &.info::after {
381 font-family: "FontAwesome";
382 content: $fa-info;
383 }
384 }
385 }
386}
387