master-co / css

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

📄 Svelte setup - Reactive fix #272

Closed oskar-gmerek closed 1 year ago

oskar-gmerek commented 1 year 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 1 year 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 1 year ago

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