Change TailwindCSS darkMode from default to selector
What does this MR do and why?
Related to #499701
Change TailwindCSS darkMode from default to variant
TailwindCSS default is to set the dark mode based on the media
strategy prefers-color-scheme
. Now, dark:{class}
will check whether
the class gl-dark
(usually on the <html>
element) instead.
Changelog: fixed
References
Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Light Mode | Dark Mode | Auto Mode (when light) | Auto Mode (when dark) |
---|---|---|---|
How to set up and validate locally
Edited by Vanessa Otto