|
3 | 3 | @import "../../../../styles/mixins";
|
4 | 4 | @import "../../../../styles/typography";
|
5 | 5 |
|
| 6 | +$note-height: 36; |
| 7 | + |
6 | 8 | .fretboard__container {
|
7 | 9 | margin-top: pxToRem($grid-unit * 1);
|
8 | 10 | max-width: $fretonator_max_width;
|
9 | 11 | margin-left: auto;
|
10 | 12 | margin-right: auto;
|
11 | 13 | padding-right: 0;
|
12 |
| - padding-left: pxToRem($grid-unit * 4); |
| 14 | + padding-left: pxToRem($grid-unit * 5); |
13 | 15 | padding-bottom: pxToRem($grid-unit * 4);
|
14 |
| - padding-top: pxToRem($grid-unit * 9); |
| 16 | + padding-top: pxToRem($grid-unit * 7); |
15 | 17 | overflow-x: auto;
|
16 | 18 | transition: max-width 0.09s ease-in-out;
|
17 | 19 |
|
18 | 20 | &.fretboard__wide {
|
19 | 21 | max-width: $fretonator_max_width-wide;
|
20 | 22 | }
|
| 23 | + |
| 24 | + &.fretboard__flip { |
| 25 | + padding-left: 0; |
| 26 | + padding-right: pxToRem($grid-unit * 5); |
| 27 | + direction: rtl; |
| 28 | + } |
21 | 29 | }
|
22 | 30 |
|
23 | 31 | .fretboard__help {
|
|
138 | 146 | transform: translate(-50%, calc(50% - 1px));
|
139 | 147 | }
|
140 | 148 | }
|
| 149 | + |
| 150 | + &.fretboard__leftHanded { |
| 151 | + .fretboard__cell--string { |
| 152 | + &:nth-last-child(-n + 25):after { |
| 153 | + transform: translate(50%, calc(50% - 1px)); |
| 154 | + } |
| 155 | + } |
| 156 | + } |
141 | 157 | }
|
142 | 158 |
|
143 | 159 | .fretboard {
|
144 | 160 | display: grid;
|
145 | 161 | grid-template-columns: 32px repeat(12, minmax(50px, 1fr));
|
| 162 | + padding-top: pxToRem($grid-unit * 3); |
| 163 | + padding-bottom: pxToRem($grid-unit * 3); |
146 | 164 |
|
147 | 165 | &.fretboard__24 {
|
148 | 166 | grid-template-columns: 32px repeat(24, minmax(50px, 1fr));
|
|
235 | 253 |
|
236 | 254 | &:after {
|
237 | 255 | content: attr(data-display-note);
|
238 |
| - height: var(--note-height); |
239 |
| - width: var(--note-height); |
240 |
| - line-height: var(--note-height); |
| 256 | + height: pxToRem($note-height); |
| 257 | + width: pxToRem($note-height); |
| 258 | + line-height: pxToRem($note-height); |
241 | 259 | left: 50%;
|
242 | 260 | right: unset;
|
243 | 261 | box-sizing: border-box;
|
|
252 | 270 | transition-duration: 0.1s;
|
253 | 271 | transition-property: line-height, height, width, opacity;
|
254 | 272 | transition-timing-function: ease-in-out;
|
255 |
| - } |
256 |
| - |
257 |
| - &:hover:after, |
258 |
| - &:active:after { |
259 |
| - height: var(--note-height-hover); |
260 |
| - width: var(--note-height-hover); |
261 |
| - line-height: var(--note-height-hover); |
| 273 | + direction: ltr; |
262 | 274 | }
|
263 | 275 |
|
264 | 276 | &:nth-child(-n + 13):after {
|
|
317 | 329 |
|
318 | 330 | &:after {
|
319 | 331 | content: attr(data-string-name);
|
320 |
| - height: var(--note-height); |
321 |
| - width: var(--note-height); |
| 332 | + height: pxToRem($note-height); |
| 333 | + width: pxToRem($note-height); |
322 | 334 | left: 0;
|
323 | 335 | right: unset;
|
324 | 336 | box-sizing: border-box;
|
325 | 337 | border-radius: 50%;
|
326 | 338 | transform: translate(-50%, 50%);
|
327 | 339 | color: var(--string-color);
|
328 |
| - line-height: var(--note-height); |
| 340 | + line-height: pxToRem($note-height); |
329 | 341 | text-align: center;
|
330 | 342 | font-weight: var(--font-weight-bold);
|
331 | 343 | font-family: var(--font-family-main);
|
|
381 | 393 | .arrowHint {
|
382 | 394 | position: relative;
|
383 | 395 | display: block;
|
| 396 | + margin-top: pxToRem($grid-unit * 4); |
| 397 | + |
| 398 | + @media screen and (min-width: 712px) { |
| 399 | + display: none; |
| 400 | + } |
384 | 401 | }
|
385 | 402 |
|
386 | 403 | .arrowHint__arrow {
|
|
395 | 412 | content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 512 512'%3E%3Cpath fill='%233993dd' d='M319.1 217c20.2 20.2 19.9 53.2-.6 73.7s-53.5 20.8-73.7.6l-190-190c-20.1-20.2-19.8-53.2.7-73.7S109 6.8 129.1 27l190 190z'/%3E%3Cpath fill='%233993dd' d='M319.1 290.5c20.2-20.2 19.9-53.2-.6-73.7s-53.5-20.8-73.7-.6l-190 190c-20.2 20.2-19.9 53.2.6 73.7s53.5 20.8 73.7.6l190-190z'/%3E%3C/svg%3E");
|
396 | 413 | }
|
397 | 414 |
|
398 |
| - @media screen and (min-width: 712px) { |
399 |
| - display: none; |
| 415 | + |
| 416 | + &.fretboard__flip { |
| 417 | + right: unset; |
| 418 | + left: 0; |
| 419 | + transform: rotate(180deg); |
400 | 420 | }
|
401 | 421 | }
|
402 | 422 |
|
|
428 | 448 | height: pxToRem(44);
|
429 | 449 | }
|
430 | 450 |
|
| 451 | +.toggle__shortLabel { |
| 452 | + display: inline; |
| 453 | + font-weight: inherit; |
| 454 | + padding-left: pxToRem($grid_unit * 1.5); |
| 455 | + padding-right: pxToRem($grid_unit * 1.5); |
| 456 | + |
| 457 | + @media screen and (min-width: $screen-med) { |
| 458 | + display: none; |
| 459 | + } |
| 460 | +} |
| 461 | + |
| 462 | +.toggle__longLabel { |
| 463 | + display: none; |
| 464 | + font-weight: inherit; |
| 465 | + |
| 466 | + @media screen and (min-width: $screen-med) { |
| 467 | + display: inline; |
| 468 | + } |
| 469 | +} |
| 470 | + |
431 | 471 | .fretboard__toggleButton--active {
|
432 | 472 | background-color: var(--black);
|
433 | 473 | color: var(--offwhite);
|
434 | 474 | }
|
435 | 475 |
|
436 |
| -.fretboard__toggleButton--twelve { |
| 476 | +.fretboard__toggleButton--left { |
437 | 477 | border-top-right-radius: 0;
|
438 | 478 | border-bottom-right-radius: 0;
|
439 | 479 | border-right-width: calc(var(--border-width-button) / 2);
|
440 | 480 | }
|
441 | 481 |
|
442 |
| -.fretboard__toggleButton--twentyFour { |
| 482 | +.fretboard__toggleButton--middle-left { |
| 483 | + border-radius: 0; |
| 484 | + border-right-width: calc(var(--border-width-button) / 2); |
| 485 | + border-left-width: 0; |
| 486 | +} |
| 487 | + |
| 488 | +.fretboard__toggleButton--middle-right { |
| 489 | + border-radius: 0; |
| 490 | + border-right-width: 0; |
| 491 | + border-left-width: calc(var(--border-width-button) / 2); |
| 492 | +} |
| 493 | + |
| 494 | +.fretboard__toggleButton--right { |
443 | 495 | border-top-left-radius: 0;
|
444 | 496 | border-bottom-left-radius: 0;
|
445 | 497 | border-left-width: calc(var(--border-width-button) / 2);
|
|
451 | 503 | width: pxToRem($grid-unit * 2);
|
452 | 504 | margin-right: pxToRem($grid-unit);
|
453 | 505 | }
|
| 506 | + |
| 507 | +.fretboard__leftHanded { |
| 508 | + .fretboard__cell { |
| 509 | + border-left: var(--fret-width-base) solid var(--fret-color); |
| 510 | + border-right: unset; |
| 511 | + } |
| 512 | + |
| 513 | + .fretboard__cell--string { |
| 514 | + border-left: pxToRem(6) solid var(--nut-color); |
| 515 | + border-right: unset; |
| 516 | + |
| 517 | + &:after { |
| 518 | + transform: translate(50%, 50%); |
| 519 | + } |
| 520 | + |
| 521 | + &:nth-child(-n + 13):after { |
| 522 | + transform: translate(50%, 6px); |
| 523 | + } |
| 524 | + |
| 525 | + &:nth-last-child(-n + 13):after { |
| 526 | + bottom: 0; |
| 527 | + top: unset; |
| 528 | + transform: translate(50%, calc(50% - 1px)); |
| 529 | + } |
| 530 | + } |
| 531 | +} |
0 commit comments