W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: Treat background-image: url("") as background-image: none; in CSS proposal.

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 21 Jun 2013 09:28:47 -0700
Message-ID: <CAAWBYDB2sTsgQebB+t-FXvmGSxo=Aj6t=U9Y5R1302Jw7hmFGw@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
On Fri, Jun 21, 2013 at 5:28 AM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> * Daniel Glazman wrote:
>>On 21/06/13 09:43, Tab Atkins Jr. wrote:
>>> On Thu, Jun 20, 2013 at 11:39 PM, Vsevolod Vlasov <vsevik@chromium.org> wrote:
>>>> TLDR: I'd like background-image: url("") to have the same behavior as
>>>> background-image: none; in CSS.
>>> That would be a weird and invasive change for such an obvious
>>> implementation bug.  "" is a perfectly valid relative url, and it's
>>> certainly possible for it to evaluate to an image, or anything else.
>>> It seems pretty clear that we should just fix the error in Blink, not
>>> spread a hack around the issue to CSS itself.
>>Absolutely. Content negociation makes it possible to reply
>>an image to that URL. It really seems you're trying to fix
>>a browser-specific issue with a global hack.
> The empty string is a same-document reference and should not result in a
> retrieval action, just like clicking on <a href='#example'> should not
> result in the browser reloading the document.

Not quite.  While anything with a hash in it is a same-doc reference,
a url without a hash *should* be re-retrieved (subject to caching
semantics, etc.).  Clicking on <a href="">I'm a self link!</a> reloads
the page, as it should, while <a href="#">I'm a hash link!</a> does

> Since text/css resources
> are not images, there is no background image that could be rendered. If
> the declaration is in a HTML or SVG document, you would have a cyclic
> dependency (the document has to be rendered to render its background),
> and if CSS does not define how to break the cycle, there is nothing to
> render either. See <http://tools.ietf.org/html/rfc3986#section-4.4>.

CSS doesn't allow you to render HTML documents as images, but the SVG
case is definitely interesting.

Received on Friday, 21 June 2013 16:29:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:31 UTC