-
Notifications
You must be signed in to change notification settings - Fork 386
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
[Bug?]: CSS styles in dev mode broken #1810
Comments
Hi @dominictobias, thank you a lot for this detailed issue text with the screenshots and repro ❤️. I was also able to reproduce this with Chrome. Firefox on the other hand seems to be less picky when it comes to duplicate styles. Ignore this :)
I took another look at this, the issue actually lies in this line: https://github.com/nksaraf/vinxi/blob/e203a5b87ff63f26cc83a04ff7bc02640bc3fb46/packages/vinxi/runtime/style.js#L45 |
Not sure
Comparing the lazyRoute of react vs solid, react looks like it's updating the style in the head instead of writing it into the body: Solid - like what you posted: Perhaps Solid can do that approach too? |
@dominictobias Yeah thats part of the solution I think 🙏, but ultimately the problem is: Chrome Devtools becomes flaky as soon as there are two <style>{`.letsGo { background-color: yellow; }`}</style>
<style>{`.letsGo { background-color: yellow; }`}</style> So if we want to fix this, we have to deduplicate the As part of #1743 we are currently discussing and laying out some new foundations together with Tanstack Start. I am including this issue in that discussion and hope we can include a fix for this, in the coming fs-router / assets handling solution. As soon as I know more, I'll try to keep you updated 🙂. |
Duplicates
Latest version
Current behavior 😯
Expected behavior 🤔
Steps to reproduce 🕹
Steps:
bun create solid
color: red;
toCounter.css
Screen.Recording.2025-02-16.at.00.23.51.mov
Chrome doesn't show the styles as duplicated but Firefox does:
Context 🔦
No response
Your environment 🌎
The text was updated successfully, but these errors were encountered: