BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.06k stars 1.88k forks source link

[Feature Request]: Add option to assume default light/dark preference from user system preferences #3172

Open xplosionmind opened 2 years ago

xplosionmind commented 2 years ago

Describe the feature you'd like

It would be great if light and dark mode could be toggle automatically, according to the OS preference the user is visiting from.

Describe the benefits this feature would bring to BookStack users

No need to manually toggle dark or light theme every time

Additional context

No response

ssddanbrown commented 2 years ago

Thanks for the suggestion @xplosionmind.

No need to manually toggle dark or light theme every time

The light/dark preference will be stored against the session of the visitor of against the user account if logged in, hence should already not need setting on every visit although sessions may expire.

I guess we could add an auto value to this env option but we'd need have to handle the value on the PHP side, to then run some JS which would sniff CSS to detect this. Not ideal since pretty messy.