Replies: 2 comments
-
|
Hi @MKDJOJO! I'm Dosu and I’m helping the Trilium team. Yes, this is expected behavior. In Trilium, the ~shareCss relation is designed to apply custom CSS to all shared notes within a specific subtree, not globally across the entire app. For global styles that affect all notes, you should use a CSS note with the #appCss attribute—this makes the styles apply everywhere in the app, regardless of sharing or hierarchy. The ~shareCss approach only works for shared subtrees and requires the label to be inheritable to cascade styles within that subtree, but it won't affect notes outside of it or act as a true global stylesheet details more. If you want global CSS, create a note with your CSS and add the #appCss attribute. If you want subtree-specific CSS for shared notes, use ~shareCss with an inheritable label on the relevant shared note reference. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
@MKDJOJO ,
Did you use standard inheritance to apply the attribute globally? It's not clear from your statement whether the relation works and you can't override it in child notes, or that it doesn't get inherited at all. From what I see in the code Also, make sure the note that contains the CSS is also shared. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
In Trilium 0.99.3, I set global styles using ~shareCss, but it does not apply across all notes and cannot be inherited or overridden. Is this expected behavior, or am I missing a configuration?
TriliumNext Version
0.99.3
What operating system are you using?
Other Linux
What is your setup?
Local (no sync)
Operating System Version
docker
Error logs
No response
Beta Was this translation helpful? Give feedback.
All reactions