PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.1.6
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.1.6
1.3.2 1.3.1 1.3.0 1.2.4 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.2.0 All 28 releases
xspeed / assets / theme.css

theme.css in xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN 1.1.6, at assets/theme.css

114 lines 4.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * xSpeed dashboard design tokens + self-hosted fonts (redesign v2).
3 *
4 * Lives in public/ (copied verbatim to assets/ by Vite on build — NOT bundled)
5 * so the @font-face url('./fonts/…') references resolve relative to
6 * assets/theme.css → assets/fonts/…, and so the CSS variables are available to
7 * BOTH the Tailwind utilities in admin.css and every React component. Scoped to
8 * #xspeed-app; dark overrides ride the existing `.dark` class that useTheme
9 * (and PHP's server-side pre-paint) toggles.
10 *
11 * Fonts are Latin-subset woff2 (Inter 400/500/600, Space Grotesk 500/600/700,
12 * JetBrains Mono 400/500) — admin-only, ~168 KB total, font-display: swap.
13 */
14
15 /* ---- Self-hosted fonts ------------------------------------------------- */
16 @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('./fonts/inter-400.woff2') format('woff2'); }
17 @font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('./fonts/inter-500.woff2') format('woff2'); }
18 @font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('./fonts/inter-600.woff2') format('woff2'); }
19 @font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('./fonts/space-grotesk-500.woff2') format('woff2'); }
20 @font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('./fonts/space-grotesk-600.woff2') format('woff2'); }
21 @font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('./fonts/space-grotesk-700.woff2') format('woff2'); }
22 @font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('./fonts/jetbrains-mono-400.woff2') format('woff2'); }
23 @font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('./fonts/jetbrains-mono-500.woff2') format('woff2'); }
24
25 /* ---- Design tokens (light) --------------------------------------------- */
26 #xspeed-app {
27 /* Interactive — muted teal */
28 --primary: #2AA7A0;
29 --primary-hover: #1E9089;
30 --primary-tint: #E6F5F3;
31 --on-primary: #FFFFFF;
32 /* Text/heading colour for content sitting ON a primary/info tint. */
33 --on-tint: #1E8079;
34 --primary-glow: 0 2px 12px rgba(42, 167, 160, .30);
35
36 /* Surfaces */
37 --canvas: #FBFBFC;
38 --paper: #FFFFFF;
39 --panel: #F5F6F8;
40 --line: #E6E8EC;
41 --line-strong: #D8DCE3;
42
43 /* Text */
44 --text: #0E0F13;
45 --text-secondary: #5C6270;
46 --muted: #8A909D;
47 --faint: #A2A8B4;
48
49 /* Semantic (color + tint) */
50 --success: #10B981;
51 --success-tint: #E9F7F1;
52 --warning: #F59E0B;
53 --warning-tint: #FEF4E6;
54 --danger: #EF4444;
55 --danger-tint: #FDECEC;
56 --info: #2AA7A0;
57 --info-tint: #E6F5F3;
58
59 /* Deep-sea rail (deliberately not near-black, to separate from WP's menu) */
60 --rail-top: #14211F;
61 --rail-bottom: #0D1615;
62 --rail-text: #9FADAB;
63 --rail-edge: rgba(255, 255, 255, .06);
64
65 /* Type families */
66 --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
67 --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
68 --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
69
70 /* Shape */
71 --radius-card: 12px;
72 --radius-control: 8px;
73 --radius-pill: 999px;
74
75 font-family: var(--font-sans);
76 color: var(--text);
77 }
78
79 /* ---- Design tokens (dark) — rides the existing .dark class -------------- */
80 #xspeed-app.dark {
81 --canvas: #0E0F13;
82 --paper: #16181D;
83 --panel: #1B1E24;
84 --line: #282C34;
85 --line-strong: #333845;
86 --text: #E7E9EE;
87 --text-secondary: #9AA1AE;
88 --muted: #7E8593;
89 --faint: #6A707D;
90 /* Teal, a touch lighter so it reads on the dark surfaces. */
91 --primary: #34C0B7;
92 --primary-hover: #2AA7A0;
93 --primary-tint: #0E2622;
94 --on-tint: #7FD8CF;
95 --info: #34C0B7;
96 --info-tint: #0E2622;
97 --success-tint: #12251F;
98 --warning-tint: #251C0F;
99 --danger-tint: #2A1516;
100 }
101
102 /* ---- Signature motion (used by the shell + later screens) -------------- */
103 @keyframes xspeed-boltpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
104 @keyframes xspeed-sweep { 0% { background-position: -220px 0; } 100% { background-position: 320px 0; } }
105 @keyframes xspeed-ringfill { from { stroke-dashoffset: 326.7; } to { stroke-dashoffset: 26.1; } }
106
107 /* Signature-motion utility classes (reduced-motion aware via the rule below). */
108 .xspeed-anim-boltpulse { animation: xspeed-boltpulse 1.8s ease-in-out infinite; }
109 .xspeed-anim-sweep { background-size: 220px 100%; animation: xspeed-sweep 1.5s linear infinite; }
110
111 @media (prefers-reduced-motion: reduce) {
112 #xspeed-app [class*="xspeed-anim"] { animation: none !important; }
113 }
114