CSS inheritance: applying selector for itself and every descendant
- by Cawas
Get a custom user CSS and type this
.answered-accepted {
color: white !important;
background: #090 !important;
}
Now go to answers.unity3d and look for an accepted answer. The design looks bad, because the <strong> in there overrides the customization. The fix I've found is this:
.answered-accepted, .answered-accepted * {
color: white !important;
background: #090 !important;
}
Now it looks fine on the website, but the code looks ugly!! How can I do this without repeating the class name?