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

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

From: Vsevolod Vlasov <vsevik@chromium.org>
Date: Fri, 21 Jun 2013 10:39:35 +0400
Message-ID: <CAB6O+xZuZVTw-2q6+wfE_w8MTNncMxLbDFMqvCAdJ0g7g0t-=g@mail.gmail.com>
To: www-style@w3.org
TLDR: I'd like background-image: url("") to have the same behavior as
background-image: none; in CSS.

I am working on Chrome Developer Tools and we have a long standing bug
crbug.com/84605.
In short, when CSS stylesheet has background-image: url("") one can not
edit style rules in Developer Tools.

Our problem is that Blink memory cache stores resources (CachedResource)
mapped by url.
When a stylesheet contains background-image: url(""), UA tries to load an
image from the URL where stylesheet comes from and evicts stylesheet
resource from the memory cache.
At this point we no longer can get stylesheet contents hence the original
problem.

While it's possible to fix the implementation (though I am afraid this
patch would not be landed as it would be too invasive for such a small
problem),
I would suggest always treating background-image: url(""); as
background-image: none; instead.

Arguments:

1. Loading image from the same url where stylesheet comes does not make
much (if any) sense.
2. Web developers using background-image: url(""); mean background-image:
none; as can be seen from the bug comments (see webk.it/69211 also)
3. This was already made for <image src=""> (http://html5.org/r/4834,
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-December/024357.html
)

What do you think?

Thank you,
Vsevolod Vlasov
Received on Friday, 21 June 2013 06:40:24 UTC

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