Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dark Mode Toggle #382

Open
j-mie6 opened this issue Mar 9, 2023 · 5 comments
Open

Dark Mode Toggle #382

j-mie6 opened this issue Mar 9, 2023 · 5 comments
Milestone

Comments

@j-mie6
Copy link
Contributor

j-mie6 commented Mar 9, 2023

It would be nice if a toggle button for dark mode could be supported for HTML. As I understand it, the use of dark mode or not is dependent on your operating system or browser configuration, which works great, but it would also be nice if the user can toggle it on and off on a per-case basis: just like in scala3doc!

@Sailsman63
Copy link

How do you see persisting this choice from page to page? Would the site need to use something like a cookie, and would this make a cookie acknowledgement widget necessary?

@roccojiang
Copy link

Taking inspiration from Scala3doc, we should be able to achieve this purely client-side with localStorage!

@Sailsman63
Copy link

That still leaves the question about whether user notification/acknowledgement is required. While localStorage is technically not a cookie, so-called "cookie laws" generally use language like "Store or retrieve data from a user's device". Not sure if this would count as "necessary to provide a requested service", which is commonly listed as an exception to the notice requirements.

@j-mie6
Copy link
Contributor Author

j-mie6 commented Mar 26, 2023

Does scala3doc ask for permission?

@roccojiang
Copy link

Scala3doc doesn't ask for permission. There's some good discussion on the matter at themesberg/flowbite-react#546, and while they removed the use of localStorage in the end, it seems that the general consensus was that it's not a GDPR violation, given that it is required for the website to function (i.e. keep colour preference while browsing) and stores no user-identifiable data. Thoughts?

@jenshalm jenshalm added this to the Backlog milestone Apr 19, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants