@MarkusBodensee , @lycan-thrope , @shocked-gamer ,
I cannot replicate.
I downloaded Firefox onto a Win10 VM I have, and I ran a blank, out-of-the box copy, no configurations yet, not signed into Firefox at all. I went to https://notepad-plus-plus.org/ , opened F12 to show the Web Developer Tools, went to Storage > Local Storage, and saw https://notepad-plus-plus.org/ had KEY=darkTheme with none when I am in the site’s light mode or screen when I am in the site’s dark mode. (Please note: my experiments are all with the OS and browser in light mode; it is just the website’s light-vs-dark that I’m experimenting with.)
I set the site’s dark mode. Refresh the page, still in dark mode, still shows darkTheme=screen. Close Firefox. Run Firefox. Go to https://notepad-plus-plus.org/. Still in Dark Mode, F12 still shows darkTheme=screen
Maybe when you’re signed out, it uses one set of LocalStorage, and when you’re signed in, it uses another LocalStorage? That’s just a guess, and I don’t have a firefox account, and am not going to bother creating one for this. So, for someone who has the problem: when you’re signed out, if you set it to dark mode, does it stick when you exit Firefox and come back in still signed out? Hmm, re-reading @markusbodensee’s post, this disagrees with what he said. I haven’t regularly used Firefox for the better part of a decade, so I’m out of my depth here… I am just trying to add some data – specifically, that for me, with default Firefox, not logged in, it does remember. So that’s highly pointing to specifics of Firefox installation/settings/plugins/etc.
I double-checked, and my Settings > Privacy & Security had a section called “browsing data” (not “Cookies and Site Data” as @myfancytextgenerator reported). But that section had a setting called “Clear cookies and site data every time you close Firefox”, and that defaulted to not checkmarked.