fix: adapt frontend for legacy Chrome and runtime config
This commit is contained in:
1 parent
db2f21191c
commit
388a9133fc
84 files changed
+1186
-528
No files matched your search
@@ -135,23 +135,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
--animate-wave: wave 0.6s ease-in-out 2;
|
||||
@keyframes wave {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
25% {
|
||||
transform: rotate(20deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
75% {
|
||||
transform: rotate(20deg);
|
||||
}
|
||||
}
|
||||
|
||||
--animate-breathe-stop: breathe-stop 1.8s ease-in-out infinite;
|
||||
@keyframes breathe-stop {
|
||||
0%,
|
||||
@@ -253,73 +236,113 @@
|
||||
--brand-900: #cf1322;
|
||||
--brand-950: #a8071a;
|
||||
--radius: 0.75rem;
|
||||
--background: oklch(1 0 0);
|
||||
--foreground: oklch(0.22 0.02 25);
|
||||
--card: oklch(1 0.002 95);
|
||||
--card-foreground: oklch(0.22 0.02 25);
|
||||
--popover: oklch(1 0.002 95);
|
||||
--popover-foreground: oklch(0.22 0.02 25);
|
||||
--primary: oklch(0.52 0.19 27);
|
||||
--primary-foreground: oklch(0.99 0 0);
|
||||
--secondary: oklch(0.955 0.008 95);
|
||||
--secondary-foreground: oklch(0.32 0.04 25);
|
||||
--muted: oklch(0.965 0.006 95);
|
||||
--muted-foreground: oklch(0.48 0.02 25);
|
||||
--accent: oklch(0.96 0.04 25);
|
||||
--accent-foreground: oklch(0.35 0.12 25);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--border: oklch(0.9 0.008 95);
|
||||
--input: oklch(0.9 0.01 95);
|
||||
--ring: oklch(0.52 0.19 27 / 0.35);
|
||||
--chart-1: oklch(0.646 0.222 41.116);
|
||||
--chart-2: oklch(0.6 0.118 184.704);
|
||||
--chart-3: oklch(0.398 0.07 227.392);
|
||||
--chart-4: oklch(0.828 0.189 84.429);
|
||||
--chart-5: oklch(0.769 0.188 70.08);
|
||||
--sidebar: oklch(0.995 0.003 95);
|
||||
--sidebar-foreground: oklch(0.28 0.02 25);
|
||||
--sidebar-primary: oklch(0.52 0.19 27);
|
||||
--sidebar-primary-foreground: oklch(0.99 0 0);
|
||||
--sidebar-accent: oklch(0.978 0.018 70);
|
||||
--sidebar-accent-foreground: oklch(0.32 0.05 32);
|
||||
--sidebar-border: oklch(0.92 0.01 85);
|
||||
--sidebar-ring: oklch(0.52 0.19 27 / 0.4);
|
||||
/* Keep the base design tokens in legacy color syntax. CSS custom
|
||||
properties containing oklch() make every dependent Tailwind color rule
|
||||
invalid in Chrome 109 and below. */
|
||||
--background: #ffffff;
|
||||
--foreground: #231716;
|
||||
--card: #ffffff;
|
||||
--card-foreground: #231716;
|
||||
--popover: #ffffff;
|
||||
--popover-foreground: #231716;
|
||||
--primary: #be2323;
|
||||
--primary-foreground: #fcfcfc;
|
||||
--secondary: #f2f0ea;
|
||||
--secondary-foreground: #513b38;
|
||||
--muted: #f5f3ef;
|
||||
--muted-foreground: #695958;
|
||||
--accent: #ffedeb;
|
||||
--accent-foreground: #7b2727;
|
||||
--destructive: #e40014;
|
||||
--border: #dfded8;
|
||||
--input: #e0ded7;
|
||||
--ring: rgba(190, 35, 35, 0.35);
|
||||
--chart-1: #d94a32;
|
||||
--chart-2: #188f95;
|
||||
--chart-3: #4f6680;
|
||||
--chart-4: #e8a72a;
|
||||
--chart-5: #db8d16;
|
||||
--sidebar: #fdfcfb;
|
||||
--sidebar-foreground: #322524;
|
||||
--sidebar-primary: #be2323;
|
||||
--sidebar-primary-foreground: #fcfcfc;
|
||||
--sidebar-accent: #fff6ec;
|
||||
--sidebar-accent-foreground: #633a32;
|
||||
--sidebar-border: #e8e4dd;
|
||||
--sidebar-ring: rgba(190, 35, 35, 0.4);
|
||||
|
||||
/* Chrome 109 fallback channels for Tailwind opacity modifiers. */
|
||||
--legacy-accent-rgb: 255 237 235;
|
||||
--legacy-background-rgb: 255 255 255;
|
||||
--legacy-border-rgb: 223 222 216;
|
||||
--legacy-brand-200-rgb: 254 237 237;
|
||||
--legacy-card-rgb: 255 255 255;
|
||||
--legacy-destructive-rgb: 228 0 20;
|
||||
--legacy-foreground-rgb: 35 23 22;
|
||||
--legacy-input-rgb: 224 222 215;
|
||||
--legacy-muted-rgb: 245 243 239;
|
||||
--legacy-muted-foreground-rgb: 105 89 88;
|
||||
--legacy-primary-rgb: 190 35 35;
|
||||
--legacy-primary-foreground-rgb: 252 252 252;
|
||||
--legacy-ring-rgb: 190 35 35;
|
||||
--legacy-secondary-rgb: 242 240 234;
|
||||
--legacy-sidebar-accent-rgb: 255 246 236;
|
||||
--legacy-sidebar-border-rgb: 232 228 221;
|
||||
--legacy-sidebar-foreground-rgb: 50 37 36;
|
||||
--legacy-workspace-brand-rgb: 245 34 45;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--workspace-brand: #3b82f6;
|
||||
--workspace-brand-foreground: #ffffff;
|
||||
--background: oklch(0.208 0.042 264);
|
||||
--foreground: oklch(0.96 0.005 240);
|
||||
--card: oklch(0.265 0.04 260);
|
||||
--card-foreground: oklch(0.96 0.005 240);
|
||||
--popover: oklch(0.245 0.04 262);
|
||||
--popover-foreground: oklch(0.96 0.005 240);
|
||||
--primary: oklch(0.623 0.214 259);
|
||||
--primary-foreground: oklch(0.99 0 0);
|
||||
--secondary: oklch(0.32 0.038 260);
|
||||
--secondary-foreground: oklch(0.96 0.005 240);
|
||||
--muted: oklch(0.30 0.035 260);
|
||||
--muted-foreground: oklch(0.68 0.02 240);
|
||||
--accent: oklch(0.35 0.06 260);
|
||||
--accent-foreground: oklch(0.96 0.005 240);
|
||||
--destructive: oklch(0.704 0.191 22.216);
|
||||
--border: oklch(1 0 0 / 12%);
|
||||
--input: oklch(1 0 0 / 14%);
|
||||
--ring: oklch(0.623 0.214 259 / 0.45);
|
||||
--chart-1: oklch(0.488 0.243 264.376);
|
||||
--chart-2: oklch(0.696 0.17 162.48);
|
||||
--chart-3: oklch(0.769 0.188 70.08);
|
||||
--chart-4: oklch(0.627 0.265 303.9);
|
||||
--chart-5: oklch(0.645 0.246 16.439);
|
||||
--sidebar: oklch(0.185 0.04 265);
|
||||
--sidebar-foreground: oklch(0.94 0.005 240);
|
||||
--sidebar-primary: oklch(0.623 0.214 259);
|
||||
--sidebar-primary-foreground: oklch(0.99 0 0);
|
||||
--sidebar-accent: oklch(0.30 0.055 260);
|
||||
--sidebar-accent-foreground: oklch(0.96 0.005 240);
|
||||
--sidebar-border: oklch(1 0 0 / 10%);
|
||||
--sidebar-ring: oklch(0.623 0.214 259 / 0.45);
|
||||
--background: #0e172b;
|
||||
--foreground: #eff2f5;
|
||||
--card: #1a2539;
|
||||
--card-foreground: #eff2f5;
|
||||
--popover: #17243a;
|
||||
--popover-foreground: #eff2f5;
|
||||
--primary: #2b81ff;
|
||||
--primary-foreground: #fcfcfc;
|
||||
--secondary: #273346;
|
||||
--secondary-foreground: #eff2f5;
|
||||
--muted: #232e40;
|
||||
--muted-foreground: #8e9aa4;
|
||||
--accent: #283b5a;
|
||||
--accent-foreground: #eff2f5;
|
||||
--destructive: #ff6568;
|
||||
--border: rgba(255, 255, 255, 0.12);
|
||||
--input: rgba(255, 255, 255, 0.14);
|
||||
--ring: rgba(43, 129, 255, 0.45);
|
||||
--chart-1: #236bdb;
|
||||
--chart-2: #51c49d;
|
||||
--chart-3: #e8b02a;
|
||||
--chart-4: #a65be5;
|
||||
--chart-5: #e65a42;
|
||||
--sidebar: #0d1830;
|
||||
--sidebar-foreground: #e8ecee;
|
||||
--sidebar-primary: #2b81ff;
|
||||
--sidebar-primary-foreground: #fcfcfc;
|
||||
--sidebar-accent: #1d2e49;
|
||||
--sidebar-accent-foreground: #eff2f5;
|
||||
--sidebar-border: rgba(255, 255, 255, 0.1);
|
||||
--sidebar-ring: rgba(43, 129, 255, 0.45);
|
||||
--legacy-accent-rgb: 40 59 90;
|
||||
--legacy-background-rgb: 14 23 43;
|
||||
--legacy-border-rgb: 255 255 255;
|
||||
--legacy-card-rgb: 26 37 57;
|
||||
--legacy-destructive-rgb: 255 101 104;
|
||||
--legacy-foreground-rgb: 239 242 245;
|
||||
--legacy-input-rgb: 255 255 255;
|
||||
--legacy-muted-rgb: 35 46 64;
|
||||
--legacy-muted-foreground-rgb: 142 154 164;
|
||||
--legacy-primary-rgb: 43 129 255;
|
||||
--legacy-primary-foreground-rgb: 252 252 252;
|
||||
--legacy-ring-rgb: 43 129 255;
|
||||
--legacy-secondary-rgb: 39 51 70;
|
||||
--legacy-sidebar-accent-rgb: 29 46 73;
|
||||
--legacy-sidebar-border-rgb: 255 255 255;
|
||||
--legacy-sidebar-foreground-rgb: 232 236 238;
|
||||
--legacy-workspace-brand-rgb: 59 130 246;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
@@ -364,6 +387,24 @@
|
||||
--sidebar-accent-foreground: #0056c6;
|
||||
--sidebar-border: #e6ebf2;
|
||||
--sidebar-ring: rgb(0 98 217 / 0.4);
|
||||
--legacy-accent-rgb: 234 244 255;
|
||||
--legacy-background-rgb: 255 255 255;
|
||||
--legacy-border-rgb: 219 219 219;
|
||||
--legacy-brand-200-rgb: 234 244 255;
|
||||
--legacy-card-rgb: 255 255 255;
|
||||
--legacy-destructive-rgb: 245 34 45;
|
||||
--legacy-foreground-rgb: 61 61 61;
|
||||
--legacy-input-rgb: 219 219 219;
|
||||
--legacy-muted-rgb: 243 245 248;
|
||||
--legacy-muted-foreground-rgb: 127 127 127;
|
||||
--legacy-primary-rgb: 0 98 217;
|
||||
--legacy-primary-foreground-rgb: 255 255 255;
|
||||
--legacy-ring-rgb: 0 98 217;
|
||||
--legacy-secondary-rgb: 244 249 255;
|
||||
--legacy-sidebar-accent-rgb: 234 244 255;
|
||||
--legacy-sidebar-border-rgb: 230 235 242;
|
||||
--legacy-sidebar-foreground-rgb: 61 61 61;
|
||||
--legacy-workspace-brand-rgb: 0 98 217;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
@@ -698,7 +739,7 @@
|
||||
}
|
||||
|
||||
.dark .workspace-panel {
|
||||
border: 1px solid oklch(1 0 0 / 10%);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: var(--card);
|
||||
box-shadow: none;
|
||||
}
|
||||
@@ -1004,6 +1045,7 @@
|
||||
--container-width-sm: calc(var(--spacing) * 144);
|
||||
--container-width-md: calc(var(--spacing) * 204);
|
||||
--container-width-lg: calc(var(--spacing) * 256);
|
||||
--container-width-xl: calc(var(--spacing) * 280);
|
||||
}
|
||||
|
||||
/* ── Landing 态输入框 Gemini 风格:旋转彩色描边 + 多色柔光阴影 ───────── */
|
||||
@@ -1237,3 +1279,97 @@ html.lightblue .tiptap-writing-editor .ProseMirror ::selection {
|
||||
color: #1890ff;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
* Legacy Chrome visual fallbacks
|
||||
*
|
||||
* Tailwind v4 deliberately uses color-mix() for `bg-primary/10` and similar
|
||||
* opacity utilities. In Chrome versions without color-mix(), its generated
|
||||
* fallback is the fully opaque primary color. That turns pale selected cards
|
||||
* into solid red blocks and makes same-color icons disappear. Keep critical
|
||||
* agent surfaces on classic rgba()/hex colours instead.
|
||||
* -------------------------------------------------------------------------- */
|
||||
.agent-avatar {
|
||||
background-color: #feeded;
|
||||
color: #cf1322;
|
||||
box-shadow: inset 0 0 0 1px rgba(190, 35, 35, 0.15);
|
||||
}
|
||||
|
||||
.dark .agent-avatar {
|
||||
background-color: #1b355d;
|
||||
color: #ffffff;
|
||||
box-shadow: inset 0 0 0 1px rgba(91, 157, 255, 0.38);
|
||||
}
|
||||
|
||||
.lightblue .agent-avatar {
|
||||
background-color: #eaf4ff;
|
||||
color: #0062d9;
|
||||
box-shadow: inset 0 0 0 1px rgba(0, 98, 217, 0.16);
|
||||
}
|
||||
|
||||
.agent-sidebar-card--active {
|
||||
background-color: #feeded;
|
||||
border-color: rgba(190, 35, 35, 0.5);
|
||||
}
|
||||
|
||||
.dark .agent-sidebar-card--active {
|
||||
background-color: #0b4fae;
|
||||
border-color: #2b8ffe;
|
||||
}
|
||||
|
||||
.lightblue .agent-sidebar-card--active {
|
||||
background-color: #eaf4ff;
|
||||
border-color: rgba(0, 98, 217, 0.5);
|
||||
}
|
||||
|
||||
@supports not (color: oklch(1 0 0)) {
|
||||
.bg-primary\/5 { background-color: rgba(190, 35, 35, 0.05); }
|
||||
.bg-primary\/8 { background-color: rgba(190, 35, 35, 0.08); }
|
||||
.bg-primary\/10 { background-color: rgba(190, 35, 35, 0.10); }
|
||||
.bg-primary\/14 { background-color: rgba(190, 35, 35, 0.14); }
|
||||
.bg-primary\/15 { background-color: rgba(190, 35, 35, 0.15); }
|
||||
.bg-primary\/20 { background-color: rgba(190, 35, 35, 0.20); }
|
||||
.bg-primary\/25 { background-color: rgba(190, 35, 35, 0.25); }
|
||||
.bg-primary\/30 { background-color: rgba(190, 35, 35, 0.30); }
|
||||
.bg-primary\/60 { background-color: rgba(190, 35, 35, 0.60); }
|
||||
.bg-primary\/70 { background-color: rgba(190, 35, 35, 0.70); }
|
||||
.bg-primary\/90 { background-color: rgba(190, 35, 35, 0.90); }
|
||||
.border-primary\/15 { border-color: rgba(190, 35, 35, 0.15); }
|
||||
.border-primary\/20 { border-color: rgba(190, 35, 35, 0.20); }
|
||||
.border-primary\/25 { border-color: rgba(190, 35, 35, 0.25); }
|
||||
.border-primary\/30 { border-color: rgba(190, 35, 35, 0.30); }
|
||||
.border-primary\/35 { border-color: rgba(190, 35, 35, 0.35); }
|
||||
.border-primary\/40 { border-color: rgba(190, 35, 35, 0.40); }
|
||||
.border-primary\/50 { border-color: rgba(190, 35, 35, 0.50); }
|
||||
.border-primary\/60 { border-color: rgba(190, 35, 35, 0.60); }
|
||||
.ring-primary\/15 { --tw-ring-color: rgba(190, 35, 35, 0.15); }
|
||||
.ring-primary\/20 { --tw-ring-color: rgba(190, 35, 35, 0.20); }
|
||||
.ring-primary\/30 { --tw-ring-color: rgba(190, 35, 35, 0.30); }
|
||||
.ring-primary\/40 { --tw-ring-color: rgba(190, 35, 35, 0.40); }
|
||||
.ring-primary\/50 { --tw-ring-color: rgba(190, 35, 35, 0.50); }
|
||||
.ring-primary\/60 { --tw-ring-color: rgba(190, 35, 35, 0.60); }
|
||||
|
||||
.dark .bg-primary\/5 { background-color: rgba(43, 129, 255, 0.05); }
|
||||
.dark .bg-primary\/8 { background-color: rgba(43, 129, 255, 0.08); }
|
||||
.dark .bg-primary\/10 { background-color: rgba(43, 129, 255, 0.10); }
|
||||
.dark .bg-primary\/14 { background-color: rgba(43, 129, 255, 0.14); }
|
||||
.dark .bg-primary\/15 { background-color: rgba(43, 129, 255, 0.15); }
|
||||
.dark .bg-primary\/20 { background-color: rgba(43, 129, 255, 0.20); }
|
||||
.dark .bg-primary\/25 { background-color: rgba(43, 129, 255, 0.25); }
|
||||
.dark .bg-primary\/30 { background-color: rgba(43, 129, 255, 0.30); }
|
||||
.dark .bg-primary\/60 { background-color: rgba(43, 129, 255, 0.60); }
|
||||
.dark .bg-primary\/70 { background-color: rgba(43, 129, 255, 0.70); }
|
||||
.dark .bg-primary\/90 { background-color: rgba(43, 129, 255, 0.90); }
|
||||
|
||||
.lightblue .bg-primary\/5 { background-color: rgba(0, 98, 217, 0.05); }
|
||||
.lightblue .bg-primary\/8 { background-color: rgba(0, 98, 217, 0.08); }
|
||||
.lightblue .bg-primary\/10 { background-color: rgba(0, 98, 217, 0.10); }
|
||||
.lightblue .bg-primary\/14 { background-color: rgba(0, 98, 217, 0.14); }
|
||||
.lightblue .bg-primary\/15 { background-color: rgba(0, 98, 217, 0.15); }
|
||||
.lightblue .bg-primary\/20 { background-color: rgba(0, 98, 217, 0.20); }
|
||||
.lightblue .bg-primary\/25 { background-color: rgba(0, 98, 217, 0.25); }
|
||||
.lightblue .bg-primary\/30 { background-color: rgba(0, 98, 217, 0.30); }
|
||||
.lightblue .bg-primary\/60 { background-color: rgba(0, 98, 217, 0.60); }
|
||||
.lightblue .bg-primary\/70 { background-color: rgba(0, 98, 217, 0.70); }
|
||||
.lightblue .bg-primary\/90 { background-color: rgba(0, 98, 217, 0.90); }
|
||||
}
|
||||
Reference in new issue
Block a user