Re: The universal selector, inherit and important

On Fri, 26 Nov 1999 06:05:26 -0800 (PST),
=?iso-8859-1?q?Matthew=20Brealey?= ( wrote:
> Due to the extreme stupidity of the weight sort (the
> worst [i.e., worst idea rather than most badly written
> (float gets this accolade)] thing in CSS), 
> * {color: inherit !important}
> would always result in the initial value; something I
> think is worth pointing out, esp. in view of the fact
> that this is a likely user style sheet.
> BODY {color: black;
> background: white;
> }
> * {color: inherit !important;
> background: inherit !important;
> }

That's a badly designed user stylesheet, since the first rule does
nothing.  However, I don't see why this case means !important should be
changed.  I think it is very well designed as it is.

> If !important had been properly defined, none of these
> problems [to take another example: .class {width:
> 50%;} DIV {margin: something else !important}, which
> would totally screw up the whole page].
> As I see it the definition of ! important is totally
> stupid - its ONLY role should be to override the
> weight sort.

Isn't that what it does?  Or are you proposing a system where A
overrides B, B overrides C, and C overrides A??  (That is, where
A, B, and C were respectively a user-important rule with
selector *, an author rule with selector BODY, and a user rule
with selector BODY.)

> I challenge anyone to name a useful way to use
> !important, and then I'll show them a hundred ways
> that users could get confused, with !important in
> their user style sheets not working properly.

Read .  (Anyway, the
average user wouldn't design his own user stylesheet, but would instead
probably use a stylesheet written by an expert or insert some
parameters into a template to create a stylesheet.)


L. David Baron    Sophomore, Harvard (Physics)
Links, SatPix, CSS, etc.     <URL: >
WSP CSS AC                      <URL: >

Received on Friday, 26 November 1999 13:44:47 UTC