From f586da8ba7cc3f601347482b9dd83cd91dde8af3 Mon Sep 17 00:00:00 2001 From: karim Date: Sat, 23 May 2026 20:55:16 +0200 Subject: [PATCH] flarum.css: stronger overrides for serif body, hero, post structure - Force serif on body/post/composer with broader, !important selectors to beat Flarum default cascade - Hero + DiscussionHero: 2px text-colored bottom rule, larger title, italic serif subtitle for a present masthead - Tag pill (e.g. "General") restyled: accent text on paper, sharp corners, mono caps, weighted - Post divider darker; first post gets a top border for symmetry - Avatar greyscale softened (30% instead of 80%) so identity reads without going washed-out Co-Authored-By: Claude Opus 4.7 --- static/flarum.css | 97 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 87 insertions(+), 10 deletions(-) diff --git a/static/flarum.css b/static/flarum.css index 1e9288f..5598ba1 100644 --- a/static/flarum.css +++ b/static/flarum.css @@ -21,15 +21,34 @@ /* ------------------------------------------------------------------------ Body — paper background, serif body, editorial + Aggressive: force serif everywhere, then re-override mono/display zones ------------------------------------------------------------------------ */ +html, body, .App, .App-content, .container, .IndexPage, .DiscussionPage, +.SettingsPage, .UserPage, .NotificationsPage, .Search-results, +p, li, div, span, td, blockquote, .fa, em, strong { + font-family: var(--ob-serif) !important; +} + html, body, .App { background: var(--ob-bg) !important; color: var(--ob-text) !important; - font-family: var(--ob-serif) !important; font-size: 16.5px !important; line-height: 1.55 !important; } +/* Form fields — serif for prose, sans for short controls */ +textarea, .Composer textarea, .Composer-body, .Composer-body *, +.TextEditor, .TextEditor textarea, .ComposerBody-textarea, +.RichEditor, .Post-body, .Post-body * { + font-family: var(--ob-serif) !important; + font-size: 1.02rem !important; + line-height: 1.55 !important; +} + +input, select, .FormControl, .Search-input { + font-family: var(--ob-sans) !important; +} + /* Headlines — display sans */ h1, h2, h3, h4, h5, .DiscussionListItem-title, @@ -93,14 +112,57 @@ h1, h2, h3, h4, h5, text-transform: none !important; } -.Hero { +.Hero, .IndexPage .Hero { background: var(--ob-bg-2) !important; color: var(--ob-text) !important; - border-bottom: 1px solid var(--ob-border) !important; + border-bottom: 2px solid var(--ob-text) !important; text-shadow: none !important; + padding: 2.5rem 1rem !important; +} +.Hero-title { + color: var(--ob-text) !important; + font-size: 2rem !important; + font-weight: 700 !important; + letter-spacing: -0.015em !important; +} +.Hero-subtitle { + color: var(--ob-muted) !important; + font-style: italic; + font-family: var(--ob-serif) !important; + font-size: 1.1rem !important; + margin-top: 0.4rem !important; +} + +/* Discussion page hero (when viewing a thread) — more present */ +.DiscussionHero { + background: var(--ob-bg-2) !important; + border-bottom: 2px solid var(--ob-text) !important; + box-shadow: none !important; + padding: 1.8rem 1rem !important; +} +.DiscussionHero-title { + color: var(--ob-text) !important; + font-size: 1.8rem !important; + font-weight: 700 !important; + letter-spacing: -0.015em !important; +} + +/* Tag badge above title (e.g. "General") — pill but sharper */ +.DiscussionHero .TagsLabel, +.DiscussionHero .TagLabel { + display: inline-block; + background: var(--ob-bg) !important; + border: 1px solid var(--ob-border) !important; + color: var(--ob-accent) !important; + text-transform: uppercase; + font-family: var(--ob-sans) !important; + font-size: 0.72rem !important; + font-weight: 600 !important; + letter-spacing: 0.06em !important; + padding: 0.2rem 0.55rem !important; + border-radius: 0 !important; + margin-bottom: 0.6rem !important; } -.Hero-title { color: var(--ob-text) !important; } -.Hero-subtitle { color: var(--ob-muted) !important; font-style: italic; font-family: var(--ob-serif) !important; } /* ------------------------------------------------------------------------ Discussion list — editorial entries, no cards @@ -142,14 +204,15 @@ h1, h2, h3, h4, h5, padding: 0.15rem 0.4rem !important; } -/* Avatar — soften (greyscale until hover, like the website) */ +/* Avatar — squared, lightly desaturated, full color on hover */ .Avatar { border-radius: 0 !important; - filter: grayscale(80%); + filter: grayscale(30%) contrast(0.95); transition: filter 0.3s ease; } +.Avatar:hover, .DiscussionListItem:hover .Avatar, -.Post:hover .Avatar { filter: grayscale(0%); } +.Post:hover .Avatar { filter: grayscale(0%) contrast(1); } /* ------------------------------------------------------------------------ Tags @@ -256,9 +319,23 @@ a:hover { color: var(--ob-accent); border-bottom-color: var(--ob-accent); } .Post { border-bottom: 1px solid var(--ob-border) !important; - padding: 1rem 0 !important; + padding: 1.5rem 0 !important; +} +.Post:first-child { border-top: 1px solid var(--ob-border) !important; } +.Post-header, +.Post .PostUser, +.Post .username { + font-family: var(--ob-mono) !important; + font-size: 0.85rem !important; + color: var(--ob-muted) !important; + font-weight: 500; +} +.Post .username { color: var(--ob-text) !important; } +.Post .PostMeta time, +.Post .Post-header time { + font-family: var(--ob-mono) !important; + color: var(--ob-muted) !important; } -.Post-header { font-family: var(--ob-mono) !important; font-size: 0.85rem !important; color: var(--ob-muted) !important; } .Post-body { font-family: var(--ob-serif) !important; font-size: 1.02rem !important;