You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The math.random function is causing the CSS content to be different for the SSR and CSR CSS output so we end up with two different CSS class name hashes. The prerendered page is importing the CSS with the CSR generated class name but the element is referencing the SSR generated class name. You'd also get a different CSS value each time you build the app. Not sure what we can do here.
Describe the bug
Using the static adapter, sass
math.random
function has a strange side effect on dynamic classes when building.The following code gives a blue title with a random box-shadow when using
npm run dev
:However, after
npm run build
andnpm run preview
, no styles are applied.It seems the
math.random
call on sass affects the dynamic classes ids.Class on
h1
:Class on generated css:
Reproduction
https://github.com/stefandevai/svelte-classes-issue
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response
The text was updated successfully, but these errors were encountered: