On Tue, Dec 07 2010, Lars Magne Ingebrigtsen wrote:
> If you replace bgcolor with style="background-color: black", it looks
> like I would expect... but perhaps I'm expecting the wrong thing?
Yes it does. The problem is that bgcolor attribute reading is not done
at the same level than style parsing. So, unless you want to special
case bgcolor for
in shr-descend, which would be ugly, I do not
see how to deal with that.
Well, I do have an idea: I think the colorization is not done at the
right level. Maybe that should be the responsibility of shr-insert to
colorize what it inserted, based on the current value of shr-stylesheet.
That would solve the problem, at least partially.
Because the table code use `insert' rather than `shr-insert' for things
like borders, they would not be colorized. This is why in my patches
I've introduced another shr-insert-with-style function, and because
shr-insert do some weird treatment on text.
I let you think about that. :)
--
Julien Danjou
// ᐰ http://julien.danjou.info