Skip to content
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?]: Required CSS is removed when components are re-exported #1843

Open
2 tasks done
iisakkirotko opened this issue Mar 3, 2025 · 3 comments
Open
2 tasks done
Labels
bug Something isn't working needs triage

Comments

@iisakkirotko
Copy link

iisakkirotko commented Mar 3, 2025

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Upon navigation some CSS that should be included in the page is removed from it.

Expected behavior 🤔

The CSS is not removed, and instead kept on the page.

Steps to reproduce 🕹

Steps:

  1. Go to this stackblitz example
  2. Navigate to About
  3. The link to About is not red

Context 🔦

I ran into an issue while building a relatively simple app today. I wanted to import my components more cleanly as

import { MyComponent, OtherComponent } from '~/components';

instead of

import { MyComponent } from '~/components/mycomponent';
import { OtherComponent } from '~/components/othercomponent';

So I created an index file to re-export them from, and imported all required custom components from there instead. However, I noticed that this always breaks the CSS of my navigation element, which is included in the root layout in app.tsx. I think this might be related to #1401.

It's possible to work around this by importing the components from their own files.

Let me know if the issue should be raised elsewhere instead. Thanks a lot for your excellent work on Solid!

Your environment 🌎

@iisakkirotko iisakkirotko added bug Something isn't working needs triage labels Mar 3, 2025
@brenelz
Copy link
Contributor

brenelz commented Mar 4, 2025

@katywings do you have ideas on this css issue? Probably a vinxi thing?

@katywings
Copy link
Contributor

@brenelz (@iisakkirotko) Yeah, this sounds like either a regression or an edgecase that wasn't already fixed by
nksaraf/vinxi@ce13703 🙈. I recommend for now to import the components from their direct files. We are currently conceptualizing a future css solution together with Tanstack and with a bit of luck, we can skip fixing the open css bugs for the old solution 😅.

@iisakkirotko
Copy link
Author

Alright, thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

3 participants