Closed elliot-sawyer closed 2 years ago
I've looked into this, and there's some dark mode rules in TOTP / WebAuthn too. Expecting developers to block four separate stylesheets is going to be a pretty bad experience.
I think we'd be much better off introducing some config to the login-forms module to influence the presence of a .dark-theme
class on <body>
- this is akin to the approach taken by a lot of other themed UIs when adopting the native dark mode API.
Expecting developers to block four separate stylesheets is going to be a pretty bad experience.
And besides which, those aren't even in their own separate stylesheets like the login forms dark mode styles are. My initial instinct was just to not include those stylesheets in the first place if dark mode is disabled, but since they're not separated out that's gonna be a fair bit of extra work and based on the way mfa's scss is layed out it would result in less maintainable code. All this to say: I agree, having a css class that's just not there when dark mode is disabled seems to be the best way to do this - and it has the added benefit of catching darkmode in svgs as well.
When you disable dark mode on the login forms module, the fix does not apply on the MFA setup screen. Dark mode rules are still present:
MFA in Light Mode
MFA, when Dark Mode is disabled on login forms
It would be great if the dark-mode rules in MFA were treated the same as they are in Login Forms
Acceptance criteria
PRs