WD-CSS21-20020802 section 6, "Assigning property values, Cascading, and Inheritance", substantive comments

Following are substantive comments on section 6, "Assigning property
values, Cascading, and Inheritance"
(<http://www.w3.org/TR/2002/WD-CSS21-20020802/cascade.html>), of the
Cascading Style Sheets level 2.1 draft
(<http://www.w3.org/TR/2002/WD-CSS21-20020802>).



6.2 Inheritance


'To set a "default" style property for a document, authors may set the
property on the root of the document tree. In HTML, for example, the "html"
or "body" elements can serve this function.'

This is false.  In HTML, the 'HTML' element is the root element, the 'BODY'
element its child.  If one chooses to display the 'TITLE' element, for
instance, the 'HTML' element, not the 'BODY' element, is its ancestor.



6.2.1 The 'inherit' value


"Each property may also have a specified value of 'inherit', which means
that, for a given element, the property takes the same computed value as
the property for the element's parent."

This fails to account for 'line-height'.  Change to "Each property may also
have a specified value of 'inherit', which means that, for a given element,
the property inherits the value from the element's parent as per the
regulations on inheritance."


"* {
  color: inherit !important;
  background: transparent;
}"

The 'background' declaration is missing the '!important' bit.



6.4 The cascade


"The author specifies style sheets for a source document according to the
conventions of the document language."

This is too narrow.  The association of style sheets with a document might
have nothing to do with the document language.  The association might
result from the transfer protocol (for example, the 'Link' header in HTTP)
or from out-of-band metadata (for example, a linkbase).



6.4.2 !important rules


'Declaring a shorthand property (e.g., 'background') to be "!important" is
equivalent to declaring all of its sub-properties to be "!important".'

Change "sub-properties" to "constituent properties" or to "elemental
properties".



6.4.3 Calculating a selector's specificity


"Concatenating the four numbers a-b-c-d (in a number system with a large
base) gives the specificity."


I am troubled by the persistence of this concatenation stuff.  It really
doesn't help matters and has been demonstrated to cause confusion.  I am
pleased that the examples use comma-separated quadruplets, since that is
much simpler for humans.

Received on Thursday, 14 November 2002 07:11:53 UTC