Any Simple Way To Add A Skin Changer?
Robohelp 2022.0.346
So, I'm using the frameless HTML skin, and I want to add a skin changer to let people use a light/dark skin, as an accessibility function (tbh, I'm suprised this isn't already a feature of the skin...). However, it seems impossible? It should simply be a case of setting some CSS variables then switching them using some basic JavaScript, however with RoboHelp it seems nothing is ever "simple".
So far I've tried switching the default CSS file and dynamically adding/removing CSS elements, but neither work. The second method I've ALMOST got working, but because RoboHelp generates the LayoutDiff and userstyles CSS files dynamically - and the process is pretty much a black box - I can only ever get it to work on the main topic body container, and not the whole style. To elaborate: I have added a :root class to the layouts.css file which defines all the CSS variables, then when someone switches skin, I'm using the following JavaScript to dynamically swap the :root styles:

Like I say, this almost works, but it seems to be getting overriden by userstyles.css and userstyles.css does NOT use the CSS variables I've defined.
Has anyone got something like this to work, and if so, HOW? I've spent a couple of days on this already, when it should be something that requires only a few minutes to set up!
