W3C home > Mailing lists > Public > www-style@w3.org > November 2011

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 23 Nov 2011 09:03:34 -0800
Message-ID: <CAAWBYDDW_so=eNT1e48_gtftY3a8Y+cwtNAk4yd_oVXXSu9aQQ@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, Boris Zbarsky <bzbarsky@mit.edu>, "www-style@w3.org" <www-style@w3.org>
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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:06 UTC