prefixfree icon indicating copy to clipboard operation
prefixfree copied to clipboard

background-image: url('') triggers an error

Open amercier opened this issue 13 years ago • 5 comments

When I use the following CSS:

/**
 * Disabled drop-down lists
 *    - background-color alone does not work in Google Chrome:
 *      http://code.google.com/p/chromium/issues/detail?id=100234
 *      Setting background-image: url('') solves the issue 
 */
select[disabled] {
    background-image: url('');
    background-color: #ebebe3;
}

It triggers the following error in my JS console:

GET http://[...]' 404 (Not Found)

Confimed on the following browsers:

  • Google Chrome 16.0.950.0
  • Firefox 9.0.1

amercier avatar Jan 26 '12 09:01 amercier

Are there any display problems or just the error thrown?

LeaVerou avatar Jan 26 '12 09:01 LeaVerou

Nope, everything is working just fine. It's just the error thrown.

amercier avatar Jan 26 '12 09:01 amercier

I don't know if that can help you, but while using background-image: url("") (note the double-quotes) does not trigger the error.

Also the URL is the location of the origial CSS file + ' (a quote). This seems that your plugin is resolving background-image: url('') into background-image: url(path/to/my/css/'), so the error is triggered only after the new CSS is injected into the page.

amercier avatar Jan 26 '12 10:01 amercier

Image

I get this when I use double quotes around img paths. All my CSS is generated by SASS

ghost avatar Aug 02 '12 15:08 ghost

In the interest of trying to get things cross-referenced: Pull request #98 is related to this.

mkantor avatar Sep 25 '12 02:09 mkantor