- From: L. David Baron <dbaron@fas.harvard.edu>
- Date: Fri, 26 Nov 1999 13:44:46 -0500 (EST)
- To: thelawnet@yahoo.com, www-style@w3.org
On Fri, 26 Nov 1999 06:05:26 -0800 (PST), =?iso-8859-1?q?Matthew=20Brealey?= (thelawnet@yahoo.com) 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 http://www.fas.harvard.edu/~dbaron/css/user/ . (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.) -David L. David Baron Sophomore, Harvard (Physics) dbaron@fas.harvard.edu Links, SatPix, CSS, etc. <URL: http://www.fas.harvard.edu/~dbaron/ > WSP CSS AC <URL: http://www.webstandards.org/css/ >
Received on Friday, 26 November 1999 13:44:47 UTC