Inheritance is a process of receiving values of properties by a child element from its parent element.
Not all CSS properties are inherited, because it does not make sense for some of them to be (for instance, margins and width are not inherited). Generally speaking, properties related to the styling of the text are passed down. Properties such as borders, margins, backgrounds, and so on that affect the boxed area around the element tend not to be passed down,
Source: https://www.w3resource.com/css/assigning-property-values-cascading-inheritance/css-inheritance.php