Re: [css3-content] sizing of images inserted using the content property

On Wed, Nov 23, 2011 at 8:55 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Nov 23, 2011, at 8:40 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>> On Wed, Nov 23, 2011 at 8:35 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>> On 11/23/11 11:29 AM, L. David Baron wrote:
>>>> If 'content' contains a single url(), the only way to make the value
>>>> fit the grammar is by making that url() part of the<content-list>
>>>> production, in which case it is not treated as a replaced element.
>>>
>>> Ah, ok.  That makes sense, and seems backwards-compatible.  Is that what
>>> WebKit and Opera actually implement, though?
>>
>> Not WebKit.  We currently make "div { content: url(foo); }" turn the
>> div into a replaced element.
>
> So, that is the last (and only) item in the comma separated list, but instead of being a div containing an anonymous replaced inline element, the div itself is a replaced element? Is there an advantage to doing it that way?

The main disadvantage is that we have a completely different behavior
when you use that on pseudo-elements.  ^_^

Boris has pointed out in the past that it means "content: url(foo);"
and "content: '' url(foo);" have different behavior, which seems
somewhat awkward.

~TJ

Received on Wednesday, 23 November 2011 17:04:23 UTC