Empty url() value in CSS background/background-image property causes misbehavior
Reported by
m.chinan...@gmail.com,
Jun 12 2018
|
|||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36
Steps to reproduce the problem:
1. Write some CSS with a background-image: url("");
2. Load your page and inspect using the Styles inspector.
3. On the first load, you'll see that the Styles inspector behaves as normal.
4. Reload the page and now all Styles are italicized, not editable, and not source information (line numbers, sass partials, etc)
What is the expected behavior?
Styles inspector ignores the CSS error and behaves as normal.
What went wrong?
The Styles inspector broke. See attachment for screen recording of this in action.
Did this work before? N/A
Chrome version: 67.0.3396.79 Channel: stable
OS Version: OS X 10.13.5
Flash Version:
Firefox and Safari handle this without issue.
,
Jun 12 2018
,
Jun 12 2018
Thanks for the report. I was unable to reproduce the grayed-out section with `url()` and `url("")` using both a local html file or a JSFiddle.
Could you please provide a sample HTML file to help us investigate?
einbinder@ have you seen this before?
,
Jun 12 2018
I also cannot reproduce this. I'm suspecting it has something to do with your sourcemaps?
,
Jun 12 2018
Thanks for the responses, all. See attached ZIP with an example of this issue in action. What I noticed while making this test case: If the empty url('') is written in the HTML inside <style>, the issue _doesn't_ happen. However, if the empty url('') is in a separate CSS file, the issue _does_ happen. Hope this helps!
,
Sep 28
The empty url causes the css file to be loaded twice, the second time as an image. When it is loaded as an image, the content is blocked from the renderer, but overrides the original css content we had. This confuses DevTools into thinking that the css file had no content to begin with. |
|||
►
Sign in to add a comment |
|||
Comment 1 by m.chinan...@gmail.com
, Jun 12 2018