kscalelabs / store

K-Scale Labs store
https://robolist.xyz
MIT License
17 stars 13 forks source link

Light/Dark mode button shakes on impact #74

Closed is2ac2 closed 1 month ago

vrtnis commented 1 month ago

Addressed this by (1) setting positions of theme icons to relative - that way we can ensure that they remain fixed within their parent navbar - so it prevents layout shifts (that might cause shaking like effects)

Also, (2) created a separate navbar css file and added a transition for the color property so that the color change occurs smoothly over a short duration (e.g., 0.2s).

Both combined, can make things a bit smoother.

Here is what I see now locally. Thoughts? Can make a PR

https://github.com/kscalelabs/store/assets/123119434/d465d1d4-9034-45ee-b21b-4e2048dcdeb2

is2ac2 commented 1 month ago

Looks cool, thanks for this! We've made a few changes to the navbar since, but if you could make a pr that would be great