|
2 | 2 |
|
3 | 3 | .root { |
4 | 4 | --profile-info-bg: var(--color-background-secondary); |
| 5 | + --music-band-height: 0rem; |
5 | 6 | --rating-outline-color: #000000; |
6 | 7 | --rating-text-color: #000000; |
7 | 8 |
|
|
33 | 34 | } |
34 | 35 |
|
35 | 36 | .plain.minimized { |
36 | | - padding-block: 1.5rem 0; |
| 37 | + padding-block: 1.5rem var(--music-band-height); |
37 | 38 | color: var(--color-text); |
38 | 39 |
|
39 | 40 | .info { |
|
398 | 399 | text-align: center; |
399 | 400 | } |
400 | 401 |
|
| 402 | +// A collapsed header with the music band is taller than a narrow column is wide, and a square would end above the |
| 403 | +// band. The square stays otherwise, so the pattern is not redrawn while the header height animates. |
401 | 404 | .radialPatternBackground { |
402 | 405 | pointer-events: none; |
| 406 | + |
403 | 407 | position: absolute; |
404 | 408 | inset: 0; |
| 409 | + |
405 | 410 | aspect-ratio: 1 / 1; |
| 411 | + width: 100%; |
| 412 | + min-height: 100%; |
406 | 413 | } |
407 | 414 |
|
408 | 415 | .standaloneAvatar { |
|
420 | 427 | } |
421 | 428 |
|
422 | 429 | .minimized { |
423 | | - height: 18rem; |
424 | | - padding-block: 4.25rem 1rem; |
| 430 | + height: calc(18rem + var(--music-band-height)); |
| 431 | + padding-block: 4.25rem calc(1rem + var(--music-band-height)); |
425 | 432 |
|
426 | 433 | .status, .title, .info { |
427 | 434 | align-self: center; |
|
538 | 545 | } |
539 | 546 | } |
540 | 547 |
|
| 548 | +// The music band lies along the bottom edge. The header grows by it, so everything else keeps its place above it. |
| 549 | +.hasMusic { |
| 550 | + --music-band-height: 1.5rem; |
| 551 | +} |
| 552 | + |
| 553 | +.hasMusic:not(.minimized) .info { |
| 554 | + padding-bottom: calc(0.5rem + var(--music-band-height)); |
| 555 | +} |
| 556 | + |
| 557 | +.musicBand { |
| 558 | + position: absolute; |
| 559 | + z-index: 2; |
| 560 | + inset-inline: 0; |
| 561 | + bottom: 0; |
| 562 | + |
| 563 | + height: var(--music-band-height); |
| 564 | +} |
| 565 | + |
| 566 | +// The music band and the balance pill share one background, as on iOS. Over a profile color the tint blends into it |
| 567 | +// with `overlay`, like iOS `blendOver`. |
| 568 | +.root { |
| 569 | + --profile-button-background: rgb(255 255 255 / 10%); |
| 570 | +} |
| 571 | + |
| 572 | +.minimized { |
| 573 | + --profile-button-tint: rgb(255 255 255 / 35%); |
| 574 | + --profile-button-background: linear-gradient(var(--profile-button-tint) 0 0) var(--profile-button-base, transparent); |
| 575 | +} |
| 576 | + |
| 577 | +:global(.theme-dark) .minimized { |
| 578 | + --profile-button-tint: rgb(0 0 0 / 25%); |
| 579 | +} |
| 580 | + |
| 581 | +.plain.minimized { |
| 582 | + --profile-button-background: var(--color-background); |
| 583 | +} |
| 584 | + |
541 | 585 | .hasMusic .info { |
542 | 586 | /* stylelint-disable-next-line plugin/no-low-performance-animation-properties */ |
543 | 587 | transition: padding-bottom 0.25s; |
544 | 588 | } |
545 | 589 |
|
546 | | -.hasMusic:not(.minimized) .info { |
547 | | - padding-bottom: 2.25rem; |
| 590 | +.hasWalletBalance.minimized { |
| 591 | + height: calc(19.75rem + var(--music-band-height)); |
548 | 592 | } |
549 | 593 |
|
550 | | -.hasMusic.minimized { |
551 | | - padding-bottom: 2.75rem; |
| 594 | +.walletBalance { |
| 595 | + pointer-events: auto; |
| 596 | + cursor: var(--custom-cursor, pointer); |
| 597 | + |
| 598 | + position: relative; |
| 599 | + z-index: 1; |
| 600 | + |
| 601 | + overflow: hidden; |
| 602 | + display: flex; |
| 603 | + gap: 0.25rem; |
| 604 | + align-items: center; |
| 605 | + align-self: center; |
| 606 | + |
| 607 | + height: 1.25rem; |
| 608 | + margin-top: 0.5rem; |
| 609 | + padding: 0 0.5rem; |
| 610 | + border: none; |
| 611 | + border-radius: 0.625rem; |
| 612 | + |
| 613 | + font-size: 0.75rem; |
| 614 | + line-height: 1rem; |
| 615 | + color: inherit; |
| 616 | + white-space: nowrap; |
| 617 | + |
| 618 | + background: var(--profile-button-background); |
| 619 | + background-blend-mode: overlay; |
| 620 | + outline: none; |
| 621 | + |
| 622 | + transition: filter 0.15s; |
| 623 | + |
| 624 | + &:hover, |
| 625 | + &:focus-visible { |
| 626 | + filter: brightness(1.1); |
| 627 | + } |
| 628 | + |
| 629 | + @include mixins.with-vt-type('profileAvatar'); |
552 | 630 | } |
553 | 631 |
|
554 | | -.hasMusic.plain { |
555 | | - padding-bottom: 2.75rem; |
| 632 | +// Over the photo the pill lines up under the status along the start edge, with the name and the status |
| 633 | +.hasWalletBalance:not(.minimized) .walletBalance { |
| 634 | + align-self: flex-start; |
556 | 635 | } |
557 | 636 |
|
558 | | -.hasMusic { |
559 | | - /* stylelint-disable-next-line plugin/no-low-performance-animation-properties */ |
560 | | - transition: height 0.25s; |
| 637 | +.walletLabel, |
| 638 | +.walletAmount { |
| 639 | + display: flex; |
| 640 | + gap: 0.25rem; |
| 641 | + align-items: center; |
| 642 | +} |
| 643 | + |
| 644 | +// The wallet card rolls the content up out of the pill while it comes out of it |
| 645 | +.walletLabel, |
| 646 | +.walletChevron { |
| 647 | + translate: 0 var(--wallet-card-shutter, 0); |
| 648 | +} |
| 649 | + |
| 650 | +.walletAmount { |
| 651 | + gap: 0.125rem; |
| 652 | + font-weight: var(--font-weight-semibold); |
| 653 | +} |
| 654 | + |
| 655 | +// `GramIcon` is `1em` high, with side margins that make the gem box as wide as on iOS |
| 656 | +.walletIcon { |
| 657 | + font-size: 0.5625rem; |
| 658 | + color: var(--color-white); |
| 659 | +} |
| 660 | + |
| 661 | +.minimized .walletIcon { |
| 662 | + color: rgb(255 255 255 / 30%); |
561 | 663 | } |
562 | 664 |
|
563 | | -.hasMusic.plain.minimized:not(.withBackground) .standaloneAvatar { |
564 | | - margin-top: 2.75rem; |
| 665 | +.plain.minimized .walletIcon { |
| 666 | + color: var(--color-primary); |
565 | 667 | } |
566 | 668 |
|
567 | | -.musicOverlay { |
568 | | - bottom: 0.375rem; |
| 669 | +// A smaller font with the inherited line height would sit lower and make the pill taller |
| 670 | +.walletFraction { |
| 671 | + font-size: 0.5625rem; |
| 672 | + line-height: 1; |
| 673 | +} |
| 674 | + |
| 675 | +// The glyph sits in the middle of a wider icon box, and its empty sides would widen the gaps around it |
| 676 | +.walletChevron { |
| 677 | + flex-shrink: 0; |
| 678 | + margin-inline: -0.1875rem; |
| 679 | + font-size: 0.875rem; |
569 | 680 | } |
0 commit comments