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

fix: leaking css affecting buttons outside of the package #152

Closed
wants to merge 1 commit into from

Conversation

MarkLyck
Copy link

@MarkLyck MarkLyck commented Sep 7, 2023

Delete tailwind.css from the npm package.

fixes:

#143
#135

@vercel
Copy link

vercel bot commented Sep 7, 2023

@MarkLyck is attempting to deploy a commit to the Elegance Team on Vercel.

A member of the Team first needs to authorize it.

@MarkLyck MarkLyck changed the title delete tailwind.css from npm package fix: css affecting buttons outside of the package Sep 7, 2023
@MarkLyck MarkLyck changed the title fix: css affecting buttons outside of the package fix: leaking css affecting buttons outside of the package Sep 8, 2023
@vercel
Copy link

vercel bot commented Sep 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
novel ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2023 4:22pm

@steven-tey
Copy link
Owner

This breaks all the styles for the editor:

CleanShot 2023-09-09 at 10 22 31

@MarkLyck
Copy link
Author

MarkLyck commented Sep 11, 2023

@steven-tey doesn't it only break if the application the package is used in, doesn't already have tailwind styles setup?

Otherwise you might have to scope the import to only affect styles within the editor.

For me when I import this package, I get 2 sets of tailwind.css styles, one for my application level tailwind, and one from this package that's leaking and overwriting my other CSS, such as making buttons transparent.

Gotta admit I haven't tried running it in the app/web that's in this repo. I had to fork the project and make a lot of changes to the editor to make it useable for my project.

E.g. I use uploadthing not vercel blob. I removed this extra tailwind.css import, so it doesn't overwrite my other tailwind styles, I removed the AI and feedback features, and changed the styles.

@jonschlinkert
Copy link

jonschlinkert commented Sep 13, 2023

Having the same issue. This broke styles across our app globally, not just where the component is used. (not the PR, the way it is currently).

Seems like this is a good use case for using a custom prefix with tailwind. Ideally implementors of Novel would be able to customize this prefix as well.

@steven-tey
Copy link
Owner

This will be fixed when we cut a new version for #161 – shoutout to @eyalcohen4 for the fix!

@steven-tey steven-tey closed this Oct 3, 2023
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.

3 participants