blob: f8e8e35708b117f31f823621bd9d4e24dc11138c [file] [log] [blame]
Akron7e5afce2020-08-25 15:50:19 +02001@charset "utf-8";
2@import "choose";
3@import "lengths";
4@import "icons";
5
6/**
7 * Definitions for menu design.
8 */
9
10ul.menu {
11 position: absolute;
12 padding: 0;
13 margin: 0;
14 text-indent: 0;
15
16 opacity: 0;
17 &.visible {
18 opacity: 1;
19 }
20
21 list-style: {
22 type: none;
23 position: outside;
24 }
25
26 &,
Akronf21bf742021-05-19 13:30:38 +020027 > span.non-item:not(:empty) {
Akron7e5afce2020-08-25 15:50:19 +020028 box-sizing: border-box;
29 text-shadow: none;
30 font-weight: normal;
31 z-index: 120;
32 }
33
34 > li,
Akronf21bf742021-05-19 13:30:38 +020035 > span.non-item:not(.active) {
Akron7e5afce2020-08-25 15:50:19 +020036 @include choose-item;
37 }
38
39 > li,
Akronf21bf742021-05-19 13:30:38 +020040 > span.non-item:not(:empty) {
Akron7e5afce2020-08-25 15:50:19 +020041 @include choose-item;
42 box-shadow: $choose-box-shadow;
43 cursor: pointer;
44 padding: $item-padding;
45 white-space: normal;
46 border: {
47 width: $border-size;
48 bottom-width: 0px;
49 top-width: 0px;
50 style: solid;
51 }
52 }
53 span.desc {
54 display: block;
55 font-size: 75%;
56 }
57
58 div.lengthField {
59 border: {
60 color: transparent;
61 width: $border-size;
62 }
63 padding: $item-padding;
64 padding-top: 0;
65 padding-bottom: 0;
66 span {
67 display: block !important;
68 line-height: 0;
69 color: transparent;
70 }
71 }
72
73 /**
74 * Ruler
75 */
76 > div.ruler {
77 position: absolute;
78 right: 0px;
79 margin-right: -14px;
80 background-color: transparent;
81 width: 14px;
82 height: 100%;
83 opacity: 0;
84 cursor: pointer;
85 transition: opacity .5s ease 1s;
86
87 > span {
88 @include choose-active;
89 position: absolute;
90 display: block;
91 right: 0;
92 width: 10px;
93 z-index: 115;
94 border: {
95 radius: 4px;
96 width: 2px;
97 style: solid;
98 }
99 }
100
101 &.active > span {
102 @include choose-hover;
103 }
104
105 > div {
106 @include choose-item;
107 box-shadow: $choose-box-shadow;
108 position: absolute;
109 right: 0;
110 width: 10px;
111 height: 100%;
112 border: {
113 radius: 4px;
114 width: 2px;
115 style: solid;
116 }
117 }
118 }
119
120 &:active > div.ruler,
121 &:hover > div.ruler,
122 > div.ruler.active {
123 transition: opacity .1s ease;
124 opacity: 1;
125 }
126
127
128 /**
129 * List items
130 */
131 > li,
132 div.lengthField {
133 padding-right: 1.6em;
134 }
135
136 > li {
137 &:first-of-type {
138 border-top: {
139 width: $border-size;
140 left-radius: $standard-border-radius;
141 right-radius: $standard-border-radius;
142 }
143 }
144
145 &:last-of-type {
146 border-bottom: {
147 width: $border-size;
148 left-radius: $standard-border-radius;
149 right-radius: $standard-border-radius;
150 }
151 }
152 mark {
153 text-decoration: underline;
154 background-color: transparent;
155 color: inherit;
156 font-weight: bold;
157 }
158 }
159
160 > li.active,
Akronf21bf742021-05-19 13:30:38 +0200161 span.non-item.active {
Akron7e5afce2020-08-25 15:50:19 +0200162 @include choose-active;
163 }
164
165 > li:hover,
Akronf21bf742021-05-19 13:30:38 +0200166 span.non-item:hover {
Akron7e5afce2020-08-25 15:50:19 +0200167 @include choose-hover;
168 }
169
Akronf21bf742021-05-19 13:30:38 +0200170 span.non-item {
171 border: {
172 radius: $standard-border-radius;
173 width: $border-size !important;
174 }
175 }
176
Akron7e5afce2020-08-25 15:50:19 +0200177 /**
178 * Default prefix view
179 */
Akronf21bf742021-05-19 13:30:38 +0200180 span.pref:not(:empty) {
Akron7e5afce2020-08-25 15:50:19 +0200181 position: absolute;
182 min-width: 5px;
183 font-size: 80%;
184 left: 0;
185 bottom: 0;
186 display: block;
187 margin-bottom: -2.1em;
188 padding: 2px 6px;
Akron7e5afce2020-08-25 15:50:19 +0200189 }
marcrusian235a23a2021-05-26 14:28:11 +0200190 /**
191 * Default entry view
192 */
193 span.entry:not(:empty) {
194 position: absolute;
195 min-width: 5px;
196 font-size: 80%;
197 left: 0;
198 bottom: 0;
199 display: block;
200 margin-bottom: -2.1em;
201 padding: 2px 6px;
202 }
203 span.pref:not(:empty) ~ span.entry:not(:empty){
204 bottom: -27px;
205 }
Akron7e5afce2020-08-25 15:50:19 +0200206}
207
208
209/**
210 * Rolling menu
211 */
212ul.menu.roll {
213 > li:first-of-type {
214 &:not(.no-more):before {
215 position: absolute;
216 font-family: "FontAwesome";
217 content: $fa-up;
218 right: .5em;
219 top: .4em;
220 }
221 }
222 > li:last-of-type {
223 &:not(.no-more):before {
224 position: absolute;
225 font-family: "FontAwesome";
226 content: $fa-down;
227 right: .5em;
228 bottom: .4em;
229 }
230 }
231 &:not(.visible) {
232 height: 0;
233 }
234}
235
236
237/**
238 * Sorting menu
239 */
240ul.menu.sort {
241 position: relative;
242 display: inline-block;
243 > li::before {
244 content: '';
245 }
246 > li.active:hover {
247 @include choose-remove;
248 }
249}
250
251
252/**
253 * select menu
254 */
255span.menu.select {
256 > span {
257 z-index: 105;
258 }
259 > ul.menu.roll {
260 display: none;
261 z-index: -100;
262 &.visible {
263 display: block;
264 z-index: 110;
265 }
266 }
267}