Platform specific CSS


The only way I’ve noticed that it’s possible to do platform specific code is through Node’s process.platform.

However, what I need is conceptually simple - I want to change the window styling via CSS slightly depending on the platform, since I have a custom titlebar on Mac. Ideally this would be done in a “static” way (i.e. without JavaScript), so that you don’t see it “jumping” when after the JavaScript loads.

Is the best way to do this with small piece of inline JavaScript in the header of the main HTML file? (and, for example, add a top level class depending on platform?)


If you want to prevent “jumping” don’t show the window until it has fully loaded, there’s an example in the docs.