Simpl-Resultat/src/styles.css
le king fu defa63a063
All checks were successful
PR Check / rust (push) Successful in 21m42s
PR Check / frontend (push) Successful in 2m17s
PR Check / rust (pull_request) Successful in 22m37s
PR Check / frontend (pull_request) Successful in 2m12s
feat(categories): add categories standard guide page (#117)
Adds a read-only Settings subpage at /settings/categories/standard that
exposes the full v1 IPC category taxonomy:

- Recursive tree with per-root expand/collapse (chevron buttons), clickable
  only via the disclosure caret — no destructive actions anywhere on the
  page.
- Live counter banner: roots / subcategories / leaves / total, computed
  from the bundled categoryTaxonomyV1 JSON.
- Accent- and case-insensitive full-text search over translated names;
  matching nodes keep their ancestor chain visible, non-matching branches
  are pruned from the visible tree.
- Hover tooltips (native `title`) showing i18n_key, type (income /
  expense / transfer — translated) and numeric id of each node — useful
  for power-users cross-referencing the consolidated schema.
- Export as PDF button that triggers window.print(); a dedicated
  @media print rule in styles.css forces every branch to render fully
  expanded during printing regardless of the on-screen collapse state,
  and hides the toolbar / back-link.
- All labels resolve via t(node.i18n_key, { defaultValue: node.name })
  to be forward-compatible with future user-created taxonomy rows that
  have no i18n_key.

Also:
- New CategoriesCard in Settings that links to the page (FolderTree
  icon, consistent with the userGuide / changelog card pattern).
- i18n keys added under categoriesSeed.guidePage.* and
  settings.categoriesCard.* (FR + EN).
- CHANGELOG.md + CHANGELOG.fr.md updated under [Unreleased] / Added.

Route uses the English-style `/settings/categories/standard` to match
the rest of the app (/settings, /categories, /changelog, ...). The
original spec mentions a French-accented path but the existing router
is English-only; documenting here so reviewers can see the decision.

No SQL migration, no schema change, no write to the database — this
is strictly a read-only view on the TS-side taxonomy bundle.

Type-check clean (tsc --noEmit), 148/148 vitest tests pass, vite build
succeeds.
2026-04-20 21:02:38 -04:00

161 lines
3.6 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;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}