-
Notifications
You must be signed in to change notification settings - Fork 113
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
Can't disable or toggle the dark theme #137
Comments
Seconding this, I don't want to render emails in dark mode, but I also don't want to toggle my OS settings just to test emails. |
This is a good point. The current "theming" uses a rather brute-force approach where we LetterOpenerWeb.config.ui_mode which defaults to Ideally we'd do something like upgrade to Bootstrap 5.3+, and leverage its built-in theming and |
Checking if there is a solution to the dark mode. It's changing the colors in my email when rendered in LetterOpenerWeb, and can't get an approval because my manager says the colors are wrong; which is not true. The colors only change when rendered with LetterOpenerWeb. The white background and text are showing as black and my black text is showing as white. Is there a way to fix this or prevent it from happening? I tried adding Any advice or an alternative gem would be highly appreciated. |
@carolyn-idi I did what @brentlintner did in the original post: downgrade to version 2.0.0 of this gem |
@brentlintner - Thanks! |
@carolyn-idi @hsearcy @stevenharman @brentlintner I found a temporary hack solution by adding the related file causing that background-color scheme body change: mkdir -p app/views/layouts/letter_opener_web/styles
touch app/views/layouts/letter_opener_web/styles/_letters.html.erb Then in that file set: <style>
<%= render file: LetterOpenerWeb::Engine.root.join("app/views/layouts/letter_opener_web/styles/_letters.html.erb") %>
@media (prefers-color-scheme: dark) {
body {
background-color: initial !important; /* Override the gem's background color */
}
}
</style> |
Hi!
Awesome project.
I noticed the latest release added support for rendering as a dark theme.
However it assumes if you have an OS level dark theme enabled you want to render a dark theme.
I might try to add a config option to the UI when I get a chance, but FWIW I don't think you should have to toggle your OS UI in order to test what is normally the default light theme people will see more regularly?
Workaround: Use 2.0.0 for the time being.
Thanks!
The text was updated successfully, but these errors were encountered: