master-co / css

The CSS Language and Framework
https://css.master.co
MIT License
1.78k stars 41 forks source link

📄 Svelte setup - Reactive fix #272

Closed oskar-gmerek closed 11 months ago

oskar-gmerek commented 11 months ago

What is the improvement or update you wish to see?

Currently docs state that MasterCSS should be set up like this:

<CSSProvider config={import("../master.css")}>
        <slot />
</CSSProvider>

This will be not reactive and prevent masterCSS to work correctly on page changes.

This can be easy fixed by changing it to this:

<svelte:component this={CSSProvider} config={import("../master.css")}>
        <slot />
</svelte:component>

Is there any context that might help us understand?

N/A

Does the docs page already exist? Please link to it.

https://beta.css.master.co/docs/installation/svelte

AristideBH commented 11 months ago

This fix brokes styles on loaded component's and page changes for me Edit: I didn't update to the last recommended way of installation Progressive rendering. It now works !

1aron commented 11 months ago

Fixed documentation https://beta.css.master.co/docs/installation/svelte