- From: Todd Fahrner <fahrner@pobox.com>
- Date: Wed, 23 Apr 1997 13:48:22 -0700 (PDT)
- To: www-style@w3.org
One strand of the recent (very interesting) thread on CSS and DSSSL has called into question the soundness of CSS's cascading mechanism, and by extension the whole notion of "reader-author balance." This has been noted in other fora, as well, with direly pessimistic conclusions (e.g., http://www.hut.fi/~jkorpela/styles/harmful.html .) One charge is that the cascade can result in unfortunate interactions, such as insufficient contrast between fore- and background, or indistinct links, resulting in inaccessible pages. Another, related charge is that "style" is not so stylish if it represents a collision of unrelated styles. Ugliness is not only possible, but likely when author and reader styles combine. Both are valid points. Here are some untested assertions about making the cascade work. I hope y'all can help set this straight before I offer it as advice to anyone: The problem begins with the common authorial assumption that the UA default stylesheet is the direct underlayer of the author stylesheet. Author stylesheets typically declare styles for only a limited number of elements, which work in context of the author's UA defaults. When the user supplies a stylesheet as well, overturning some or all of the UA defaults, it's a mess. If authors (and authoring tools) would *always* begin stylesheets with a *complete* stylesheet (using the @import facility or by direct quotation), this would not happen. Even if there is only one modest inline style element in the document, the head should contain a reference to a complete stylesheet representing the context in which the style decision was made. There are few such complete stylesheets in existence now, probably because bugs in IE3 make pages with such stylesheets completely inaccessible. (Has anybody seen otherwise?) Two steps forward, one-and-a-half steps back. "Normal" local stylesheets will influence only unstyled material, and will assist in authoring, as a visual aid to structural markup. Only a user's "!important" declarations should apply if any authorial style is provided. I assume that the range of truly "important" style attributes will typically reflect readers' needs more than tastes: large type sizes, safe colors on all combinable elements, or special navigation (link) affordances. Unless such readers are willing to declare all of their stylesheet elements "!important", a consistently attractive presentation is difficult to expect. To the user with limited facilities, however, this is arguably no loss. Once IE3 is effectively swept from the channel (a few months after Mac IE4 is released), and a critical mass of non-broken CSS-compliant browsers comes into use, comprehensive author stylesheets will become viable on the open web. * * * Given the dangers, fragility, and general onerousness of the "solution" outlined above, here's one better, for the UA developers: Would it not be best for UAs simply to disregard all non- "!important" declarations in user stylesheets when any author style is provided? So the UA defaults would take precedence over user's "normal" stylesheet declarations in this case.... Inline styles are a problem here, as they cannot be detected when necessary - i.e., before <body> arrives. * * * The situation gets worse when class, ID, and unknown (XML) selectors are involved, as there is no way for a user/UA to anticipate which might be in use, in order to attach appropriate style attributes. A useful UI feature for UAs would be a quick summary of class and ID-enhanced elements in the current document, with an "on-the-fly" stylesheet editor for such. This would enable richer views of many documents, exposing even initially unstyled or invisible elements. For DTD-less XML documents, it will be the only meaningful way to apply any sort of user style. Enough for know. ________________________________________ Todd Fahrner mailto:fahrner@pobox.com http://www.verso.com/ The printed page transcends space and time. The printed page, the infinitude of books, must be transcended. THE ELECTRO-LIBRARY. --El Lissitzky, 1923
Received on Wednesday, 23 April 1997 16:49:11 UTC