mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
* commented out lesson and learning strip until lessons are established * reword the hero section * change layout and working on puzzle section - remove top div as it was redundant * amend flash message on replay * switch cancel session for return home * remove system theme toggle since this is the default, leaving only light and dark toggles * add keyboard and screen reader support for play (#72) First draft covering the accessibility work in #72:\n\n- labelled SAN/UCI move input, validated against the tablebase and applied\n by the board hook, plus an accessible promotion picker\n- live-region announcements for moves, checks, checkmates and solve/fail,\n and a hidden text summary of the position\n- accessible labels, focus ring, skip link, keyboard-friendly review table\n and non-colour grade cues\n- WCAG AA text contrast roles and a responsive play surface\n- regression tests for move entry, announcements and link-style CTAs
107 lines
3.5 KiB
CSS
107 lines
3.5 KiB
CSS
@theme static {
|
|
/* Roles — light mode reads from the palette. */
|
|
--color-canvas: var(--paper);
|
|
--color-canvas-raised: var(--cream);
|
|
--color-body: var(--ink);
|
|
--color-muted: var(--ink-soft);
|
|
--color-hairline: var(--line);
|
|
--color-deep: var(--ink);
|
|
--color-on-deep: var(--paper);
|
|
--color-coral: var(--coral);
|
|
--color-coral-control: var(--coral);
|
|
--color-coral-control-hover: var(--coral-dark);
|
|
--color-coral-text: #b8432c;
|
|
--color-success-text: #3f6d5a;
|
|
--color-warning-text: #8a5a00;
|
|
--color-primary-text: #b8432c;
|
|
--color-error-text: #b8432c;
|
|
--color-mint-chip: var(--mint);
|
|
--color-on-accent-muted: #5f2c23;
|
|
|
|
/* Content colours — identical in every colour mode. */
|
|
--color-board-light: #e9e1cc;
|
|
--color-board-dark: #81a996;
|
|
--color-piece-light: #fffdf5;
|
|
--color-piece-outline: #17352d;
|
|
--color-on-deep-muted: #c8d6d1;
|
|
--color-on-deep-faint: #a9beb6;
|
|
|
|
/* Promotion picker. */
|
|
--color-promotion-surface: #ffffff;
|
|
--color-promotion-tile: #fafafa;
|
|
--color-promotion-tile-hover: #fff1ec;
|
|
--color-promotion-selected: var(--coral);
|
|
|
|
/* Phoenix semantic tokens, retuned to the brand. Utilities such as
|
|
`bg-base-200` and `text-base-content` resolve through these. */
|
|
--color-base-100: #fffcf4;
|
|
--color-base-200: #f4f0e6;
|
|
--color-base-300: #e7e1d3;
|
|
--color-base-content: #17352d;
|
|
--color-primary: #c74c33;
|
|
--color-primary-content: #ffffff;
|
|
--color-secondary: #17352d;
|
|
--color-secondary-content: #f4f0e6;
|
|
--color-accent: #3f6d5a;
|
|
--color-accent-content: #ffffff;
|
|
--color-neutral: #587068;
|
|
--color-neutral-content: #f4f0e6;
|
|
/* Toasts use the brand palette rather than the stock blue/red: info is the
|
|
deep ink green, error is the coral used by primary actions. Both pass AA
|
|
against their content colour. */
|
|
--color-info: #17352d;
|
|
--color-info-content: #fffcf4;
|
|
--color-success: oklch(70% 0.14 182.503);
|
|
--color-success-content: oklch(98% 0.014 180.72);
|
|
--color-warning: oklch(66% 0.179 58.318);
|
|
--color-warning-content: oklch(98% 0.022 95.277);
|
|
--color-error: #c74c33;
|
|
--color-error-content: #ffffff;
|
|
}
|
|
|
|
html[data-theme="dark"] {
|
|
color-scheme: dark;
|
|
|
|
--color-canvas: #0f1714;
|
|
--color-canvas-raised: #1b2822;
|
|
--color-body: #e9efe9;
|
|
--color-muted: #9ab0a5;
|
|
--color-hairline: rgba(233, 239, 233, 0.14);
|
|
--color-deep: #1d3c33;
|
|
--color-on-deep: #f4f0e6;
|
|
--color-coral: #f2816b;
|
|
--color-coral-control: #c74c33;
|
|
--color-coral-control-hover: #b8432c;
|
|
--color-coral-text: #ff9c85;
|
|
--color-success-text: #8fd3b5;
|
|
--color-warning-text: #f0b35a;
|
|
--color-primary-text: #f2816b;
|
|
--color-error-text: #f2816b;
|
|
--color-mint-chip: #24403a;
|
|
--color-on-accent-muted: rgba(255, 255, 255, 0.97);
|
|
--color-promotion-surface: #1b2822;
|
|
--color-promotion-tile: #233029;
|
|
--color-promotion-tile-hover: #2c3d35;
|
|
--color-promotion-selected: #ff9c85;
|
|
|
|
--color-base-100: #1b2822;
|
|
--color-base-200: #141f1a;
|
|
--color-base-300: #0f1714;
|
|
--color-base-content: #e9efe9;
|
|
--color-primary: #c74c33;
|
|
--color-primary-content: #ffffff;
|
|
--color-secondary: #1d3c33;
|
|
--color-secondary-content: #f4f0e6;
|
|
--color-accent: #8fd3b5;
|
|
--color-accent-content: #0f1714;
|
|
--color-neutral: #2b3a33;
|
|
--color-neutral-content: #e9efe9;
|
|
--color-info: #24403a;
|
|
--color-info-content: #e9efe9;
|
|
--color-success: oklch(72% 0.13 165);
|
|
--color-success-content: oklch(15% 0.02 165);
|
|
--color-warning: oklch(78% 0.15 75);
|
|
--color-warning-content: oklch(20% 0.03 75);
|
|
--color-error: #c74c33;
|
|
--color-error-content: #ffffff;
|
|
} |