In a React/Webpack app with CSS modules I have a module .card
in its own .scss file and another module named .stat
which is a content to be shown in the .card
.
What I need to achieve the following, but int the 'css-modules' way:
.card:hover .stat {
color: #000;
}
If I @import .card
inside the .stat
module, all of the .card
css is dumped into the .stat
output, but I only want to be able to use the correct class name for the .card
.
What's the correct way to solve the problem?