Skip to content

Improve stylesheet "root" detection #1401

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

Merged
merged 7 commits into from
Jun 5, 2025

Conversation

thecrypticace
Copy link
Contributor

Fixes #1388

There's two problems here:

  • We consider any stylesheet with an @import a potential root. This includes compiled stylesheets that have URL imports to things like google fonts
  • We consider all "roots" graphs equally instead of prioritizing ones that import Tailwind CSS.

],
},
{
config: 'packages/web/app.css',
selectors: [
'{URL}/packages/shared/**',
'{URL}/packages/shared/ui.css',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these showing up indicates a problem with this approach. These show up because this is an imported file. this is generally fine

However, in this case it might be unexpected. Especially if packages/shared has its own Tailwind CSS config. It'll prefer packages/admin over packages/shared and that feels like a bug. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured out a temporary solution that doesn't introduce potential issues like this. But it's kinda awful.

Will ship with it but it could use some improvement later.

@thecrypticace thecrypticace force-pushed the feat/improve-stylesheet-detection branch from dbccdfb to 73330db Compare June 5, 2025 19:02
@thecrypticace thecrypticace marked this pull request as ready for review June 5, 2025 19:05
@thecrypticace thecrypticace merged commit 5702ca6 into main Jun 5, 2025
12 checks passed
@thecrypticace thecrypticace deleted the feat/improve-stylesheet-detection branch June 5, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

intellisense not works after v0.14.16
2 participants