View Single Post
Old 07-18-2012, 02:02 PM   #558
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,433
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@kiwidude: FYI the cssutils package (part of calibre) can do CSS validation.

However, I agree with you that validation tools are pretty useless. They check things that can be easily checked rather than things that actually lead to rendering errors.

Validation tools are really a sort of "something must be done, but doing anything useful is too hard so lets do this instead" type of response to the problem of invalid markup. That is why you see HTML 5 for example moving emphasis away from validation and towards defining a parse algorithm instead.

The approach I take in calibre is to ignore validation and instead detect and correct patterns that lead to actual user visible problems when rendered in some real world viewer. Often these patterns are perfectly valid as per the validation tools and are bad only because of bugs in the viewers.

You are, of course, free to do whatever you like in your plugin
kovidgoyal is online now   Reply With Quote