Hi,
My understanding is that there are 3 types of stylesheet:
- Defined by the page author
- Defined by the user (i.e. a set of default styles defined by the user and installed into their browser)
- Default stylesheet defined by the browser
According to this book if an element is not matched by a selector in any of these stylesheets, only then will the property value be inherited from parent elements. However, the book also says that a browser's default stylesheet should define a style for all types of elements.
If a browser's stylesheet does define a style for all types of element, and this style has a higher precendence than inheritance, then inherited property values should never be observed. Clearly this is not the case, so what exactly are the correct precedence rules for properties defined in a browser's default stylesheet and those defined for parent elements? (I'm aware that not all CSS properties inherited, but for the sake of this discussion assume I'm referring to a property that is, e.g. color
)
Thanks in advance, Don