Files
cc-switch/src/index.css
T
Jason bc1f9341f4 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.
2026-05-02 20:33:54 +08:00

194 lines
3.7 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;
--primary: 210 100% 56%;
--primary-foreground: 0 0% 100%;
--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 5.9% 10%;
--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;
--accent: 240 4.8% 95.9%;
--accent-foreground: 240 5.9% 10%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 240 5.9% 90%;
--input: 240 5.9% 90%;
--ring: 210 100% 56%;
--radius: 0.5rem;
}
.dark {
--background: 240 5% 12%;
--foreground: 0 0% 98%;
--card: 240 5% 16%;
--card-foreground: 0 0% 98%;
--popover: 240 5% 16%;
--popover-foreground: 0 0% 98%;
--primary: 210 100% 54%;
--primary-foreground: 0 0% 100%;
--secondary: 240 5% 18%;
--secondary-foreground: 0 0% 98%;
--muted: 240 5% 18%;
--muted-foreground: 240 5% 64.9%;
--accent: 240 5% 18%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 240 5% 24%;
--input: 240 5% 24%;
--ring: 210 100% 54%;
}
}
.glass {
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(0, 0, 0, 0.1);
}
.dark .glass {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.glass-card {
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(0, 0, 0, 0.1);
}
.dark .glass-card {
background: linear-gradient(
145deg,
rgba(255, 255, 255, 0.05) 0%,
rgba(255, 255, 255, 0.01) 100%
);
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.glass-card-active {
background: rgba(59, 130, 246, 0.08);
border: 1px solid rgba(59, 130, 246, 0.4);
}
.dark .glass-card-active {
background: rgba(59, 130, 246, 0.12);
border: 1px solid rgba(59, 130, 246, 0.3);
}
.glass-header {
background: hsl(var(--background));
backdrop-filter: none;
-webkit-backdrop-filter: none;
border: none;
border-top: 2px solid hsl(var(--border));
}
.dark .glass-header {
background: hsl(var(--background));
border: none;
border-top: 2px solid hsl(var(--border));
}
[data-tauri-drag-region] {
-webkit-app-region: drag;
}
[data-tauri-no-drag],
[data-tauri-drag-region] .no-drag {
-webkit-app-region: no-drag;
}
* {
box-sizing: border-box;
scrollbar-width: none;
-ms-overflow-style: none;
}
html {
@apply font-sans antialiased;
line-height: 1.5;
color-scheme: light;
overscroll-behavior: none;
}
body {
@apply m-0 p-0 text-sm;
background-color: hsl(var(--background));
color: hsl(var(--foreground));
}
html.dark {
color-scheme: dark;
}
::-webkit-scrollbar {
display: none;
}
*:focus-visible {
@apply outline-2 outline-blue-500 outline-offset-2;
}
@layer utilities {
.scroll-overlay {
scrollbar-gutter: stable both-edges;
padding-right: 0.5rem;
margin-right: -0.5rem;
overflow-x: hidden;
}
.border-default {
border-width: 1px;
border-color: hsl(var(--border));
}
.border-active {
border-width: 2px;
}
.border-border-default {
border-color: hsl(var(--border));
}
.border-border-active {
border-color: hsl(var(--primary));
}
.border-border-hover {
border-color: hsl(var(--primary) / 0.4);
}
.border-border-dragging {
border-color: hsl(var(--primary) / 0.6);
}
}
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
display: none;
}