CSS imported into (solid) islands is not loaded on subsequent page loads when using view transitions and client:only in dev #10466
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: view transitions
Related to the View Transitions feature (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
I have seen this happen in both Chrome and Firefox.
Describe the Bug
When importing CSS into a solid island (may be other islands too, I haven't tested other frameworks), the CSS loads fine on the initial page load, but when you navigate away and come back (with view transitions) the CSS is not loaded properly and the page looks broken.
This only appears to affect
client:only
(at least when usingclient:visible
the CSS always loads correctly).The included example sets builds on the official solid example. Click on the
Another page
link and then click theCounter
link.The fix is to move the CSS import from
Counter.tsx
toindex.astro
, then the CSS is always loaded properly under every circumstance, including with view transitions andclient:only
.What's the expected result?
CSS imported in islands should load properly when navigating around the site using view transitions and
client:only
.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-eqw3jl?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: