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

made several changes to smooth out animation #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JordanHillDev
Copy link

The problems with the choppiness were that there were too many things being transitioned. The fix was to load the box-shadows as pseudo elements and make the unused one's opacity = 0. This makes them already loaded and much easier on the browser. I changed some of the JS to make it a little cleaner, too. I'm in the process of learning so it might not be to your liking. Your animation was much more interesting, but I made one for you to look at performance-wise. Thanks for letting this be my first real project to contribute to.

@ayoung19
Copy link
Owner

ayoung19 commented Apr 3, 2021

Yeah that makes sense, I tested it a bit last night and I’m pretty happy with it. Definitely the route I’d want to take, maybe even could use both by detecting the type of browser since the previous one worked on Firefox. I’ll do a deeper dive into it today and will update you with my thoughts. Also, thank you as well! I was definitely scratching my head over this issue and I really appreciate the contribution, glad you’re also getting something out of it as well.

@ayoung19 ayoung19 linked an issue Apr 3, 2021 that may be closed by this pull request
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.

fix choppy dark -> light mode transition on chrome
2 participants