fix(preview): drawer uses display:none + animation when opened
Some checks failed
CI / build-and-test (push) Failing after 27s
Some checks failed
CI / build-and-test (push) Failing after 27s
Replace the transform-only approach with display:none / display:flex switching, plus a @keyframes drawer-slide-in for the entry animation. The previous translateX trick let the drawer-head close button's SVG bleed through somehow (likely a browser rendering quirk on a 4K display with HiDPI scaling); display:none guarantees the hidden state stays fully hidden across all browsers. Visual is the same when the drawer is open; only the closed state is hardened. Drawer still slides in on the rail settings button or the banner "Open settings" CTA.
This commit is contained in:
parent
46b1ca5874
commit
6b45c398e0
1 changed files with 13 additions and 5 deletions
|
|
@ -427,16 +427,24 @@
|
||||||
/* Settings drawer */
|
/* Settings drawer */
|
||||||
.drawer {
|
.drawer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 44px; right: 0; bottom: 0;
|
top: 44px;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
background: var(--bg-surface);
|
background: var(--bg-surface);
|
||||||
border-left: 1px solid var(--border-subtle);
|
border-left: 1px solid var(--border-subtle);
|
||||||
transform: translateX(100%);
|
flex-direction: column;
|
||||||
transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
||||||
display: flex; flex-direction: column;
|
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.drawer.open {
|
||||||
|
display: flex;
|
||||||
|
animation: drawer-slide-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
|
}
|
||||||
|
@keyframes drawer-slide-in {
|
||||||
|
from { transform: translateX(420px); }
|
||||||
|
to { transform: translateX(0); }
|
||||||
}
|
}
|
||||||
.drawer.open { transform: translateX(0); }
|
|
||||||
.drawer-head {
|
.drawer-head {
|
||||||
height: 56px;
|
height: 56px;
|
||||||
padding: 0 12px 0 20px;
|
padding: 0 12px 0 20px;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue