stalwartlabs / webadmin

Web-based admin for Stalwart Mail Server
https://stalw.art
71 stars 16 forks source link

Use the TailwindCSS darkMode `media` query strategy. #13

Closed zefir-git closed 4 months ago

zefir-git commented 4 months ago

Enables the TailwindCSS dark mode automatically for user agents that prefer dark colour scheme.

Related: https://github.com/stalwartlabs/mail-server/issues/455

CLAassistant commented 4 months ago

CLA assistant check
All committers have signed the CLA.

mdecimus commented 4 months ago

Hi, thank you for the PR but for now the default is going to be white until the dark mode switch is implemented. This is because the dark mode does not look nice and the CSS needs to be tweaked a bit.

zefir-git commented 4 months ago

Yeah, after checking out the dark theme, there appear to be several issues with it such as mixed grayscales (gray & slate), high contrast on borders, low contrast on some text, etc.

Just to clarify, this PR would eliminate the need for a dark mode switch. Using media makes Tailwind enable dark theme if the client's system prefers it. IMO this provides a better/simpler user experience compared to a setting.

If I can find the time, I could contribute to improving the dark theme in a separate PR.

mdecimus commented 4 months ago

Thanks, it would be great if you can contribute the button to switch between themes. The functionality needs to be ported from Javascript to Rust.