I have the following scss:
.skillBox {
position: relative;
border-radius: 10px;
border: 1px solid #ccc;
box-shadow: 0 2px 20px #ccc;
padding: 1em;
&:hover {
padding: 3em;
.d-none {
display: inline-block !important;
}
}
&:hover .d-none {
display: inline-block !important;
}
}
On hover, I get the padding:3em
but both the nested, and inline child rule didn't work, ie .d-none
class wasn't overridden.
What's the right way of writing the rule with CSS module?
I'm trying out CSS module with CRA and custom-react-scripts with sass
and modules
turned on (REACT_APP_SASS_MODULES=true
).
Or perhaps I should use styled components
instead? Was trying to figure out which one to go for for react apps.