I am reading this link and must say Mozilla is not trying to explain things! https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance
So in the screenshot below, you see the default link has a different color than initial
link. Default is just element without any properties so it should inherit colour from browser's stylesheet. Cool. But the initial
link should also inherit the blue color from browser default stylesheet, and instead, we have black. Please help understand.
body {
color: green;
}
.my-class-1 a {
color: inherit;
}
.my-class-2 a {
color: initial;
}
.my-class-3 a {
color: unset;
}
<ul>
<li>Default <a href="#">link</a> color</li>
<li class="my-class-1">Inherit the <a href="#">link</a> color</li>
<li class="my-class-2">Reset the <a href="#">link</a> color</li>
<li class="my-class-3">Unset the <a href="#">link</a> color</li>
</ul>