blob: 054dabd70d6f1fc93ba29ee87afaefc2f08a9e66 [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 &,
27 > span.pref:not(:empty) {
28 box-sizing: border-box;
29 text-shadow: none;
30 font-weight: normal;
31 z-index: 120;
32 }
33
34 > li,
35 > span.pref:not(.active) {
36 @include choose-item;
37 }
38
39 > li,
40 > span.pref:not(:empty) {
41 @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,
161 > span.pref.active {
162 @include choose-active;
163 }
164
165 > li:hover,
166 > span.pref:hover {
167 @include choose-hover;
168 }
169
170 /**
171 * Default prefix view
172 */
173 > span.pref:not(:empty) {
174 position: absolute;
175 min-width: 5px;
176 font-size: 80%;
177 left: 0;
178 bottom: 0;
179 display: block;
180 margin-bottom: -2.1em;
181 padding: 2px 6px;
182 border: {
183 radius: $standard-border-radius;
184 width: $border-size;
185 }
186 }
187}
188
189
190/**
191 * Rolling menu
192 */
193ul.menu.roll {
194 > li:first-of-type {
195 &:not(.no-more):before {
196 position: absolute;
197 font-family: "FontAwesome";
198 content: $fa-up;
199 right: .5em;
200 top: .4em;
201 }
202 }
203 > li:last-of-type {
204 &:not(.no-more):before {
205 position: absolute;
206 font-family: "FontAwesome";
207 content: $fa-down;
208 right: .5em;
209 bottom: .4em;
210 }
211 }
212 &:not(.visible) {
213 height: 0;
214 }
215}
216
217
218/**
219 * Sorting menu
220 */
221ul.menu.sort {
222 position: relative;
223 display: inline-block;
224 > li::before {
225 content: '';
226 }
227 > li.active:hover {
228 @include choose-remove;
229 }
230}
231
232
233/**
234 * select menu
235 */
236span.menu.select {
237 > span {
238 z-index: 105;
239 }
240 > ul.menu.roll {
241 display: none;
242 z-index: -100;
243 &.visible {
244 display: block;
245 z-index: 110;
246 }
247 }
248}