-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Style tags are doubled #5757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It seems that when I run |
This is a duplicate of #5668 and #4533 - we don't track which elements are inserted into the head tag, they are just inserted each time the component is hydrated. However, I'm not sure why you're writing style tags inside |
I have all kinds of special styling for certain pages or components, and using Svelte's |
I'm not 100% sure I'm clear on what you're saying here, but as a guide to using a global stylesheet, I would recommend the following: If you need global styles, put them in a regular css file in your public directory. Link this file from the If you can afford to use component or page local styles, which is the ideal, then simply use the We don't recommend, support, nor make any guarantees about inline or imported css files within the |
I use a page or component-specific
svelte:head
with<style>
inside. Sending the original project to Netlify and Netlify builds it (npm run build
). For some unknown reason there are all the<style>
tags twice. Tags are only once when running the development version (npm run dev
, MacOS, node 14.13.1, npm 6.14.8).Svelte:head
should be run only once per page / component.https://imgur.com/a/kzTo9j2
I have three of them because of the font size for accessible, main styles and component's styles.
The text was updated successfully, but these errors were encountered: