Daniel Glazman wrote:
> 
> This is not so easy to do, in fact. When you insert generated content
> before or after the contents of the element, you only have to recompute
> once the block-level box and inlines boxes for the element. Even in case
> of reflow due to viewport resizing.
> 
> If every line can have generated content, it can be a long
> loop because each content generation changes all the inline boxes after
> it.
> 
> I don't say it is impossible, just not totally trivial.

>From an outsider's perspective, though, it seems like it should at least
be highly optimizable (almost to the point that the entire code would be
a special case) - the width of the generated content would be constant,
so the linewrapping could all just be done at the appropriately reduced
width.

You would have to either assume that the generated content only
inherited the style of the block-level element (so that for example

> some <b>bold
> text</b> here

would not bolden the second ">"), but given that rule, it should be easy
to implement without complexifying the rules too much. The only real
difficulty that I can imagine would be if the combined :before and
:after content were wider than the width of the box - but I'm sure that
Gecko eats special cases like that for breakfast! :)

Stuart.

Reply via email to