W3C home > Mailing lists > Public > w3c-wai-ua@w3.org > July to September 2001

RE: !important

From: Tantek Celik <tantek@cs.stanford.edu>
Date: Sat, 21 Jul 2001 19:10:54 -0700
To: joels@ecollege.com, wendy@w3.org
CC: w3c-wai-gl@w3.org, w3c-wai-ua@w3.org
Message-ID: <1216354717-308834982@psdbay.com>
Ian Jacobs pointed this thread out to me and suggested that I might have 
something useful to say.

Regarding whether CSS1 !important (author wins) is implemented or CSS2
!important (user wins) is implemented, in IE5/Mac, we implemented the CSS2
version (user style sheet wins).

From: Joel Sanda <joels@ecollege.com>
Date: Tue, 17 Jul 2001 11:39:48 -0600
Subject: RE: !important

> Using the same file for the Opera example
> (http://www.geocities.com/joelsanda/important.htm)

I loaded this example, saw two paragraphs of large red text, and what
appeared to be a third paragraph of plain/normal text.

Then I downloaded the user style sheet Wendy posted:


and saved it to my desktop, and configured IE5/Mac (through its preferences)
to use the user style sheet 01-user-important.css on my desktop.

The document important.htm was automatically reloaded with the new user
style sheet, which resulted in two paragraphs of normal sized white text on
a grey background, and what again appeared to be a third paragraph of
plain/normal text.

Since it seemed wrong that the user styles were not applied to the third
"paragraph", I took a look at the source, which had:

 <p.you>This sentence should change when you specify user font

"p.you" is not a valid HTML tag, and therefore should be ignored by
conforming HTML implementations, which places the text which follows into
the <body> element, and not inside any paragraph, hence it is not styled by
the user rule.

I think what was intended was:

 <p class='you'>This sentence should change when you specify user font

Which works as expected (user style is applied).

> Netscape 4.77 for Windows
> preserved the !important declaration for the paragraph tag but also allowed
> me to override the paragraph tag that did not have !important.

This is incorrect since the third "paragraph" is not a paragraph and should
not have any of the style rules in the user or author style sheets applied
to it.

> Opera 5.12 (Windows) will not override the normal p class

Same result as IE5/Mac - this is correct.

Received on Saturday, 21 July 2001 22:10:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:38:31 UTC