Replies: 1 comment
-
react-scoped-css is designed to encapsulate css in component level. And in your case, I think maybe you should split the css from landingPage.scss into its corresponding child components. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Liang,
I caught your answer on stackoverflow today https://stackoverflow.com/a/57654191/6310058. Thanks for this great lib.
Currently, I'm importing a Landing template into my React project, and I got so many css clashes. Your lib react-scoped-css has been a great help. However, I have to write the import line
import '../../assets/scss/landingPage.scoped.scss'
in every of more than 20 component files of that template, which is a tedious thing to do. So, I'm wondering whether there is a way to include also the child components of some top component into the scope as well? For instance, I'd like to add the import statement only into the LandingPage component, and the scoped styles will also be propagated to all of its child components regardless how many level it is. That would be a great feature.Thank you
Beta Was this translation helpful? Give feedback.
All reactions