mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Split CSS into named layers: reset → colors → typography → base →
components → utilities. Each component has one unique root class in
its own file. No cross-component overrides.
New files:
- reset.css (modern-normalize base — matches project's prior reset)
- colors.css (all colour variables)
- typography.css (font faces, size/space scale, font-family vars)
- base.css (≤ 5 site-wide rules: layout, headings)
- utilities.css (sr-only, skip-link, reduced-motion)
- style.css (root @import file loading all layers)
- components/{links,focus,forms,tables,dialog,details,media,
buttons,badges,toasts,pagination,header,search}.css
Existing files:
- variables.css → backward-compat wrapper (imports colors + typography)
- common.css → backward-compat wrapper (imports style.css)
- Page files (admin, public, form, tfe, apropos, repertoire, system,
file-access) → removed redundant @import url(./variables.css)
- head.php → loads style.css instead of modern-normalize + common.css
- partage pages → load style.css
Fixes vs initial refactoring:
- reset.css: use modern-normalize base (not Tailwind Preflight) to
avoid border/list/heading regressions from aggressive defaults
- components/search.css: restore !important flags on input styles
(needed to override forms.css base input selectors)
- acces.php: add toast feedback on password copy button
Cleaned up duplicate status-badge/toast definitions from admin.css
(now live in components/badges.css and components/toast.css).
45 lines
1.0 KiB
CSS
45 lines
1.0 KiB
CSS
/* ============================================================
|
|
BASE — Minimal site-wide rules. Keep this extremely small
|
|
(≤ 5 rules). Promote a pattern from a component to base
|
|
only once it's clearly universal.
|
|
============================================================ */
|
|
|
|
/* Full-height flex layout: header → main → (optional footer) */
|
|
html, body {
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-body);
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
background: linear-gradient(
|
|
180deg,
|
|
rgba(0, 0, 0, 0) 92%,
|
|
rgba(149, 87, 181, 1) 100%
|
|
);
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
main {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
main * {
|
|
overflow-wrap: anywhere;
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* Global heading scale — used by admin + public pages */
|
|
:where(h1, h2, h3, h4, h5, h6) {
|
|
font-family: var(--font-display);
|
|
font-size: var(--step-2);
|
|
font-weight: 400;
|
|
margin: 0 0 var(--space-l) 0;
|
|
line-height: 1.15;
|
|
}
|