This is because your 3 stylesheets are applied on your site, which is a single-page application. It is the same as if you imported 3 stylesheets in an html file.
An efficient and clean way for separating your styles would be to use component specific class names. For example, in a component named MyButton
, you would use a prefix on all of your class names, like this: myButton-wrapper
, myButton-content
, myButton-label
, etc. A style for a label from one component would never override the one from another component: they would be called myButton-label
and myTextField-label
for example.
Another solution would be MaterialUI's style lib. In each component, you create a style and apply it to the component. This style will be specific to the component and won't be shared with other components.
Also, if you want some styles to be applied globally, such as a CSS reset or generic styles, you can use a global stylesheet and use it on the root of your application: in App.js.