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

Solved flickering bug for dark mode and added script to head #36

Closed
wants to merge 1 commit into from

Conversation

fredtux
Copy link

@fredtux fredtux commented Aug 26, 2020

Description

There was a flickering issue when dark mode was selected and the page was refreshed or opened.

I've added a function that creates a style element with the theme colors and can switch from lightmode to darkmode. I've used this as a source: StackOverflow

In order to fully resolve the flickering issue, the script must be included in the head element

Motivation and Context

Flickering issue described here: Github issue

How Has This Been Tested?

The changes can be tested by running index.html

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.

@lgtm-com
Copy link

lgtm-com bot commented Aug 26, 2020

This pull request introduces 2 alerts when merging 5fd8d89 into 00e0ed3 - view on LGTM.com

new alerts:

  • 2 for Missing variable declaration

@fredtux fredtux closed this Aug 26, 2020
mattfleaydaly referenced this pull request in popoway/dark-mode-switch Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant