In my chat contact list, each contact can have a different state represented by classes:
- .online
- .offline
- .online .selected
- .offline .selected
Here are the corresponding styles (example):
.online {
background-color: #fff;
p { color: #000; }
}
.selected {
background-color: #000;
p { color: #fff; } // This part does not seem to work
}
I always want the styles applied to .selected to take precedence, but unfortunately, only the background-color changes when I add the .selected class.
What could be missing here? Thank you!