css global file #5977
cybermedusa
started this conversation in
General
css global file
#5977
Replies: 2 comments 2 replies
-
What i usually do in the style tag in my layout file <style>
:global {
@import '../lib/styles/app.css';
}
</style>` |
Beta Was this translation helpful? Give feedback.
1 reply
-
You don't need to use :global on separated css file, move your styles to SRC folder and import from there in your layout script, other option is use svelte-preprocess to import that file correctly |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've made a separate file for styling named global.css and I've put it inside the routes folder then I imported it inside __layout.svelte file (import './app.css';) and my styling is not working. Is there a different way to have a global file for styling instead of typing everything inside the component <style> tag?
All of my elements in global.css have this ":global" typing.
Beta Was this translation helpful? Give feedback.
All reactions