I'm building a react app with React Static Boilerplate.
Each component has a directory structure like this:
MyComponent/
-- MyComponent.css
-- MyComponent.js
-- package.json
and in the MyComponent.js file, I'm doing a raw import './MyComponent.css'
Let's say my CSS contains something like this:
body { background-color: orange; }
.card { background-color: purple; }
and the render function in my component renders a card:
render() {
return (
<div className="card">Hello World</div>
);
}
The page's body will become orange, but the card will not become purple.
Why is this css not being fully applied to the HTML that is generated?
!importantto the.cardrule?.cardat all.