Userstyle.css not working

I am using Joplin version 2.7.15 on Windows 10.

I made a very simple userstyle.css, but even after quitting and restarting Joplin, I don't see a change in my notes. I even restarted my whole PC, with no changes.

Copying the exact same contents I have in my userstyle.css into the <style> tags in a note works, however in the userstyle.css it has no effect.

Could you provide the CSS you are trying to use?

It's very simplistic at the moment, as I was only trying to test it.
The userstyle.css has only the content:

.test {
	width: 100px;
    height: 100px;
    background-color: green;

Meanwhile my note has the content:

<div class="test"></div>

What happens if you provide the !important property to these styles? The dev tools will tell you if they are currently being overridden or not.

I added !important to every property, but nothing changed. The dev tools show no styles, aside from display block it inherits from div. It looks like the userstyle.css isn't loaded at all.

Looks ok to me


So the CSS is fine as it is unless you have broken the file somehow or have other incorrect syntax.

I deleted the file and made Joplin re-create it in case it broke, but it's still not working. Is there perhaps some kind of setting I have to toggle to "activate" the stylesheet? It may be hidden, but when I check the HTML in the devtools I can't see it being loaded in with the rest of the stylesheets either.

You shouldn't need to do anything, just modifying and restarting Joplin should be enough.

You are definitely killing Joplin completely aren't you? It isn't just closing and going to the system tray?

Yes, I specifically select "Quit" to close it. As I've mentioned, I even restarted the PC a few times by now (since I've been struggling with this issue for a few days).

Honestly not sure then, I don't think I've ever seen any issues like that and it works just fine on my system:


Anything obvious in the dev console logs?

I attempted to reinstall the software and it worked briefly, but promptly broke again.
The dev console shows a large number of Warnings, all along the lines of

DevTools failed to load source map: Could not parse content for file:///C:/Program%20Files/Joplin/resources/app.asar/ Unexpected end of JSON input

However no errors, and no mention of the userstyle.css

Can you see if the CSS is present in .config/joplin-desktop/tmp? (I assume this works the same for Windows here as it does Linux), it won't be under its original name but there shouldn't be many files in there to look through.

Yes, there's a couple of CSS Files in that folder with random names, one of which seems to contain my CSS.

I think I'm out of ideas then I'm afraid, it sounds like Joplin is loading the CSS just fine and I'm not aware of other reports of this nature (I was playing with userstyle on a windows PC just the other day and it was fine).

The only other thing I can suggest is to post the log files here and hope there is something else or if anyone else has any bright ideas as to what is wrong.

And just to check as this has come up before, you definitely are using the markdown editor/viewer mode and not the richtext editor aren't you?

You can find the log file here:
-1649674646393.log (89.3 KB)

Yes, I'm using the markdown editor/viewer mode.

If you are using privacy badger (and probably some similar tools) they seem to break Discourse's file upload as I found out myself some months ago.

Thank you, it sure does! I updated my previous comment with the uploaded log file now :slight_smile:

Just an idea, but are you, by any chance, using any high contrast themes in Windows? Those will override any custom styles like that. Also, can you post a screenshot showing the whole Joplin window with the non-functional code?

I don't have high contrast on in Windows.

Here's the screenshot, though:

Thank you for the screenshot.

Just to confirm that this isn't related to your current Joplin config, can you try downloading the portable version and checking whether the same problem is present there?