Screenshot of the article in both light and dark mode with a toggle with 3 states at the top
https://cdn.masto.host/frontendsocial/media_attachments/files/112/717/020/490/933/618/original/763030471a7c1bb7.png
Brandur wrote a really nice tutorial on how to implement a dark mode, that uses prefers-reduced-motion and some local storage, plus some JavaScript to make a tri-state toggle to keep user preferences between always light, always dark, and follow device theme. Here you go: https://brandur.org/fragments/dark-mode-notes
Love it, especially since some of you asked for one, when I wrote Dark mode & accessibility myth (https://stephaniewalter.design/blog/dark-mode-accessibility-myth-debunked/) and explained it’s good practice to let user chose between dark and light mode.
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.