W3C home > Mailing lists > Public > www-style@w3.org > November 1996

RE: Relative weight - reader vs. author styles

From: Chris Wilson (PSD) <cwilso@MICROSOFT.com>
Date: Fri, 15 Nov 1996 10:34:00 -0800
Message-ID: <c=US%a=_%p=msft%l=RED-76-MSG-961115183400Z-5863@INET-03-IMC.itg.microsoft.com>
To: "'Sherm Pendley'" <sherm@infoboard.com>, "'www-style@w3.org'" <www-style@w3.org>
There was a rule declaration weighting similar to what you request -
"!legal" - but, as I've spent a considerable amount of time explaining
to people here, the CSS cascading mechanism as is simply cannot satisfy
accessibility concerns.  The reason for this is that the CSS cascading
mechanism simply explains how to resolve conflicts when more than one
rule applies to an element; that cascading order does NOT influence how
those properties interact with other rules when they are inherited.  For
example:

<STYLE>
DIV.important { color: red !important }
</STYLE>
...
<DIV CLASS=important>
<P CLASS=foo>
This is some text.
</P>
</DIV>...

Obviously, the text will be red.  Now, assume in another stylesheet (my
low-precedence user stylesheet, for example) I have a rule that says
"P.foo { color: blue }".  The text will be red, even though I set it to
be blue in an important rule.  This is because inherited rules in CSS
have the LOWEST precedence (after default values) in the cascading
order.  To get the current cascading order to allow you to override any
rules, you'd have to cook up rules for every possible element with your
"!required" set on them if, for example, you wanted to be certain you'd
always get white on black text.  Not particularly elegant.

Now, obviously you could add syntax to add functionality that would
circumvent this problem in the cascading order; however, that would mean
that for each property I inherit from a parent element, I would need to
remember if the property was "important" or not.  Speaking as a CSS
implementor, this would be a nightmare.

I'm unconvinced that this is really what is needed, anyway.  To address
accessibility concerns, is it not more preferable to state "I need white
on black 16pt Arial text always" rather than "I need white on black 16pt
Arial text on BODY content...and P content... and" for any given
disability?  This concern can be addressed by adding specific
accessibility features in your UA - notably, have separate controls for
turning on or off specific stylesheet features, in which case the
default (user preferences) values should be used.

	-Chris
Chris Wilson
cwilso@microsoft.com


>-----Original Message-----
>From:	Sherm Pendley [SMTP:sherm@infoboard.com]
>Sent:	Friday, November 15, 1996 9:50 AM
>To:	www-style@w3.org
>Subject:	Relative weight - reader vs. author styles
>
>Hello,
>
>I am a strong supporter of CSS1, but you did ask for comments, and I do
>have a concern with one part of the CSS1 spec.  Overall, however, I regard
>it as an outstanding piece of work.
>
>My one concern is with the following, from section 3 "The Cascade":
>
>"Sometimes conflicts will arise between the style sheets that influence the
>presentation. Conflict resolution is based on each style rule having a
>weight. By default, the weights of the reader's rules are less than the
>weights of rules in the author's documents. I.e., if there are conflicts
>between the style sheets of an incoming document and the reader's personal
>sheets, the author's rules will be used. Both reader and author rules
>override the UA's default values."
>
>One of the primary design goals of HTML is to be viewable on any UA.  A
>reader may have very good reason to specify his or her own style, such as
>poor vision (requiring larger type) or color blindness (requiring specific
>color settings).  It is utterly impossible for the author to anticipate
>every situation in which his document will be viewed (or heard), and thus
>equally impossible for him to make allowances for every possible need.  For
>this reason, there should be a method for allowing the reader to specify
>settings that cannot be overridden by the author under any circumstances.
>
>I assume that the "important" declaration is meant to accomodate situations
>where there is a genuine need for specific formatting, such as legal
>documents, and this is a legitimate concern in many cases.  It is my
>concern that many style sheets will have their contents marked as
>"important" when there is no legitimate need for them to be so marked. 
>Similar abuse of existing HTML constructs is already widespread, and is a
>major reason that style sheets are needed to begin with, so there is ample
>precedent for this behaviour.
>
>To allow for this, I propose an addition to the "important" declaration:  A
>"required" declaration, which would be guaranteed to override all other
>settings.  This declaration should only take effect if found in a user's
>default style sheet, and should be ignored if found in an author-specified
>style sheet.  This would give the user the final word on how his UA will
>present web pages, and this sort of control over the UA is an absolute
>requirement in some cases.
>
>Yours,
>
>-sherm
>
Received on Friday, 15 November 1996 13:41:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:46 GMT