NEXT: Internal code style guide
[!WARNING] This issue is a work in progress.
This will act as a hub to centralize this information.
We have a very early draft of this available on Notion: https://walnut-fly-221.notion.site/Skeleton-Next-Code-Styles-6f75cff1286249a89d33adae135f7802
Svelte
- https://github.com/skeletonlabs/skeleton/issues/1987
- https://github.com/skeletonlabs/skeleton/issues/2236
Tailwind
- https://github.com/skeletonlabs/skeleton/issues/2189
Feedback
If you have additional updates or requests for this feature, please do so in the comments section below.
For #2236 svelte 4 changing to svelte 5 will change the syntax a bit:
// Svelte 4
- <script>
- let clazz = '';
- export { clazz as class };
- </script>
- <element class="... {clazz}" {...$$restProps} />
// Svelte 5
+ <script>
+ const { class: clazz, ...rest } = $props();
+ </script>
+ <element class="... {clazz}" {...rest} />
Wanted this documented somewhere, let me know if this is the wrong place.
Instead of internalizing this, we're maintaining it publicly in this docs. This information is beneficial for everyone!
https://next.skeleton.dev/docs/resources/contribute