mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 00:35:32 +08:00
refactor(theme): remove circular reveal animation for theme switching
The View Transitions API used here crashes WebKitGTK with SIGSEGV on Linux. Rather than gating document.startViewTransition per platform (see PR #2502), drop the animation entirely — it's a low-value visual flourish on a low-frequency action that doesn't justify a permanent platform branch. Removes the ::view-transition-* CSS block and the coordinate plumbing in setTheme. The optional event parameter is kept on the API surface to keep call sites compiling; they'll be cleaned up in a follow-up commit.
This commit is contained in:
@@ -191,41 +191,3 @@ input[type="password"]::-ms-reveal,
|
||||
input[type="password"]::-ms-clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
::view-transition-old(root),
|
||||
::view-transition-new(root) {
|
||||
animation: none;
|
||||
mix-blend-mode: normal;
|
||||
}
|
||||
|
||||
::view-transition-old(root) {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
::view-transition-new(root) {
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
@keyframes theme-circle-expand {
|
||||
from {
|
||||
clip-path: circle(
|
||||
0% at var(--theme-transition-x, 50%) var(--theme-transition-y, 50%)
|
||||
);
|
||||
}
|
||||
|
||||
to {
|
||||
clip-path: circle(
|
||||
150% at var(--theme-transition-x, 50%) var(--theme-transition-y, 50%)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
::view-transition-new(root) {
|
||||
animation: theme-circle-expand 0.4s ease-out;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
::view-transition-new(root) {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user