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

Fixed most common issues related to the dropdown behaviour and caching in the local storage #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kr4chinin
Copy link

@kr4chinin kr4chinin commented Sep 2, 2022

In this version of css theme toggler app I've resolved these problems:

  • Initial light class is now being added to the body programmatically. In the Fireship's version after page reload you could notice that body deriving preffered theme from the local storage and adding it to the already exsisiting one which is hardcoded light theme (so, if preferred theme was dark then after the page reload you will see <body class="light dark">.
  • In initial version of this app if you choose solarized theme — solarizeButton acquires normalize innerText property. But when page is reloaded it loses its value although the theme is still solarized. Now it will keep it.
  • Dropdown was accessible via page inspector and dev tools even when it was hidden. I've changed its z-index property so now it is truly unreachable when hidden.
  • Removed unnecessary pointer-events: auto; property because its implicitly has necessary value.

@kr4chinin kr4chinin changed the title Fixed most common issued related to dropdown behaviour and caching in local storage Fixed most common issues related to the dropdown behaviour and caching in local storage Sep 2, 2022
@kr4chinin kr4chinin changed the title Fixed most common issues related to the dropdown behaviour and caching in local storage Fixed most common issues related to the dropdown behaviour and caching in the local storage Sep 2, 2022
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.

1 participant