Re: CSS vs. transitional markup [was: No Subject]

Douglas Rand writes:

 [re: where to put HTML stylistic attributes]

 > Not the way it's been defined.  That's the problem.  They did this
 > nasty thing in the definition you posted - they placed the properties
 > *between* the UA and the author's stylesheet.

The CSS1 spec states that UAs *may* choose to honor stylistic HTML
attributes. If so, the resultant rules should be put at the beginning
of the author style sheet -- effectively "between" the user's and
author's style sheet. The reason for placing them there was
to keep all author's style indications in one place. 

Several people have argued that this is not the right place to put
them. Douglas argues that this is hard to implement, others say that
HTML attributes (including all the attributes on FONT) should be given
a lower weight. I can sympathize with the latter one, but I'm more
interested in the first one.

If I understand Douglas correctly, it's not a good idea to put the
rules at the beginning of the author's style sheet since
implementations then have to remember enough about each rule (e.g. the
specificity and order) in order to know what other rules should be
overridden. This is true, but it's not the only reason you will need
this information. Consider this example:

  <STYLE>
    H1 { color: red ! important }
  </STYLE>

  <H1 STYLE="color: blue">...</H1>

According to cascading rule #2, the headline should be red. The inline
STYLE declaration should therefor be discarded, but in order to know
this you will need to rememeber that the declaration in the STYLE
element is marked "important".

Therefore, I'm not conviced one could simplify implementations by
changing the cascading order.

 > I'm not convinced that
 > elements like FONT can even work with that definition.  It looks to me
 > as if *any* font-family property will turn off FONT FACE, or font-size
 > turns off FONT SIZE,  even if the properties are for a parent element, 

No, this is not the case. Inherited values are only used if no rules
apply to the element/property combination in question (cascading rule
#1). A FONT SIZE will be converted into a rule that applies to the
element (FONT, or SPAN if you prefer) and therefore overrides the
inherited value.

Regards,

-h&kon

H   å   k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria §°þ#¡ª FRANCE http://www.w3.org/people/howcome

Received on Tuesday, 5 August 1997 04:13:49 UTC