The ring of `[data-onboarding-highlight="true"]` is an author outline: it wins over the browser's focus ring, so a keyboard user who reached the highlighted control saw nothing change (WCAG 2.4.7, failure F78). Measured by the review in headless Chromium, WebView2's engine: the highlighted button kept `solid 3px` focused or not. `outline: revert` under `:focus-visible` gives the browser's ring back, kept as is in the built stylesheet; the contrast test reads the rule from the stylesheet. Review of #398 (PR #404). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
202 lines
4.8 KiB
CSS
202 lines
4.8 KiB
CSS
@import "tailwindcss";
|
|
|
|
@theme {
|
|
/* Bleu (Primary) */
|
|
--color-bleu-50: #EDF4F7;
|
|
--color-bleu-100: #D4E5EB;
|
|
--color-bleu-200: #A9CBD7;
|
|
--color-bleu-300: #7EB1C3;
|
|
--color-bleu-400: #5A9DB3;
|
|
--color-bleu-500: #4A90A4;
|
|
--color-bleu-600: #3D7789;
|
|
--color-bleu-700: #305E6D;
|
|
--color-bleu-800: #234552;
|
|
--color-bleu-900: #162C36;
|
|
|
|
/* Creme (Background) */
|
|
--color-creme-50: #FFFDFB;
|
|
--color-creme-100: #FFF8F0;
|
|
--color-creme-200: #FFF1E1;
|
|
--color-creme-300: #FFE9D1;
|
|
--color-creme-400: #FFE0C0;
|
|
--color-creme-500: #F5D4AE;
|
|
--color-creme-600: #D4B48E;
|
|
--color-creme-700: #B3946E;
|
|
--color-creme-800: #8A7254;
|
|
--color-creme-900: #61503A;
|
|
|
|
/* Terracotta (Accent) */
|
|
--color-terracotta-50: #FDF2EF;
|
|
--color-terracotta-100: #F9E0DA;
|
|
--color-terracotta-200: #F0C1B5;
|
|
--color-terracotta-300: #E4A291;
|
|
--color-terracotta-400: #D5897A;
|
|
--color-terracotta-500: #C17767;
|
|
--color-terracotta-600: #A46054;
|
|
--color-terracotta-700: #874A41;
|
|
--color-terracotta-800: #6A3A33;
|
|
--color-terracotta-900: #4D2A25;
|
|
}
|
|
|
|
/* Light mode (default) */
|
|
:root {
|
|
--background: var(--color-creme-100);
|
|
--foreground: #1a1a2e;
|
|
--card: #FFFFFF;
|
|
--card-foreground: #1a1a2e;
|
|
--primary: var(--color-bleu-500);
|
|
--primary-foreground: #FFFFFF;
|
|
--accent: var(--color-terracotta-500);
|
|
--accent-foreground: #FFFFFF;
|
|
--muted: var(--color-creme-200);
|
|
--muted-foreground: #6b7280;
|
|
--border: var(--color-creme-300);
|
|
--sidebar-bg: var(--color-bleu-800);
|
|
--sidebar-fg: var(--color-creme-100);
|
|
--sidebar-hover: var(--color-bleu-700);
|
|
--sidebar-active: var(--color-bleu-600);
|
|
--positive: #22c55e;
|
|
--negative: #ef4444;
|
|
}
|
|
|
|
/* Dark mode — inspired by famille-website warm gray palette */
|
|
.dark {
|
|
--background: #111827;
|
|
--foreground: #f3f4f6;
|
|
--card: #1f2937;
|
|
--card-foreground: #f3f4f6;
|
|
--primary: var(--color-bleu-400);
|
|
--primary-foreground: #111827;
|
|
--accent: var(--color-terracotta-400);
|
|
--accent-foreground: #111827;
|
|
--muted: #374151;
|
|
--muted-foreground: #9ca3af;
|
|
--border: #374151;
|
|
--sidebar-bg: #0f172a;
|
|
--sidebar-fg: #f3f4f6;
|
|
--sidebar-hover: #1e293b;
|
|
--sidebar-active: #334155;
|
|
--positive: #4ade80;
|
|
--negative: #f87171;
|
|
}
|
|
|
|
/* Base styles */
|
|
:root {
|
|
color-scheme: light;
|
|
}
|
|
.dark {
|
|
color-scheme: dark;
|
|
}
|
|
|
|
body {
|
|
background-color: var(--background);
|
|
color: var(--foreground);
|
|
font-family: "Inter", system-ui, -apple-system, sans-serif;
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
*, *::before, *::after {
|
|
transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
|
|
}
|
|
|
|
/* Print styles */
|
|
@media print {
|
|
/* Hide app sidebar and docs TOC */
|
|
aside,
|
|
nav.w-56 {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Remove screen layout constraints */
|
|
.h-screen,
|
|
.overflow-hidden,
|
|
.overflow-y-auto {
|
|
height: auto !important;
|
|
overflow: visible !important;
|
|
}
|
|
|
|
/* White background for print */
|
|
body,
|
|
:root {
|
|
background: white !important;
|
|
color: black !important;
|
|
}
|
|
|
|
/* Clean section breaks */
|
|
section {
|
|
break-inside: avoid;
|
|
border-color: #e5e7eb !important;
|
|
}
|
|
|
|
/* Disable transitions for print */
|
|
*, *::before, *::after {
|
|
transition: none !important;
|
|
}
|
|
|
|
/* Force the full categories taxonomy tree to expand on print */
|
|
.taxonomy-children-collapsed {
|
|
display: block !important;
|
|
}
|
|
.taxonomy-node {
|
|
break-inside: avoid;
|
|
}
|
|
}
|
|
|
|
/* Screen-only: collapse state hides unexpanded children */
|
|
.taxonomy-children-collapsed {
|
|
display: none;
|
|
}
|
|
|
|
/*
|
|
* Getting-started path (#398): the control a step card points at. An outline
|
|
* in the accent color, distinct from the primary focus ring and at least 3:1
|
|
* against the page and the cards in both themes (styles.contrast.test.ts),
|
|
* plus a pulse that stops after three cycles (3.6 s, under the 5 s of WCAG
|
|
* 2.2.2) and does not run at all when the system asks for less motion.
|
|
*/
|
|
[data-onboarding-highlight="true"] {
|
|
outline: 3px solid var(--accent);
|
|
outline-offset: 2px;
|
|
animation-name: onboarding-pulse;
|
|
animation-duration: 1.2s;
|
|
animation-timing-function: ease-out;
|
|
animation-iteration-count: 3;
|
|
}
|
|
|
|
/*
|
|
* An author outline wins over the browser's focus ring: without this rule, a
|
|
* keyboard user who reaches the highlighted control would see nothing change
|
|
* (WCAG 2.4.7). The browser's ring comes back while the control has the
|
|
* keyboard focus.
|
|
*/
|
|
[data-onboarding-highlight="true"]:focus-visible {
|
|
outline: revert;
|
|
}
|
|
|
|
@keyframes onboarding-pulse {
|
|
from {
|
|
box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
|
|
}
|
|
to {
|
|
box-shadow: 0 0 0 10px transparent;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
[data-onboarding-highlight="true"] {
|
|
animation: none;
|
|
}
|
|
}
|
|
|
|
/* Scrollbar styling */
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--border);
|
|
border-radius: 3px;
|
|
}
|