githubocto / flat-ui

MIT License
370 stars 23 forks source link

Scoping CSS on Import (Tailwind apply?) #8

Closed colmanhumphrey closed 3 years ago

colmanhumphrey commented 3 years ago

Hey all,

Really fantastic package you have!

I recently tried to use this package, and faced one small issue: the tailwind applys from index.css also applied to our whole site. The one I noticed most was body { @apply bg-gray-200;}, because we have no default background color set on the site. Of course this particular one was an easy fix, but the rest are maybe less obvious.

Is there a way to avoid this or an easy way to mitigate?

I'm not very advanced at CSS or Tailwind, so perhaps there's a trivial way to do this - if so, apologies for the hassle!

mattrothenberg commented 3 years ago

Hi @ColmanHumphrey , apologies for the late reply here.

We've just released https://github.com/githubocto/flat-ui/releases/tag/v0.10.0, which should hopefully cut down on these polluting styles.

Can you try out this release and let me know how it goes for you? We're eager to know whether this approach is going to work out for consumers of the library :)

Good luck, and let me know!

cc @Wattenberger

colmanhumphrey commented 3 years ago

Hey @mattrothenberg thanks, looks good! No worries about timing of the replies at all.

I'll try it today and get back to you!

colmanhumphrey commented 3 years ago

Hey @mattrothenberg - looks good, seems to work great!

mattrothenberg commented 3 years ago

Glad to hear!