-
Notifications
You must be signed in to change notification settings - Fork 337
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
Dark theme vs. Theme Starter version #5
Comments
The dark theme that ships with Mailspring is here: https://github.com/Foundry376/Mailspring/tree/5ae7e205147fde43ac75fc31d677bb110c0bd929/app/internal_packages/ui-dark In particular, check out the email-frame.less file. It contains the following: .ignore-in-parent-frame {
body {
-webkit-filter: invert() hue-rotate(180deg);
color: Foundry376/Mailspring#111;
}
img {
-webkit-filter: invert() hue-rotate(180deg);
}
} Adding this to your theme should invert the colours in the message view. |
why? |
I've tried it, but it doesn't work for me. It seems that the |
Hey folks! You should be able to reproduce the inverting behavior of the I would also try renaming Hope that helps! Sorry for the delay responding to this! |
Hey there, I've been trying to make a nord theme and ran into this issue. It makes some text dark (on a dark background), and I tested it with some other user made dark themes (arc-dark, Isaac dark) with the same results. I tried adding email-frame.less, renaming index.less, and putting .ignore-parent-frame in my index.less with no results. It seems that the default dark theme is the only fully functional one right now :(. |
Hey @hdansin sorry for the delay! First off that sounds like it'd be a great theme. I pulled down the arc-dark theme and looked through the CSS, and I think you can achieve what you're looking for with a few tricks:
This is why the built in ui-dark theme uses this CSS in email-frame.less. This allows it to invert the colors (turning your black-on-white text to white-on-black) regardless of whether they were specified by the sender or by our defaults. The color it sets (
If you want to get really fancy, I think something like this would work great for arc-dark:
|
Thanks for the thorough reply! I tried everything I could, including trying the Snap version (I am running it on Solus Linux) and I can't seem to get it working. I used the same code in .ignore-parent-frame and while it partially worked in arc-dark I couldn't get it to work in the other themes. Also, the issue I'm having is not necessarily that I want everything to be dark (although that would be nice), it is that there seems to be an issue with the color inversion of the text that causes some emails to be hard to read/unreadable because it sets the text color but doesn't effect the background or vice-versa. I also didn't notice any difference when changing email-frame.less. It's not a huge problem with that message in particular, but it can make others completely unreadable. Here's a link to my theme: https://github.com/hdansin/Mailspring-Theme-Nord No worries if you can't get to it right away. Thanks for the help! |
This is still causing issues for me as well on a number of messages even when I add it into the email-frame.less (both on the Arc-dark as well as my own custom). Edit: I've even tried using the Dark UI repo you linked and even that renders messages differently than the default Dark. |
Yes, I've copied and pasted the exact code/file structure from the built-in dark theme (without changing anything) but it renders differently than the default. I'm so confused! Is there a step that happens with default themes that user themes don't hit? |
How does it render differently? I've been through this too, and I think I figured out the requirements (which were already stated by @bengotow above):
As a side note to take into account when designing a dark theme: adapting |
Hi @bengotow @asparc I did every step that's advised by @bengotow , using the character-by-character However, I still can't achieve the inverting effect. For your reference, here's my repo: https://github.com/ianpan870102/starter-experimental-mailspring-theme |
I think the problem in your case is that you didn't specify a value for the inversion filters in
to
You can also find inspiration in this thread: Foundry376/Mailspring#1928 |
Thanks man! Adding Update: Adding |
Thank you so much, this fix worked perfectly for me. To add more detail, I started with the (dark) theme starter repo and was experiencing dark text on the vast majority of emails (probably sent from Outlook as mentioned by @bengotow in issue 1928). Following instructions above, I added the email-frame.less file and renamed index.less to ind.less, which did not solve the problem. Then, I edited the email-frame.less as suggested by @asparc, reloaded the theme, and the text colors corrected. |
@bengotow's tip to rename index.less worked for me. I just deleted it and now I'm all good. |
@bengotow Thanks, your solution is clever & does mitigate the problem. However, I feel the best way to deal with this dark theme issue is simply not to have a dark BG for areas displaying emails. There are too many unpredictable consequences, not to mention it may stomp over someone's thoughtfully designed email content. I would suggest finding a way to have your theme use a white or off-white area where the email body will display. Transition this into your design so it looks cohesive. I am using @hdansin 's Nord theme. I'm trying to find a way to remain true to the Nord colours while enabling a white-ish email area. I think there is a way to step down from: dark > grey > almost white content area. |
@riquezjp I know where you're coming from but still prefer dark override 🤷 |
Changing the name of "index.less" got it to work for me. Thanks. |
Hi there,
I made a theme based on the theme starter but it seems to me that the theme starter version is not exactly the same version status as the "Dark" theme shipped with the release. Some of the details do not match – especially in Mail view – and the composer still appears in white.
Is it possible to grab one of the main themes contained in Mailspring to modify them?
Thanks and best regards
Timo
The text was updated successfully, but these errors were encountered: