Re: CSS 2: priorities in cascading order


 > JRG: What about children and sub classing if you but !required in the BASE
 > selector would any child of BASE then retain the required attribute.  If
 > you put in a !required in the H1 selector, would any child of H1 also be
 > forced to use the required selector?

No. In CSS1, the inherited value is only used if no declarations apply
to the element/property combination -- i.e. only as a last resort.
However, the proposed CSS2 "inherit" value on all properties will make
it possible to strengthen the inherited value:

  BODY { color: red }
  H1 { color: inherit ! accessibility }  

The last rule will ensure the color of the H1 element is the same as
its parent. 



H      k   o   n      W   i   u   m       L   i   e
World     W      i     d     e       Web  Consortium

Received on Monday, 22 December 1997 15:57:19 UTC