Take this code for example:
*
The background color is crimson at last. It’s related to CSS specificity. I’m curious why that’s the case? Why is background-color not inherited here? Or is this a property that never gets inherited? If there was another property that could get inherited, would the result be different?
Take this code for example:
Code:
<div class="super">
<div class="extra">text</div>
</div>
Code:
.extra
{
background-color: crimson;
}
.super{
background-color: cyan;
}
*
Comment