79634767

Date: 2025-05-23 02:49:44
Score: 0.5
Natty:
Report link

I’m not really happy with this solution, but it is something that could work perfectly fine depending on your particular case.

What I did was to add data-sveltekit-reload to the link of the page which I need the styles to be cleared out, just like this:

<a href="/path-to-page" data-sveltekit-reload>
   Link text
</a>

Keep in mind that this will allow the browser to handle the link, causing a full-page navigation after it is clicked.

Official docs: https://svelte.dev/docs/kit/link-options#data-sveltekit-reload

Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Rodrigo D'Agostino