Apply styles to the body in routes! Designed to work with Svelte Kit and Routify
Svelte BodyWorks is a tool designed for use with Svelte Kit and Routify to apply styles to the body in routes. It addresses the issue of styles not being properly applied and reapplied on route changes in Svelte Kit and Routify. The tool provides a solution by handling the removal and reapplication of style tags, allowing users to easily apply classes and styles to the body element.
class="" and style="", or utilize a style object for more flexibility.To install Svelte BodyWorks, you can follow these steps:
npm install svelte-body
import { svelteBody } from 'svelte-body';
svelte:body component in your code to apply styles to the body element.Svelte BodyWorks is a valuable tool for Svelte developers using Svelte Kit and Routify. It solves the problem of styles not being properly applied and reapplied on route changes, providing a seamless way to style the body element. Its compatibility with both Svelte 3 and 4, integration with Svelte Kit and Routify, and easy application of styles make it a useful addition to any Svelte project.