Re: parse errors detected by amaya but not jigsaw

At 7:56 PM -0400 2004/09/29, John Russell wrote:
> http://mozilla.org/css/cavendish/template.css
> indicates errors in Amaya 8.6 but not in jigsaw


Interesting stylesheet (gave me an idea or two), but I have a question,
and something to impart as well:

1) What are the errors that Amaya flags that jigsaw doesn't?  It IS
clear that the CSS Validator has some long-standing bugs in it - I've
independently (though hardly been the first) to discover a couple of
them, and have found several other via Googling on the topic.  If Amaya
is (correctly!) flagging CSS violations that the validator misses it'd
be nice to know what they are and keep them in mind.

2) I notice you are using the IE6/win "voice-family" hack.  You should
really do quick Googling on "IE5 voice-family hack" and "IE6
voice-family hack" and read a whole lot of the results.   The short
version:
 a) This hack is really a kluge, not a true hack, and will surely break
[a lot more] in the future; it also produces invalid CSS when parsed by
the targeted recalcitrant browser, IE6, which is at least
philosophically wrong, even if it does produce the desired work-around.
 b) While it does (in a brute-force way) work around a problem in
IE6/Win, it creates a new one that must be compensated for in IE5/Win,
namely that IE5 will ignore whatever rule comes next after the kluge;
this is "fixed" by another hack, commonly misnamed the
"be-nice-to-Opera5" hack, which should really be called the
"be-nice-to-IE5" hack since Opera5 (and even 4) do not seem to require
it after all; worst of all:
 c) This hack *breaks NS4 on MacOS*, causing it to spit out odd
Javascript errors!; but...
 d) There is an "un-hack", completely valid for all browsers, to work
around the central IE box model bug: namely, never have a DIV that has
both width and padding. Instead use a nested DIV structure:  <DIV
STYLE="padding: ..."><DIV STYLE="width: ...">[content]</DIV></DIV> or
the associated external versions of the rules triggered by ID.
Apparently the one with padding must come first, but I have not
personally tested that hypothesis very much.  It does cause some very
minor code bloat, but it is so uniform that you could even write DIVs
that had both width and padding and then use a search-replace filter in
a (good) editor to change it to the split div model with no direct
re-coding effort, right before deployment.  And it doesn't break
ANYthing.

Probably the easiest way to do this would be something like:
div#foo { padding: ... }
div#foo>div#foosub { width: ... }

If you are also using "margin" it might require a second level of
nesting. I don't have a Windows box, so I can't conveniently test this.

Hope this helps!

> http://mozilla.org/css/cavendish/template.css
> indicates errors in Amaya 8.6 but not in jigsaw
>
> has this been repaired in cvs -- i only have access to win98 binary
> --
> john russell ve3ll@rac.ca [those are L's as in LLAMA]
> http://home.cogeco.ca/~ve3ll
> http://home.cogeco.ca/~trains
> http://home.cogeco.ca/~cipher

Received on Thursday, 30 September 2004 06:48:22 UTC