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
For each case, there are issues with how the css is bundled and sent to the browser
file-based:
Initially loading the page results in desired behavior: the browser waits for the CSS to load before painting the screen (this is good because the user does not see a flash of style changes). This is because the CSS is loaded by a <link /> tag in the initial document.
However, when preloading (by mouse hovering) another route using Solid's <A /> tag, the CSS does not get loaded. The CSS only gets loaded when the <A /> tag is actually clicked (this is not desired, the user sees a flash of style changes).
file.mp4
config-based
Initially loading the page results in undesired behavior: the browser does not wait for the CSS to load before painting the screen (this results in a flash of style changes). This is because the CSS is is not loaded by a <link /> tag in the initial document. It is instead loaded by JavaScript: HttpStatusCode-[hash].js
However, when preloading (by mouse hovering) another route using Solid's <A /> tag, the CSS does get loaded in time. So when the user actually does click the <A /> tag, the CSS is already there and there is no flash of style changes.
config.mp4
So the two main questions I have are
should there be a difference between file-based and config-based routing? Or maybe I configured something wrong?
is it possible to have a setup where the CSS is fetched and loaded before loading the initial page and before loading another route through <A /> tag? To completely eliminate flashes of style changes altogether.
I have looked into two approaches for a new, basic, solid-start app
minimum repro: https://github.com/Numnumberry/solidstart-css-routing
For each case, there are issues with how the css is bundled and sent to the browser
file-based:
file.mp4
config-based
config.mp4
So the two main questions I have are
related
The text was updated successfully, but these errors were encountered: