Inheritance
Inherited values have no specificity — any declared value on the element wins over an inherited one, even specificity 0-0-0.
Inherited values have no specificity — any declared value on the element wins over an inherited one, even specificity 0-0-0.
body { color: navy; } /* inherited by p */
p { } /* inherits navy */
/* Declared styles always beat inherited styles */
p { color: green; } /* 0-0-1 beats inherited navy */
/* explicit inherit keyword */
p { color: inherit; } /* forces inheritance */
Confused why a style is not applying? Check if it is inherited vs directly declared.