Fix biome lint errors: remove duplicate CSS properties, apply safe auto-fixes

CSS:
- Remove duplicate 'background' fallbacks in base.css, header.css, search.css
  (solid color declared before gradient — gradient always wins)
- Remove duplicate 'padding' in admin.css .admin-import-log

JS (biome --write safe fixes applied):
- function() → arrow functions in all IIFEs and callbacks
- forEach/callback → arrow functions
- evaluePtrn → parseInt(x, 10) in admin-contacts-form.js
- Cleaned label text in build.mjs lint step

Remaining warnings are intentional: !important overrides, descending
specificity (admin.css cascade), noUnusedVariables (functions exported
to window/onclick), useTemplate style preference.
This commit is contained in:
Pontoporeia
2026-06-24 13:21:04 +02:00
parent 82d3dcb084
commit 6ecd3d4540
31 changed files with 336 additions and 348 deletions

View File

@@ -21,142 +21,17 @@
align-items: start;
}
/* ------------------------------------------------------------------ */
/* Table of contents — details/summary block */
/* ------------------------------------------------------------------ */
.toc {
border: none;
border-radius: 0;
background: transparent;
overflow: visible;
}
.toc[open] {
padding-bottom: 0;
}
.toc > :not(summary) {
padding-left: 0;
padding-right: 0;
}
.toc summary {
font-family: var(--font-display);
font-size: var(--step-1);
font-weight: 400;
color: var(--text-primary);
padding: 0 0 var(--space-2xs) 0;
border-bottom: 1px solid var(--text-primary);
display: flex;
align-items: center;
gap: var(--space-2xs);
background: transparent;
cursor: pointer;
list-style: none;
}
.toc summary::-webkit-details-marker {
display: none;
}
.toc summary:hover {
color: inherit;
background: transparent;
}
/* Caret icon inside summary — visible only on mobile */
.toc-caret {
flex-shrink: 0;
transition: transform 0.2s ease;
}
.toc[open] > summary .toc-caret {
transform: rotate(180deg);
}
.toc ul {
list-style: none;
margin: var(--space-xs) 0 0 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--space-3xs);
}
.toc ul a {
font-family: var(--font-body);
font-size: var(--step-0);
font-weight: 300;
color: var(--text-primary);
text-decoration: none;
display: block;
padding: var(--space-3xs) 0;
transition: color 0.15s;
}
.toc ul a:hover {
color: var(--accent-primary);
}
/* Sidebar links (about page) */
.toc-sidebar-link:first-of-type {
padding-top: var(--space-s);
border-top: 1px solid var(--border-primary);
}
.toc-sidebar-link + .toc-sidebar-link {
padding-top: var(--space-xs);
}
.toc-sidebar-link a {
font-size: var(--step--2);
color: var(--accent-primary);
text-decoration: none;
transition: opacity 0.15s;
}
.toc-sidebar-link a:hover {
color: var(--accent-primary);
opacity: 1;
}
/* ------------------------------------------------------------------ */
/* Desktop: force-open TOC, hide caret, sticky sidebar */
/* ------------------------------------------------------------------ */
/* ── TOC styles → components/toc.css (shared with admin) ───────────────── */
/* Grid column positioning for content pages with sidebar TOC */
@media (min-width: 768px) {
.toc {
position: sticky;
top: var(--space-l);
grid-column: 1;
}
.toc summary {
pointer-events: none;
list-style: none;
}
.toc summary::-webkit-details-marker {
display: none;
}
.toc-caret {
display: none;
}
.page-content > .content,
.page-content > .content-section {
.page-content > article {
grid-column: 2;
min-width: 0;
max-width: 100%;
}
}
/* ------------------------------------------------------------------ */
/* Mobile: collapsible TOC */
/* ------------------------------------------------------------------ */
@media (max-width: 767px) {
.page-content {
grid-template-columns: 1fr;
@@ -164,30 +39,25 @@
padding: var(--space-m) var(--space-s) var(--space-xl);
}
.page-content > article {
grid-column: 1;
}
.toc {
margin-top: var(--space-s);
position: static;
grid-column: 1;
}
.page-content > .content,
.page-content > .content-section {
grid-column: 1;
}
.toc summary {
cursor: pointer;
list-style: revert;
}
}
/* ── First content child aligns with TOC heading top ───────────────────── */
.page-content > article > :first-child {
margin-top: 2.2rem;
}
/* ------------------------------------------------------------------ */
/* Main content area */
/* Article content typography */
/* ------------------------------------------------------------------ */
/* Shared typography for about-page sections and charte/licence content */
.content,
.content-section {
.page-content > article {
display: block;
max-width: 100%;
font-family: var(--font-body);
@@ -195,77 +65,57 @@
line-height: 1.6;
color: var(--text-primary);
font-weight: 300;
padding-bottom: var(--space-xl);
}
.content *,
.content-section * {
.page-content > article * {
max-width: 100%;
overflow-wrap: anywhere;
word-break: break-word;
}
.content {
padding-bottom: var(--space-xl);
}
.content p,
.content-section p {
.page-content > article p {
margin: 0 0 1em 0;
}
.content p:last-child,
.content-section p:last-child {
.page-content > article p:last-child {
margin-bottom: 0;
}
.content :where(h1, h2, h3),
.content-section :where(h1, h2, h3) {
.page-content > article :where(h1, h2, h3) {
margin: 1.5em 0 0.5em 0;
}
.content :where(h1, h2, h3):first-child,
.content-section :where(h1, h2, h3):first-child {
margin-top: 2.2rem;
}
.content a,
.content-section a {
.page-content > article a {
color: inherit;
text-decoration: none;
font-weight: 700;
}
.content a:hover,
.content-section a:hover {
.page-content > article a:hover {
color: var(--accent-primary);
text-decoration: none;
}
.content ul,
.content ol,
.content-section ul,
.content-section ol {
.page-content > article ul,
.page-content > article ol {
padding-left: var(--space-m);
margin-bottom: var(--space-s);
}
.content li,
.content-section li {
.page-content > article li {
margin-bottom: 0.3em;
}
.content strong,
.content-section strong {
.page-content > article strong {
font-weight: 700;
}
.content em,
.content-section em {
.page-content > article em {
font-style: italic;
}
.content :where(pre, pre code, code),
.content-section :where(pre, pre code, code) {
.page-content > article :where(pre, pre code, code) {
display: block;
max-width: 100%;
overflow-x: auto;
@@ -288,19 +138,29 @@
max-width: 100%;
}
/* Section separators (about page only — .content-section adds dividers) */
.page-content > .content-section {
/* Section separators (about page only) */
.page-content > article > section {
padding-bottom: var(--space-xl);
border-bottom: 1px solid var(--border-primary);
margin-bottom: var(--space-xl);
}
.page-content > .content-section:last-child {
.page-content > article > section:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: var(--space-xl);
}
/* Scroll margin so anchor links account for the sticky header */
.page-content > article :where(h1, h2, h3) {
scroll-margin-top: var(--space-l);
}
/* Hide CommonMark heading permalink anchors */
.heading-permalink {
display: none;
}
/* ------------------------------------------------------------------ */
/* Section titles */
/* ------------------------------------------------------------------ */
@@ -314,17 +174,6 @@
line-height: 1.1;
}
/* Scroll margin so anchor links account for the sticky header */
.content :where(h1, h2, h3),
.content-section :where(h1, h2, h3) {
scroll-margin-top: var(--space-l);
}
/* Hide CommonMark heading permalink anchors (id now lives on the heading itself) */
.heading-permalink {
display: none;
}
/* ------------------------------------------------------------------ */
/* Contacts grid */
/* ------------------------------------------------------------------ */
@@ -431,7 +280,7 @@
padding: var(--space-m) var(--space-s) var(--space-xl);
}
.content-section {
.page-content > article {
font-size: var(--step-0);
}