Say we want all of our anchor text to be orange:
a { color: orange }
And we want all our div text to be green:
div { color: green }
What if we want the bindings inside the div to be green too? Here we can use inherit:
div > a { color: inherit }
The following HTML snippet can make this clearer:
<a href="#">I'm orange</a>
<div>I'm green!</div>
<div>I'm green and <a href="#">green</a>!</div>
source
share