-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom CSS disappears when system switches to / from dark mode #11019
Comments
It would be helpful if we could see the actual CSS code though 😅. I've seen a similar problem on the forum, and my intuition tells me that you simply need to add |
Sure, here's my CSS: /* For styling the rendered Markdown */
body {
font-family: "Inter";
font-feature-settings: "cv01" on, "cv05" on, "cv08" on, "cv09" on;
}
table td, table th {
font-family: "Inter" !important;
font-feature-settings: "tnum" on, "cv01" on, "cv05" on, "cv08" on, "cv09" on !important;
}
code, pre {
font-family: "Fragment Mono";
}
.katex-display {
font-size: 1rem;
}
/* bigger math newlines to avoid fractions crashing into each other */
.katex .katex-html>.newline {
display: block;
padding-bottom: 0.8em;
}
@media print {
/* break on h1s when exporting to pdf */
h1:not(:nth-of-type(1)) {
page-break-before: always;
break-before: always;
}
/* allow breaks in long multiline math, otherwise keep paragraphs together */
p:not(:has(.katex .newline)) {
break-inside: avoid;
}
} Yes putting |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information. |
Operating system
Linux
Joplin version
3.0.15
Desktop version info
Joplin 3.0.15 (prod, linux)
Client ID: 4416a18efe8f4a1880fa76f17bd712db
Sync Version: 3
Profile Version: 47
Keychain Supported: No
Function Plot: 1.0.0
Templates: 2.4.0
Current behaviour
I have a userstyle.css that just changes the font and tweaks some spacing. Whenever I switch my system to or from dark / light mode (using Koi on KDE Plasma), Joplin switches to the appropriate theme, but my styling is lost and the font reverts back to default. Closing and re-opening Joplin restores the expected custom styles.
Before switching (userstyle.css correctly applied):
After switching (note the different font, most noticeable on the
3
,a
, andl
):Expected behaviour
I expected Joplin to retain my userstyle.css customizations when switching to or from dark mode.
Logs
No response
The text was updated successfully, but these errors were encountered: