Make base.css shareCss inheritable (fix layout on subpages); document shared base

This commit is contained in:
Richard Zink
2026-09-10 09:32:45 +02:00
parent 65cbaaf6cc
commit ed10197775
+7 -1
View File
@@ -64,4 +64,10 @@ If you want to add or customise a theme on a new Trilium instance:
3. Point `~shareCss` on the blog root at the new note (Option A or B).
> **Tip:** After a theme/content change the page may be cached – do a hard reload. If you run
> nginx proxy caching, also clear the cache (see `AGENTS.md` / the nginx guide).
> nginx proxy caching, also clear the cache (see `AGENTS.md` / the nginx guide).
## Shared base stylesheet (since the theme refactor)
The palette-independent layout lives in **`blog_share_base.css`** (note under `.blog`, mime `text/css`). It is attached to the blog root with a **second `shareCss` relation that is inherited (`isInheritable`)**, alongside the per-palette theme relation. When you switch the active palette you change ONLY the theme `shareCss` target; the base relation stays untouched.
Because the base is shared, add any **new generic rule (focus ring, image caps, component layout) to `blog_share_base.css`** instead of duplicating it across all five theme files. The themes now carry only the `:root` variables and the colour-specific components. For production you can serve the minified build via `tools/minify_css.py`.