For each property that allows percentage values, it is defined what property it refers to. P.pastoral.marine' is therefore an invalid selector in CSS1. In the above example, the first selector matches the 'P' element due to the 'ID' attribute value. By using the ID attribute as selector, one can set style properties on a per-element basis. This use of style sheets is discouraged.
Inheritance saves CSS designers typing.
Instead of setting all style properties, one can create defaults and then list the exceptions. The selector is now a search pattern on the stack of open elements, and this type of selector is referred to as a contextual selector . Here, the first selector matches 'LI' elements with at least one 'UL' ancestor. The second selector matches a subset of the first, i.e. 'LI' elements with at least two 'UL' ancestors. The conflict is resolved by the second selector being more specific because of the longer search pattern.