Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 1 | @charset "utf-8"; |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 2 | @import "../util"; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 3 | |
4 | $border-size: 2px; | ||||
5 | |||||
6 | /** | ||||
7 | * Menu list - used nearly everywhere | ||||
8 | */ | ||||
9 | ul.menu, | ||||
10 | ul.menu > span.pref:not(:empty) { | ||||
11 | box-sizing: border-box; | ||||
12 | text-shadow: none; | ||||
13 | font-weight: normal; | ||||
14 | // Pagination border? | ||||
15 | |||||
16 | z-index: 7000; | ||||
17 | } | ||||
18 | |||||
19 | ul.menu > li, | ||||
20 | ul.menu > span.pref:not(:empty) { | ||||
21 | box-shadow: $choose-box-shadow; | ||||
22 | border: { | ||||
23 | width: $border-size; | ||||
24 | bottom-width: 0px; | ||||
25 | top-width: 0px; | ||||
26 | style: solid; | ||||
27 | } | ||||
28 | @include choose-item; | ||||
29 | cursor: pointer; | ||||
30 | padding: $item-padding; | ||||
31 | white-space: normal; | ||||
32 | } | ||||
33 | |||||
Akron | 71b91e4 | 2016-06-01 22:12:43 +0200 | [diff] [blame] | 34 | ul.menu span.desc { |
35 | display: block; | ||||
36 | font-size: 75%; | ||||
37 | } | ||||
38 | |||||
Akron | c744873 | 2016-04-27 14:06:58 +0200 | [diff] [blame] | 39 | ul.menu div.lengthField { |
40 | border: { | ||||
41 | color: transparent; | ||||
42 | width: $border-size; | ||||
43 | } | ||||
44 | padding: $item-padding; | ||||
45 | padding-top: 0; | ||||
46 | padding-bottom: 0; | ||||
47 | span { | ||||
48 | display: block; | ||||
49 | line-height: 0; | ||||
50 | color: transparent; | ||||
51 | } | ||||
Akron | c744873 | 2016-04-27 14:06:58 +0200 | [diff] [blame] | 52 | } |
53 | |||||
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 54 | ul.menu > li, |
55 | ul.menu > span.pref:not(.active) { | ||||
56 | @include choose-item; | ||||
57 | } | ||||
58 | |||||
Akron | 28b5697 | 2016-05-18 17:55:20 +0200 | [diff] [blame] | 59 | ul.menu:hover > div.ruler, |
60 | ul.menu > div.ruler.active { | ||||
Akron | a92fd8d | 2016-05-24 21:13:41 +0200 | [diff] [blame] | 61 | transition: opacity .1s ease; |
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 62 | opacity: 1; |
63 | } | ||||
64 | |||||
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 65 | ul.menu { |
66 | position: absolute; | ||||
67 | padding: 0; | ||||
68 | margin: 0; | ||||
69 | text-indent: 0; | ||||
70 | list-style-type: none; | ||||
71 | list-style-position: outside; | ||||
72 | |||||
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 73 | > div.ruler { |
74 | position: absolute; | ||||
75 | right: 0px; | ||||
Akron | 6ed1399 | 2016-05-23 18:06:05 +0200 | [diff] [blame] | 76 | margin-right: -14px; |
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 77 | background-color: transparent; |
Akron | 6ed1399 | 2016-05-23 18:06:05 +0200 | [diff] [blame] | 78 | width: 14px; |
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 79 | height: 100%; |
Akron | 24b1eaa | 2016-05-18 16:00:25 +0200 | [diff] [blame] | 80 | opacity: 0; |
Akron | 47c086c | 2016-05-18 21:22:06 +0200 | [diff] [blame] | 81 | cursor: pointer; |
Akron | a92fd8d | 2016-05-24 21:13:41 +0200 | [diff] [blame] | 82 | transition: opacity .5s ease 1s; |
83 | |||||
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 84 | > span { |
85 | position: absolute; | ||||
Akron | f86eaea | 2016-05-13 18:02:27 +0200 | [diff] [blame] | 86 | @include choose-active; |
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 87 | display: block; |
Akron | 6ed1399 | 2016-05-23 18:06:05 +0200 | [diff] [blame] | 88 | right: 0; |
89 | width: 10px; | ||||
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 90 | z-index: 600; |
Akron | 6ed1399 | 2016-05-23 18:06:05 +0200 | [diff] [blame] | 91 | border: { |
92 | radius: 4px; | ||||
93 | width: 2px; | ||||
94 | style: solid; | ||||
95 | } | ||||
Akron | 28b5697 | 2016-05-18 17:55:20 +0200 | [diff] [blame] | 96 | } |
Akron | 28b5697 | 2016-05-18 17:55:20 +0200 | [diff] [blame] | 97 | &.active > span { |
98 | @include choose-hover; | ||||
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 99 | } |
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 100 | > div { |
Akron | f86eaea | 2016-05-13 18:02:27 +0200 | [diff] [blame] | 101 | box-shadow: $choose-box-shadow; |
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 102 | position: absolute; |
Akron | f86eaea | 2016-05-13 18:02:27 +0200 | [diff] [blame] | 103 | right: 0; |
104 | border: { | ||||
Akron | 6ed1399 | 2016-05-23 18:06:05 +0200 | [diff] [blame] | 105 | width: 2px; |
Akron | f86eaea | 2016-05-13 18:02:27 +0200 | [diff] [blame] | 106 | style: solid; |
107 | } | ||||
Akron | 6ed1399 | 2016-05-23 18:06:05 +0200 | [diff] [blame] | 108 | width: 10px; |
Akron | f86eaea | 2016-05-13 18:02:27 +0200 | [diff] [blame] | 109 | @include choose-item; |
110 | // background-color: -grey; | ||||
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 111 | height: 100%; |
Akron | f86eaea | 2016-05-13 18:02:27 +0200 | [diff] [blame] | 112 | border-radius: 4px; |
Akron | 9905e2a | 2016-05-10 16:06:44 +0200 | [diff] [blame] | 113 | } |
114 | } | ||||
115 | |||||
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 116 | /** |
117 | * List items | ||||
118 | */ | ||||
Akron | c744873 | 2016-04-27 14:06:58 +0200 | [diff] [blame] | 119 | > li, div.lengthField { |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 120 | padding-right: 1.6em; |
Akron | c744873 | 2016-04-27 14:06:58 +0200 | [diff] [blame] | 121 | } |
122 | > li { | ||||
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 123 | |
124 | &:first-of-type { | ||||
125 | border-top: { | ||||
126 | width: $border-size; | ||||
127 | left-radius: $standard-border-radius; | ||||
128 | right-radius: $standard-border-radius; | ||||
129 | } | ||||
130 | } | ||||
131 | &:last-of-type { | ||||
132 | border-bottom: { | ||||
133 | width: $border-size; | ||||
134 | left-radius: $standard-border-radius; | ||||
135 | right-radius: $standard-border-radius; | ||||
136 | } | ||||
137 | } | ||||
138 | mark { | ||||
139 | text-decoration: underline; | ||||
140 | background-color: transparent; | ||||
141 | color: inherit; | ||||
142 | font-weight: bold; | ||||
143 | } | ||||
144 | } | ||||
145 | > li.active, | ||||
146 | > span.pref.active { | ||||
147 | @include choose-active; | ||||
148 | } | ||||
149 | > li:hover, | ||||
150 | > span.pref:hover { | ||||
151 | @include choose-hover; | ||||
152 | } | ||||
153 | |||||
154 | /** | ||||
155 | * Default prefix view | ||||
156 | */ | ||||
157 | > span.pref:not(:empty) { | ||||
158 | position: absolute; | ||||
159 | min-width: 5px; | ||||
160 | font-size: 80%; | ||||
161 | left: 0; | ||||
162 | bottom: 0; | ||||
163 | display: block; | ||||
164 | margin-bottom: -2.1em; | ||||
165 | padding: 2px 6px; | ||||
166 | border: { | ||||
167 | radius: $standard-border-radius; | ||||
168 | width: $border-size; | ||||
169 | } | ||||
170 | } | ||||
171 | } | ||||
172 | |||||
Akron | 6bb7158 | 2016-06-10 20:41:08 +0200 | [diff] [blame] | 173 | ul.menu { |
174 | opacity: 0; | ||||
175 | } | ||||
176 | ul.menu.visible { | ||||
177 | opacity: 1; | ||||
178 | } | ||||
179 | |||||
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 180 | /** |
181 | * Rolling menu | ||||
182 | */ | ||||
183 | ul.menu.roll { | ||||
184 | > li:first-of-type { | ||||
185 | &:not(.no-more):before { | ||||
186 | position: absolute; | ||||
187 | font-family: "FontAwesome"; | ||||
Nils Diewald | 2488d05 | 2015-04-09 21:46:02 +0000 | [diff] [blame] | 188 | content: $fa-up; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 189 | right: .5em; |
190 | top: .4em; | ||||
191 | } | ||||
192 | } | ||||
193 | > li:last-of-type { | ||||
194 | &:not(.no-more):before { | ||||
195 | position: absolute; | ||||
196 | font-family: "FontAwesome"; | ||||
Nils Diewald | 2488d05 | 2015-04-09 21:46:02 +0000 | [diff] [blame] | 197 | content: $fa-down; |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 198 | right: .5em; |
199 | bottom: .4em; | ||||
200 | } | ||||
201 | } | ||||
202 | } | ||||
203 | |||||
Akron | 3bb91bc | 2016-12-02 16:43:17 +0100 | [diff] [blame] | 204 | ul.menu.roll:not(.visible) { |
205 | height: 0; | ||||
206 | } | ||||
207 | |||||
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 208 | |
209 | /** | ||||
210 | * Sorting menu | ||||
211 | */ | ||||
212 | ul.menu.sort { | ||||
213 | position: relative; | ||||
214 | display: inline-block; | ||||
215 | > li::before { | ||||
216 | content: ''; | ||||
217 | } | ||||
218 | > li.active:hover { | ||||
219 | @include choose-remove; | ||||
220 | } | ||||
Akron | 6bb7158 | 2016-06-10 20:41:08 +0200 | [diff] [blame] | 221 | } |
Nils Diewald | a944fab | 2015-04-08 21:02:04 +0000 | [diff] [blame] | 222 | |
Akron | 6bb7158 | 2016-06-10 20:41:08 +0200 | [diff] [blame] | 223 | /** |
224 | * select menu | ||||
225 | */ | ||||
226 | span.menu.select { | ||||
227 | > span { | ||||
228 | z-index: 100; | ||||
229 | } | ||||
230 | > ul.menu.roll { | ||||
231 | display: none; | ||||
232 | z-index: -100; | ||||
233 | &.visible { | ||||
234 | display: block; | ||||
235 | z-index: 200; | ||||
236 | } | ||||
237 | } | ||||
238 | } |