-
Notifications
You must be signed in to change notification settings - Fork 161
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
Darkmode for single file #90
Conversation
Thanks! This closes #89. |
@@ -1,10 +1,12 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<html data-theme="dark"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olibu is this necessary?
(and it is correct when OS theme is light? or would cause flickering on the other way?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it, I'd say it's fine as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified it in dark and light mode to work without flickering. However, I set dark as the default. When testing I recognized that the dark flash is not as disturbing as the light flash.
Flickering stopped by separating the function into the theme.js
I transplanted your changes to a new branch (should be 1:1 and in your name). |
Merged in f03d403. |
Support for dark mode in single file.
CSS is not modified any more. Themes are based on css conditions instead.
Darkmode is activated earlier now, because pages has flickered on when triggered in index.js