Refresh userstyles.css / userchrome.css without relaunch

I posted this in the Plugin development section many months ago. It didn't get any replies but did get a few Likes. It might be because this isn't feasible as a plugin and I perhaps should've requested this as a feature instead.

To reiterate, I'd like to see a feature that can reapply userstyles.css to the markdown rendering. Perhaps the user could choose between using a hotkey or auto-detecting whenever the file has been modified.

And yes, I know about pressing F5 in the development tools, but that reloads everything. It's only barely less clunky and time-consuming than just restarting the app.

And, if feasible, I'd like the same for userchrome.css as well, but I don't know if that's as feasible since it affects the entire UI. If it is, then perhaps they could each have their own hotkey and their own auto-detect options, as well as a hotkey for refreshing both at once.

2 Likes

@fkl Not sure if you're still interested but I will share my workaround for this as someone else might benefit from it.

If we're talking only about custom CSS styles then using inspector from dev tools should be enough.

Here's how to get it going:

Once you open Sources tab you can edit CSS there - it has immediate effect on the elements in app.

If you're using compiler for styles that might not be helpful for you anyway but it's at lest something. :slight_smile:

I'm aware of this, though those are ephemeral changes and while it's good for quick tests, it's not ideal compared to editing the CSS file itself.

userchrome.css editing is definitely the bigger issue. So many, many restarts.

One possible workaround is opening a new Joplin window (right-click on a note > edit in > edit in new window) after each change. In Joplin 3.2.x and 3.3.x, new secondary windows should load use the latest version of userchrome.css when first opened.

2 Likes