Active Link css transition flickering
Which project does this relate to?
Router
Describe the bug
When styling the active link with a color transition, the previously active link is occasionally styled incorrectly. It briefly flickers with the previous colors for less than a second. This happens rarely (maybe 1 in 30 navigations). I’m not sure whether the bug is caused by the tanstack router or by CSS itself.
Your Example Website or App
https://github.com/idonotknowwhoiam/tanstackrouter-repro
Steps to Reproduce the Bug or Issue
- Clone the repository.
- Start the server (dev/preview).
- Navigate between pages, occasionally refreshing the browser (this may or may not influence the issue idk).
Expected behavior
The active link should switch styles without any flickering.
Screenshots or Videos
https://github.com/user-attachments/assets/f503d530-4646-41ba-a5c4-18850d70a4f7
Platform
- Router / Start Version: 1.139.12
- OS: macOS
- Browser: Chrome, Arc
- Browser Version: 142.0.7444.177
- Bundler: Vite
- Bundler Version: 7.1.7
Additional context
No response
i cannot reproduce this neither in chrome nor on firefox
I also can’t reproduce this in Firefox, but in Chrome (clean profile, no extensions) it happens sometimes. I’ve updated the repo with more navigation routes, so it occurs more often now.
https://github.com/user-attachments/assets/a876db27-7a79-4e86-987d-e4925b8a8974