A possible presentational hints proposal for CSS 2.1

The working group are currently considering various proposals for changing
the handling of presentational hints in CSS 2.1, based on feedback given
in this forum.

One compromise proposal we came to is given below. Before deciding whether
we should use it or not, we are interested in what people here think of
it, since discussion here was the main motivating factor regarding
changing CSS 2.1.

It should be borne in mind that the intention is to discourage the use of
presentational markup on the long run. This proposal attempts to balance
the need to allow legacy content to continue to interact correctly with
user stylesheets while discouraging the use of presentational markup in
the future.

The text below is written so that it could be placed directly into
CSS 2.1 section 6.4.4, "Precedence of non-CSS presentational hints".

 The UA may choose to honor presentational attributes from the markup
 language. If so, these attributes are translated to the corresponding
 CSS rules with specificity equal to 0, and are treated as if they
 were inserted at the start of the author style sheet. They may
 therefore be overridden by subsequent style sheet rules. In a
 transition phase, this policy will make it easier for stylistic
 attributes to coexist with style sheets.

 For HTML, any attribute that is not in the following list should be
 considered presentational:

   abbr accept-charset accept accesskey action alt archive axis
   charset checked cite class classid code codebase codetype coords
   data datetime declare defer dir disabled enctype for headers href
   hreflang http-equiv id ismap label lang language link longdesc
   maxlength edia method multiple name nohref object onblur onchange
   onclick ondblclick onfocus onkeydown onkeypress onkeyup onload
   onload onmousedown onmousemove onmouseout onmouseover onmouseup
   onreset onselect onsubmit onunload onunload profile prompt readonly
   rel rev scheme scope selected shape src standby style summary text
   title type usemap value valuetype version

 For XHTML and other XML languages, no attribute should be considered
 presentational.

 Elements and non-presentational attributes should be handled in the
 user agent stylesheet. 

 Example:

    The following user stylesheet would override the font weight of
    <b> elements in all documents, and the color of <font> elements
    with color attributes in XML documents. It would not affect the
    color of any <font> elements with color attributes in HTML
    documents:

       b { font-weight: normal; }
       font[color] { color: orange; }

    The following, however, would override the color of font elements
    in all documents:

       font[color] { color: orange ! important; }


Comments should be sent to this mailing list.

Cheers,
-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 7 October 2002 17:48:07 UTC