On Sun, Dec 05 2010, Lars Magne Ingebrigtsen wrote: > Yes, but that's special-casing the colour things. :-) If you have > >

foo

bar > > then only the top-level p should have a border, and the next one > shouldn't. But it's kinda moot, since I don't think any of the > properties we're interested in have this kinda of behaviour. Well, rendering foo is calling shr-descend, so you'll only have border style set on foo. (how to draw the border is another problem. :)) >> With: >>

foo

bar

>> >> You start with the first style, render foo with background and >> foreground. Then you got for bar via shr-descend, which changes color to >> green, but merge with the previous dynamically bound shr-stylesheet, so >> it still has background set to 'blue'. You render bar, exit 2 >> shr-descend calls, and continue to render what else is in the document. > > Yes... except that we're setting the colour after rendering all the > children today. Yes, that's our problem I think. I think it should be done in 2 passes: first render text (`insert') then render style (`overlay'). That would probably solves all the problem (and maybe insert new ones :-)). -- Julien Danjou // ᐰ http://julien.danjou.info