fix(styles): correct cross-root token scoping for marimo and gitea

Two related style bugs from the editorial theme port:

marimo.css — our :root token declarations never reached marimo app
descendants. Marimo declares its own tokens on .marimo (class selector,
specificity 0,1,0), which beats :root (0,0,1), so every --background,
--primary, --card, etc. inside the notebook fell back to marimo's
light-dark() defaults. Result: dark navy cell chrome, unreadable form
dropdown row, broken contrast across cells.

Fix: change every :root in marimo.css to ":root, .marimo" so our tokens
apply at the same specificity as marimo's and win by load order.

gitea home.tmpl — the .section-header div was rendering with a dark
navy background behind "Services / Infrastructure" (black text on dark
navy = invisible). Defensively force transparent bg + zero padding/border
on the section-header wrapper and its h2 so no inherited chrome leaks
through.
This commit is contained in:
kert
2026-04-10 15:47:26 -04:00
parent c81992184a
commit 5d2f72b22f
2 changed files with 12 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
/* ============================================
HTI-5 COLOR PALETTE
============================================ */
:root {
:root, .marimo {
--background: #F7F5F0;
--foreground: #1A1A18;
--card: #FAFAF7;
@@ -46,7 +46,7 @@
/* ============================================
FONT CONFIGURATION
============================================ */
:root {
:root, .marimo {
--monospace-font: var(--font-mono);
--text-font: var(--font-body);
--heading-font: var(--font-display);
@@ -58,7 +58,7 @@
/* ============================================
MARIMO SEMANTIC VARIABLES
============================================ */
:root {
:root, .marimo {
--popover: var(--card);
--popover-foreground: var(--foreground);
@@ -94,7 +94,7 @@
Remap neutral scales to HTI-5 warm cream palette.
Steps 11-12 must be dark for text on light bg.
============================================ */
:root {
:root, .marimo {
/* Gray → Warm cream/linen */
--gray-1: #F7F5F0;
--gray-2: #F0EDE6;
@@ -309,7 +309,7 @@
/* ============================================
TAILWIND PROSE - Markdown content
============================================ */
:root {
:root, .marimo {
--tw-prose-body: var(--foreground);
--tw-prose-headings: var(--foreground);
--tw-prose-lead: var(--muted-foreground);

View File

@@ -63,6 +63,9 @@
/* Section header */
.homelab-dashboard .section-header {
margin-bottom: 1.5rem;
background: transparent !important;
padding: 0 !important;
border: none !important;
}
.homelab-dashboard .section-eyebrow {
font-family: "JetBrains Mono", "Fira Code", monospace;
@@ -81,6 +84,10 @@
color: var(--color-text) !important;
line-height: 1.2 !important;
border: none !important;
background: transparent !important;
padding: 0 !important;
margin: 0 !important;
display: block !important;
}
/* Grid */