# Making the web Svelter with SvelteKit ### Part 4 - Local and global CSS [Back to part 3](part3_slides.html) --- ## Where to include CSS? - Inside a +page.svelte og +layout.svelte file - CSS is always page-component-specific - Inside a component .svelte file - CSS is available wherever the component i used - - In a separate .css file - Can be imported and used site-wide via import '/path/to/css/file' --- ## Component-specific CSS
--- ## Global CSS from components
--- ## Including from a CSS file ```svelte [2]
``` --- ## /app.css ```css [] body { font-family: sans-serif; line-height: 1.15; margin: 0; } a { text-decoration: none; } ``` --- ## Import /app.css in /src/routes/+page.svelte ```svelte [2] ``` --- ## Add HTML to +page.svelte ```svelte []
Fotoalbum
makro
Norge 2020
``` --- ## And CSS ```svelte [] ``` --- ## Onwards [part 5](part5_slides.html)