Files
chess-endgame-trainer/assets/css/base/_theme.css
T
owenrees 84eee4057e restyle flash toasts and auto-dismiss them
- use brand info/error colours that pass AA contrast in both modes
- dismiss flashes on click on controller pages, where no LiveView handles it
- auto-dismiss real flashes after a few seconds
- keep connection notices pinned until the connection recovers
2026-11-05 15:44:42 +01:00

101 lines
3.3 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: var(--coral-dark);
--color-success-text: var(--mint-deep);
--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-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;
}