Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable dark mode #383

Closed
1 task
elliot-sawyer opened this issue May 14, 2020 · 2 comments
Closed
1 task

Disable dark mode #383

elliot-sawyer opened this issue May 14, 2020 · 2 comments

Comments

@elliot-sawyer
Copy link

elliot-sawyer commented May 14, 2020

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-light-mode

MFA, when Dark Mode is disabled on login forms
Screen Shot 2020-05-14 at 9 34 40 PM

It would be great if the dark-mode rules in MFA were treated the same as they are in Login Forms

Acceptance criteria

  • TOTP / WebAuthn module respect the dark mod setting from the MFA module.

PRs

@Cheddam
Copy link
Member

Cheddam commented May 29, 2020

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.

@GuySartorelli
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants