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

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

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 21 Jun 2013 14:28:39 +0200
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: www-style@w3.org
Message-ID: <2ch8s8tfb69q8s4k320ek51s2d3gg39esv@hive.bjoern.hoehrmann.de>
* 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. 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>.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Friday, 21 June 2013 12:29:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC