Inheritance - sandrooliveira/advanced-css-course GitHub Wiki

The value Inherited in CSS is not the value of the property itself, but its computed value. For instance, in the code below, the line-height for .parent class is 30px (150% * 20), so the child class will inherit exactly this value 30px and not 150% of 25px.

.parent {
font-size: 20px;
line-height: 150%;
}

.child {
font-size: 25px
}

IMPORTANT: Some properties can be inherited, other not, we can check this information on the property specification page at https://www.w3schools.com for example.

⚠️ **GitHub.com Fallback** ⚠️