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

Customizing the text color of the email content #3

Open
ballII opened this issue Feb 5, 2019 · 5 comments
Open

Customizing the text color of the email content #3

ballII opened this issue Feb 5, 2019 · 5 comments

Comments

@ballII
Copy link

ballII commented Feb 5, 2019

I installed it via GitHub, which allows customization, but it does not seem to provide customization on the text color (or the text-background contrast in the dark version of the original font styling) of the email body. Could you consider adding this feature in the future? Or could you point out which part of the CSS code is responsible for the body text color? Thank you.

@jackbuehner
Copy link
Owner

Currently, the entire email body is just inverted (I believe this is actually how outlook.com implemented it's dark theme). As a result, there isn't really a spot in the code to set the color of the email body.

The reason I invert the email instead of manually setting the colors is that newsletters will typically override the color change or the color change will cause the text to be difficult to read.

Is there an issue with the current implementation?
I may be able to add an option for changing the email text color, but it would be inconsistently implemented due to the nature of email styling.

@ballII
Copy link
Author

ballII commented Feb 7, 2019

Is there an issue with the current implementation?
I may be able to add an option for changing the email text color, but it would be inconsistently implemented due to the nature of email styling.

I also use Dark Reader, and shown below is an example of its result:
dark reader

whereas Gmail Dark Theme Tweaks looks like this:
gmail dark

I am not sure whether the difference can be noticed by others, but the Dark Reader's result is apparently easier to read for me. However, Dark Reader does not render the Inbox page well (the unread emails cannot be easily distinguished from the read ones), so I have to discard it.

I don't know how Gmail Dark and Dark Reader handle the color inversion work differently. I think I would be satisfied with the ability to change the email text and/or background colors and have no problem letting the newsletters override the color change. Thank you very much.

@jackbuehner
Copy link
Owner

I actually just found a way for you the default text color to be changed while maintaining the text colors set by the newsletters by simply adding one line of code.
In the css, change:

//invert and fix colors for email body
.gs > div:not(.gE):not(.wj) {
    filter: invert(93.2%) hue-rotate(180deg);
    background-color: #fff;
}

to

//invert and fix colors for email body
.gs > div:not(.gE):not(.wj) {
    filter: invert(93.2%) hue-rotate(180deg);
    background-color: #fff;
    color: #000;
}

For now, I'm not going to include this be default, so I suggest you create a new style from the manager with this code:

/* ==UserStyle==
@name           Higher contrast default email body text
@namespace      Jack Buehner
@version        1.0.0
@author         Jack Buehner
==/UserStyle== */

@-moz-document url-prefix("https://mail.google.com/mail") {
    .gs > div:not(.gE):not(.wj) {
        color: #000;
    }
}

@ballII
Copy link
Author

ballII commented Mar 3, 2019

@jackbuehner Thank you. The contrast did improve, but the font in the email content still looks a little bit "rotten" in detail compared to that in the composer. Is it possible to make the content font a little thicker (or make it render better) so that it looks the same as the composer font?

screen shot 2019-03-03 at 1 15 22 pm

@teohhanhui
Copy link

teohhanhui commented Nov 15, 2019

I think inverting the colours of the email content would only introduce more problems than it's worth. I'm getting weird artifacts like these:

Screenshot_2019-11-15 Re  symfony recipes  (WIP) Make tests faster by default (#530) - teohhanhui gmail com - Gmail

Screenshot_2019-11-15 Re  moby moby  Docker Network bypasses Firewall, no option to disable (#22054) - teohhanhui gmail com

Firefox version: 71.0b9

Perhaps there should be an option to disable inverting colours of email content, but only set the default colours. To me, not ruining email content is much more important than turning everything dark at all costs.

Update: Just tried turning off "Dark theme in email body", but it doesn't seem to change anything...

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

3 participants