HTML and CSS Reference
In-Depth Information
A good rule of thumb can be found in Jim Je " ers' article, “The Art and Zen
of Writing CSS”:
Refactoring CSS selectors to be less specific is exponentially more
di " cult than simply adding specific rules as situations arise.
3. Inheritance
A succinct and clear explanation of inheritance is in the CSS3 Cascading
and Inheritance module specifications (still in “Working draft” mode):
Inheritance is a way of propagating property values from parent
elements to their children.
Some CSS properties are inherited by the children of elements by default.
For example, if you set the body tag of a page to a specific font, that font
will be inherited by other elements, such as headings and paragraphs,
without you having to specifically write as much. This is the magic of
inheritance at work.
The CSS specification determines whether each property is inherited by
default or not. Not all properties are inherited, but you can force ones to be
by using the inherit value.
Search WWH ::




Custom Search