This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Consider <link rel=stylesheet href=foo.css> <style> html { background-image: var(foo, "fallback.jpg"); } </style> /* foo.css */ html { var-foo: "bar.jpg"; } Now, if foo.css doesn't load quickly enough, the inline style will start downloading fallback.jpg, and then when foo.css has loaded, the inline style will instead start downloading bar.jpg, as far as I can tell. If foo.css does load quickly enough, only bar.jpg will be downloaded. I think this is a bad situation that we shouldn't allow. Maybe the fallback should be ignored for properties that download something, like background-image?
We can't remove this network race, as it exists without any variables at all: <link rel=stylesheet href=foo.css> <style> html { background-image: url("fallback.jpg"); } </style> /* foo.css */ html { background-image: url("bar.jpg"); } Since variables don't make this any worse, and as far as I can tell don't block any plans to fix this (since I don't think there are any such plans), I'm not going to do anything about this.