- From: Coises <Randy@Coises.com>
- Date: Wed, 09 Oct 2002 14:12:51 -0700
- To: www-style@w3.org
- Cc: Ian Hickson <ian@hixie.ch>
[Mon, 7 Oct 2002 21:48:06 +0000 (GMT)] Ian Hickson: >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. [...] >It should be borne in mind that the intention is to discourage the use of >presentational markup on the long run. I believe the section under consideration is the wrong place to pursue that goal. Certainly, reducing the precedence of "non-CSS presentational hints" to be just weaker than (rather than just stronger than) non-!important user style sheet rules (as in the previous version of this section in the CSS 2.1 proposal) wouldn't discourage the use of presentational markup --- it would discourage the use of user style sheets in contexts where pages containing presentational markup might be encountered. The wording suggested here won't discourage page authors from using presentational markup, either. It will, however, create a compatibility problem between CSS and any XML-based document language which contains constructions having default presentational effects that cannot be described by a fixed set of CSS rules (and hence cannot be implemented through the user agent default style sheet). The implementation of such constructions would either have to violate this section, or else bypass CSS properties entirely (thus making it impossible for authors or users to override the default presentation). I note that the considerations which led me to introduce this issue before: From: Coises <Randy@Coises.com> To: www-style@w3.org Subject: CSS 2.1 WD and non-CSS presentational hints Date: Mon, 05 Aug 2002 06:08:42 -0700 Message-ID: <cksskuoj9mrdph3h2mhc4h8ot7tp6sdb80@4ax.com> Archive: http://lists.w3.org/Archives/Public/www-style/2002Aug/0020.html are *formal* considerations which apply to any construction in any document language which has default effects on presentation that cannot be represented --- or can be represented only with great difficulty --- by a fixed set of style rules. Whether it is a "presentational attribute" (in whatever sense one might choose to give to that term) doesn't matter. >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. Let's be clear what this is all about. Under consideration are document language constructions that affect CSS properties. (If they don't affect CSS properties, assigning them a place in the cascade is irrelevant.) The CSS property values derived from such constructions must have a place in the cascade. If rules in the (real or virtual) user agent default style sheet specify the effects of a particular construction, their place in the cascade is already defined by earlier sub-sections; the place of the "STYLE" attribute is also defined. The function of this section in the CSS 2 specification is to define the place in the cascade to be assigned to the rules derived from any remaining constructions which implicitly generate default values for CSS properties. > For HTML, any attribute that is not in the following list should be > considered presentational: I think the language here is too indirect; "considered presentational" is just asking for confusion. What this text introduces is just a list of HTML attributes the default effects upon CSS properties of which should be defined in the user agent default style sheet; the default effects of the remaining attributes, then, should be implemented as discussed in the earlier paragraph. Is it really necessary to enumerate all of these? In the CSS 2 standard, Appendix A, "Appendix A. A sample style sheet for HTML 4.0" (found at <http://www.w3.org/TR/REC-CSS2/sample.html>) contains only five rules that use attribute selectors: A[href] { text-decoration: underline } BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } *[DIR="ltr"] { direction: ltr; unicode-bidi: embed } *[DIR="rtl"] { direction: rtl; unicode-bidi: embed } comprising only two different attributes. All the other attributes (except STYLE, which is a special case) either have no default effects on CSS properties, or have effects that were not expected (at least by those who wrote this appendix) to be described in user agent default style sheets. To put this point another way: There is no need to state that such attributes as "alt" or "src" are not "presentational"; they have no effect by default (that is, when no author or user style sheet selects for them) on any rendering characteristics that are connected with CSS properties. > For XHTML and other XML languages, no attribute should be considered > presentational. That is to say, the effects on CSS properties of all constructions in XML-based document languages should be defined solely in terms of the user agent default style sheet. Is this consistent with all existing (or likely) XML-based document languages? Is it allowed to use CSS with anything other than HTML or an XML-based document language? If so... what about them? Does the term "attribute" even apply? I'd like to suggest an alternative formulation, which follows. --- Precedence of non-CSS presentational hints --- The document language may include, and user agents may implement, constructions expected to influence characteristics of document rendering that can also be represented by the assignment of values to CSS properties. User agents must represent such characteristics as CSS rules that apply to the relevant node of the document tree (or behave as if they did). Some of these rules may be included in the user agent default style sheet; others may be generated specifically for each instance of a construction that requires them. In the latter case, the generated rules are considered to be a part of the author style sheet; they are assigned a specificity of zero and treated as if they preceded all other author style rules. If the effect of the expected presentation of a language construct on a particular CSS property cannot be described by a fixed (and reasonably compact) set of CSS rules which are recognized by the implementation, then the assignment of value to that CSS property which results from each instance of the construct must be represented as a generated rule. When the document language is a form of XML (including XHTML), the effects of all other document language constructs on CSS properties should be defined in the user agent default style sheet. When the document language is HTML, in the interest of consistency it is recommended that wherever possible, user agents define the presentation expected for elements, the DIR attribute, and the HREF attribute of the A tag in the user agent default style sheet. The default presentation of all other attributes should be implemented with generated rules (even though it is possible to describe the effects of some attributes --- e.g.: ALIGN, but not BACKGROUND --- using fixed sets of style rules that conform to the present specification). -- Randall Joseph Fellmy aka Randy@Coises.com
Received on Wednesday, 9 October 2002 17:13:24 UTC