Hello, I have encountered an issue with splitting my components and using react-router-dom. I decided to split the CSS for each component, such as Main.jsx - Main.css
and
CustomerBase.jsx - customerbase.css
. However, the problem I am facing is that the CSS files are being joined together. For example, if I set the body color to white for CustomerBase.jsx
and yellow for Main.jsx
, it will use white for both the Main
and CustomerBase
components. How can I prevent this from happening?
Here is an example of the CSS files:
customerbase.css
body {
background: white;
}
main.css
body {
overflow: hidden;
margin: 0;
padding: 0;
background: rgb(236, 107, 32);
}