Skip to content

Commit a46d4e2

Browse files
committed
Add accent color picker animation
1 parent bf90287 commit a46d4e2

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All notable changes to Forge are documented in this file.
44

55
## [Unreleased]
66

7+
- Added an expand and collapse animation for the accent color picker.
78
- Fixed packaged macOS builds loading a blank window by using relative renderer asset paths.
89

910
## [0.0.3]

‎src/styles.css‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,17 +492,26 @@ input {
492492
box-shadow: 0 12px 40px var(--toast-shadow);
493493
opacity: 0;
494494
pointer-events: none;
495-
transform: translateY(-4px);
495+
transform: translate3d(0, -10px, 0) scale(0.68);
496+
transform-origin: calc(100% - 15px) -15px;
496497
transition:
497-
opacity 120ms ease,
498-
transform 120ms ease;
498+
opacity 150ms ease,
499+
transform 190ms cubic-bezier(0.18, 0.89, 0.32, 1.12);
500+
will-change: opacity, transform;
499501
-webkit-app-region: no-drag;
500502
}
501503

502504
.theme-accent-control:hover .accent-picker {
503505
opacity: 1;
504506
pointer-events: auto;
505-
transform: translateY(0);
507+
transform: translate3d(0, 0, 0) scale(1);
508+
}
509+
510+
@media (prefers-reduced-motion: reduce) {
511+
.accent-picker {
512+
transform: translate3d(0, 0, 0) scale(1);
513+
transition: none;
514+
}
506515
}
507516

508517
.accent-swatch {

0 commit comments

Comments
 (0)