From ed10197775d874cf8378c1cbfcf7a3d93e5ac28d Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Thu, 10 Sep 2026 09:32:45 +0200 Subject: [PATCH] Make base.css shareCss inheritable (fix layout on subpages); document shared base --- docs/switch-blog-theme.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/switch-blog-theme.md b/docs/switch-blog-theme.md index 654ee59..c240c71 100644 --- a/docs/switch-blog-theme.md +++ b/docs/switch-blog-theme.md @@ -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). \ No newline at end of file +> 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`.