fix(a11y): contrast in both themes; the desktop app can zoom
Computed with the WCAG formula, against the page, cards, and each colour's own /12-/15 tint. Light theme: - Links, primary button labels, warnings and some badges measured 3.2-4.3:1. --primary goes 42% -> 34% (with --ring), --warning 38 -> 29, --destructive 47 -> 42, --success 32 -> 27 and --info 40 -> 35. - --input goes from the --border value to 3.2:1, so text boxes and drop-downs show an edge. --border stays light; card edges carry no meaning. Dark theme: - --destructive 62 -> 67 brings red badges from 4.05 to 4.6. - --input goes 19 -> 40% for the same 3:1 edge. Desktop zoom: tauri.conf.json sets zoomHotkeysEnabled (Tauri's default is false, which also turned off WebView2's zoom). capabilities/zoom.json, which is desktop-only like updater.json, grants core:webview:allow-set-webview-zoom. macOS and Linux zoom through a script Tauri injects that calls it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3423500494
commit
946d097c56
3 files changed
+33
-9
No files matched your search
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "desktop-zoom",
|
||||
"description": "Page zoom with Ctrl/Cmd and +/-. tauri.conf.json turns on zoomHotkeysEnabled: on Windows that is WebView2's own zoom, while on macOS and Linux Tauri injects a script that calls set_webview_zoom, which needs this permission. Desktop-only, like updater.json: the setting does nothing on Android and iOS.",
|
||||
"platforms": [
|
||||
"windows",
|
||||
"linux",
|
||||
"macOS"
|
||||
],
|
||||
"windows": [
|
||||
"main"
|
||||
],
|
||||
"permissions": [
|
||||
"core:webview:allow-set-webview-zoom"
|
||||
]
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
"minWidth": 880,
|
||||
"minHeight": 600,
|
||||
"resizable": true,
|
||||
"zoomHotkeysEnabled": true,
|
||||
"maximizable": true,
|
||||
"fullscreen": false,
|
||||
"center": true,
|
||||
|
||||
@@ -32,7 +32,11 @@
|
||||
--card-foreground: 30 12% 12%;
|
||||
--surface-2: 40 22% 95%;
|
||||
|
||||
--primary: 28 88% 42%;
|
||||
/* Light-theme text tokens are dark enough for 4.5:1 as small text: on the
|
||||
page, on cards, and on their own /12-/15 tints (badges, the active nav
|
||||
item). At 42% the amber links and button labels measured 3.8-3.9:1.
|
||||
Computed with the WCAG formula, not judged by eye. */
|
||||
--primary: 28 88% 34%;
|
||||
--primary-foreground: 40 60% 99%;
|
||||
--secondary: 40 20% 94%;
|
||||
--secondary-foreground: 30 14% 18%;
|
||||
@@ -44,16 +48,19 @@
|
||||
/* Meaning-bearing. These are NOT decoration and do not follow the accent:
|
||||
review scores, safety flags and anti-cheat tiers all read through them,
|
||||
and a reader has to be able to tell them apart at a glance. */
|
||||
--destructive: 358 68% 47%;
|
||||
--destructive: 358 68% 42%;
|
||||
--destructive-foreground: 0 0% 100%;
|
||||
--success: 152 58% 32%;
|
||||
--warning: 36 92% 38%;
|
||||
--info: 205 80% 40%;
|
||||
--success: 152 58% 27%;
|
||||
--warning: 36 92% 29%;
|
||||
--info: 205 80% 35%;
|
||||
|
||||
--border: 38 18% 87%;
|
||||
--border-strong: 36 16% 76%;
|
||||
--input: 38 18% 87%;
|
||||
--ring: 28 88% 42%;
|
||||
/* The edge of a text box or a drop-down is what tells you it is one, so
|
||||
it needs 3:1 against the page (it was 1.3:1, the same as --border).
|
||||
--border stays light: card edges carry no meaning. */
|
||||
--input: 36 12% 54%;
|
||||
--ring: 28 88% 34%;
|
||||
--radius: 0.5rem;
|
||||
|
||||
/* Scrollbars: a warm neutral thumb that warms towards the brand amber on
|
||||
@@ -80,7 +87,7 @@
|
||||
--accent: 30 10% 19%;
|
||||
--accent-foreground: 40 20% 95%;
|
||||
|
||||
--destructive: 358 72% 62%;
|
||||
--destructive: 358 72% 67%;
|
||||
--destructive-foreground: 40 20% 96%;
|
||||
--success: 152 56% 50%;
|
||||
--warning: 38 94% 60%;
|
||||
@@ -88,7 +95,7 @@
|
||||
|
||||
--border: 30 10% 19%;
|
||||
--border-strong: 30 9% 29%;
|
||||
--input: 30 10% 19%;
|
||||
--input: 30 9% 40%;
|
||||
--ring: 34 96% 58%;
|
||||
|
||||
--scrollbar-thumb: 30 9% 28%;
|
||||
|
||||
Reference in new issue
Block a user