Background
During T363861, we discovered that it is possible to target all OOUI interface and force them into light-mode, potentially improving legibility during the night-mode beta release phase. Long-term, we would prefer to have these interfaces support night-mode, so the goal of this investigation is to explore a generic short-term solution to prevent white-on-white or black-on-black text in existing OOUI products.
A POC patch and patchdemo have been produced to illustrate this approach. In general, it would involve including generic OOUI selectors alongside the .notheme class in Vector and potentially MinervaNeue:
e.g:
:root, .skin-invert, .notheme, .oo-ui-window, /*targeting all OOUI modals*/ .oo-ui-widget:not(.mw-changeslist, .mw-body-content) { /*targeting all OOUI widgets except changelist, etc. */ .cdx-mode-reset(); }
This approach is an alternative to using the .notheme class across many repos and the potential benefit would be not having to add the same class across many repos, saving us clean-up work in the long-run.
POC patch: https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/1029674
patchdemo: https://patchdemo.wmflabs.org/wikis/d7552cee1b/wiki/Main_Page
User story
- As a user enabling the night-mode beta feature, I would prefer that my editor-focused workflows remain legible.
The following are example on beta cluster where OOUI interfaces are illegible:
newcomer homepage | Recent changes | Advanced search | popup notifications |
Acceptance criteria
This spike should answer the following questions:
- Is this a viable short-term solution for getting OOUI to work in dark-mode?
- Can we use generic OOUI selectors with this approach, or is it better to target specific extensions? (If it's better to target extensions, then should we just use the notheme class instead?)
- Should we pursue this approach?