Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 1 | @charset "utf-8"; |
| 2 | @import "choose"; |
| 3 | @import "lengths"; |
| 4 | @import "icons"; |
| 5 | |
| 6 | /** |
| 7 | * Definitions for menu design. |
| 8 | */ |
| 9 | |
| 10 | ul.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 | &, |
Akron | f21bf74 | 2021-05-19 13:30:38 +0200 | [diff] [blame^] | 27 | > span.non-item:not(:empty) { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 28 | box-sizing: border-box; |
| 29 | text-shadow: none; |
| 30 | font-weight: normal; |
| 31 | z-index: 120; |
| 32 | } |
| 33 | |
| 34 | > li, |
Akron | f21bf74 | 2021-05-19 13:30:38 +0200 | [diff] [blame^] | 35 | > span.non-item:not(.active) { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 36 | @include choose-item; |
| 37 | } |
| 38 | |
| 39 | > li, |
Akron | f21bf74 | 2021-05-19 13:30:38 +0200 | [diff] [blame^] | 40 | > span.non-item:not(:empty) { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 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, |
Akron | f21bf74 | 2021-05-19 13:30:38 +0200 | [diff] [blame^] | 161 | span.non-item.active { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 162 | @include choose-active; |
| 163 | } |
| 164 | |
| 165 | > li:hover, |
Akron | f21bf74 | 2021-05-19 13:30:38 +0200 | [diff] [blame^] | 166 | span.non-item:hover { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 167 | @include choose-hover; |
| 168 | } |
| 169 | |
Akron | f21bf74 | 2021-05-19 13:30:38 +0200 | [diff] [blame^] | 170 | span.non-item { |
| 171 | border: { |
| 172 | radius: $standard-border-radius; |
| 173 | width: $border-size !important; |
| 174 | } |
| 175 | } |
| 176 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 177 | /** |
| 178 | * Default prefix view |
| 179 | */ |
Akron | f21bf74 | 2021-05-19 13:30:38 +0200 | [diff] [blame^] | 180 | span.pref:not(:empty) { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 181 | 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; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 189 | } |
| 190 | } |
| 191 | |
| 192 | |
| 193 | /** |
| 194 | * Rolling menu |
| 195 | */ |
| 196 | ul.menu.roll { |
| 197 | > li:first-of-type { |
| 198 | &:not(.no-more):before { |
| 199 | position: absolute; |
| 200 | font-family: "FontAwesome"; |
| 201 | content: $fa-up; |
| 202 | right: .5em; |
| 203 | top: .4em; |
| 204 | } |
| 205 | } |
| 206 | > li:last-of-type { |
| 207 | &:not(.no-more):before { |
| 208 | position: absolute; |
| 209 | font-family: "FontAwesome"; |
| 210 | content: $fa-down; |
| 211 | right: .5em; |
| 212 | bottom: .4em; |
| 213 | } |
| 214 | } |
| 215 | &:not(.visible) { |
| 216 | height: 0; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | |
| 221 | /** |
| 222 | * Sorting menu |
| 223 | */ |
| 224 | ul.menu.sort { |
| 225 | position: relative; |
| 226 | display: inline-block; |
| 227 | > li::before { |
| 228 | content: ''; |
| 229 | } |
| 230 | > li.active:hover { |
| 231 | @include choose-remove; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | |
| 236 | /** |
| 237 | * select menu |
| 238 | */ |
| 239 | span.menu.select { |
| 240 | > span { |
| 241 | z-index: 105; |
| 242 | } |
| 243 | > ul.menu.roll { |
| 244 | display: none; |
| 245 | z-index: -100; |
| 246 | &.visible { |
| 247 | display: block; |
| 248 | z-index: 110; |
| 249 | } |
| 250 | } |
| 251 | } |