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 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 20:55:16 +02:00
parent 5a17cfc408
commit f586da8ba7
+87 -10
View File
@@ -21,15 +21,34 @@
/* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------
Body — paper background, serif body, editorial 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 { html, body, .App {
background: var(--ob-bg) !important; background: var(--ob-bg) !important;
color: var(--ob-text) !important; color: var(--ob-text) !important;
font-family: var(--ob-serif) !important;
font-size: 16.5px !important; font-size: 16.5px !important;
line-height: 1.55 !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 */ /* Headlines — display sans */
h1, h2, h3, h4, h5, h1, h2, h3, h4, h5,
.DiscussionListItem-title, .DiscussionListItem-title,
@@ -93,14 +112,57 @@ h1, h2, h3, h4, h5,
text-transform: none !important; text-transform: none !important;
} }
.Hero { .Hero, .IndexPage .Hero {
background: var(--ob-bg-2) !important; background: var(--ob-bg-2) !important;
color: var(--ob-text) !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; 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 Discussion list — editorial entries, no cards
@@ -142,14 +204,15 @@ h1, h2, h3, h4, h5,
padding: 0.15rem 0.4rem !important; padding: 0.15rem 0.4rem !important;
} }
/* Avatar — soften (greyscale until hover, like the website) */ /* Avatar — squared, lightly desaturated, full color on hover */
.Avatar { .Avatar {
border-radius: 0 !important; border-radius: 0 !important;
filter: grayscale(80%); filter: grayscale(30%) contrast(0.95);
transition: filter 0.3s ease; transition: filter 0.3s ease;
} }
.Avatar:hover,
.DiscussionListItem:hover .Avatar, .DiscussionListItem:hover .Avatar,
.Post:hover .Avatar { filter: grayscale(0%); } .Post:hover .Avatar { filter: grayscale(0%) contrast(1); }
/* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------
Tags Tags
@@ -256,9 +319,23 @@ a:hover { color: var(--ob-accent); border-bottom-color: var(--ob-accent); }
.Post { .Post {
border-bottom: 1px solid var(--ob-border) !important; 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 { .Post-body {
font-family: var(--ob-serif) !important; font-family: var(--ob-serif) !important;
font-size: 1.02rem !important; font-size: 1.02rem !important;