Re: content: url() is bad

> [Original Message]
> From: Ian Hickson <>
> We have four options:
>  A. the 'content' property always generates a box that is 'display:
>     inline-block'; 'display' cannot compute to anything else if 'content'
>     is set to anything but 'children'.
>     Pro: Consistent.
>     Con: Doesn't address a number of critical use cases (you can't make
>          generated content wrap).
>  B. the 'content' property never generates a replaced element.
>     Pro: Consistent.
>     Con: doesn't address a number of critical use cases (<img> can't be
>          described using generated content).
>  C. DWIM: when it looks like 'content' is being used for inline content,
>     render it inline (as for B), when it looks like 'content' is being
>     used for replaced content, do that (as for A).
>     Con: Inconsistent.
>     Pro: addresses all the use cases.
>  D. Do something that hasn't yet been suggested.
> Since my requirement is to address all the use cases, A and B aren't
> acceptable. I don't yet know of a D. That leaves C.
> I'm happy to consider solutions that are simpler than C.
> But without suggestions, there isn't much I can do.

Would anonymous boxes be helpful here?

i.e. <string> generates an anonymous inline box, url() generates
an anonymous block box, etc.. and if a content has multiple parts
as in content:url(X) url(Y) url(Z) " Corporation", there is an anonymous
box around each of the three images and a fourth anonymous box
around the string.  I haven't looked at the details, but it seems like
a promising place to start looking for a solution that would both
be consistent and does what one wants.

Received on Wednesday, 14 April 2004 14:04:26 UTC