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

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.

I'm not sure the HTML precedent really extends to CSS well.  In HTML
it's much easier to accidentally leave an empty href or src attribute
around, particularly with badly-written templating languages.  The
same sort of thing doesn't really apply to CSS.  The "isb..." person
in the crbug doesn't seem to understand eir own CSS - "background:
none;" should have been working fine for years and years, since 2.1 or
earlier.  Their statement  "Well that's too bad as "background:
transparent url("") top left no-repeat" is a legitimate way to clear a
previously established style." is simply wrong.

~TJ

Received on Friday, 21 June 2013 07:44:33 UTC