Light Theme as a default

Is it possibly to get the Classic theme as the default? I delete my cookies after each session because I don’t want to be tracked around the Internet.

Every time I revisit the website the theme changed back to Slate (dark). I find light text on dark background hard to read for longer stories (I see white stripes afterwards for some minutes). Would it be possible to set the Classic (or any light) theme as a default?

By the way: I block the recurring, cookie-dependent Age Check Modal by the userCSS #ageCheckModal, .modal-backdrop-fullscreen { display: none !important; } .modal-open { overflow:auto !important; } – but for resetting the theme the needed CSS would be extensive.

I’m sorry, but whether you want a bright or dark theme is a matter of preference, that’s why I’m using a cookie (called “currentTheme” btw) to store the setting.

I don’t want to argue that you delete all your cookies, but this comes with disadvantages, as you know for sure. Normally, it’s sufficient to block third-party cookies only, blocking the cookies of the sites you’re visiting is hardly ever useful. But that’s just my opinion.

The next guy will tell me that he prefers the dark theme and he doesn’t want to use cookies either. There’s just no pleasing everyone, I’m afraid. So in this case I go with my own preference, which is a dark theme. Switching to the classic one is just a click away, so I hope you can live with that nuisance.

When a user deletes cookies, does it also delete local data? If it doesn’t, you could use that to save the user’s selected theme instead? I think it’s a few lines of extra JavaScript code, depending on if you did the theme in css or on server side. If it’s server side, you could store it in local data and trigger a refresh on the page if the local data doesn’t match the cookie.

I’m using LocalData whereever possible (like for the markings of new comments and stories), but for the theme this turned out difficult. I had it working, but got flashing on each new page, because the JavaScript couldn’t adapt the theme’s link before the page is shown. And LocalData can only be used client side.

A cookie otoh, can be checked server-side, so I can set the stylesheet’s name in the .gsp file directly.

Your idea of sending the LocalData to the server to use it for subsequent accesses in the same session would reduce the flash to only the first page access, but it would still be there.

Also, I’m pretty sure that if you run the browser in “privacy” mode, it will also delete all LocalData. Would make sense, because you can use LocalData just as well as cookies to track user information.

Yeah, I figured local data got erased too, in certain cases.

Another suggestion: add a get parameter that can override and set the cookie. That way, savvy users (as the anonymous poster sounds) could add that to the URL and then book mark it.

That’s a good idea. I’ll look into it as soon as I find the time.

[Thread starter] Thanks for your answers! I understand that themes are just a preference and of course very subjective. So your reasoning is understandable, Martin. I didn’t intend to increase your work load – thank you for managing this website! If a parameter in the URL was possible and not too laborious it would be great!

It’s now possible to select the theme with the parameter


possible values are: ‘classic’,‘slate’,‘cerulean’,‘cyborg’,‘darkly’,‘readable’,‘sandstone’,‘sapacelab’,‘superhero’,‘united’



Awesome again Martin!

1 Like

[Thread Starter] Great! I’ve already updated my bookmark. Thank you so much!

1 Like