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

Background fix for dark mode #951

Merged
merged 1 commit into from
Jun 27, 2018
Merged

Background fix for dark mode #951

merged 1 commit into from
Jun 27, 2018

Conversation

htower
Copy link
Contributor

@htower htower commented Jun 25, 2018

If HTML page doesn't set background ("Bash" docset for example) then it will be theme-dependent. When light theme is used with disabled dark mode everything works well - we have black text on white background. When light theme is used with enabled dark mode everything is fine again - we have light text on dark background. But when dark theme is used with disabled dark mode we will see black text on dark background (tested on Qt 5.11). Therefore when our dark mode CSS is applied we will see light text on light background :( So we should always set default background color to white - it will be properly processed both for light and dark themes.

OLD version:
screenshot_20180625_202236

NEW version:
screenshot_20180625_202401

If HTML page doesn't set background ("Bash" docset for example) then it will be
theme-dependent. When light theme is used with disabled dark mode everything works well -
we have black text on white background. When light theme is used with enabled dark mode
everything is fine again - we have light text on dark background. But when dark theme is
used with disabled dark mode we will see black text on dark background (tested on Qt 5.11).
Therefore when our dark mode CSS is applied we will see light text on light background :(
So we should always set default background color to white - it will be properly processed
both for light and dark themes.
@trollixx
Copy link
Member

Thanks for contributing! I am not sure though that it's a good idea to override background by default.

@trollixx
Copy link
Member

I guess we should give this a go, and see if any docsets will break.

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

Successfully merging this pull request may close these issues.

2 participants