New issue
Advanced search Search tips

Issue 652044 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 618165
Owner: ----
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

var() with relative url() in multi-value CSS properties

Reported by justinw...@cosmic.org.uk, Oct 1 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Example URL:

Steps to reproduce the problem:
New html document:

<!DOCTYPE html>
<html>
  <head>
    <style>
      :root {
        --colour: red;
      }
      div {
        width: 50px;
        height: 50px;
      }
      .not-working {
        background: var(--colour) url(relative/path/to/image.jpg);
      }
      .check-relative {
        background: url(relative/path/to/image.jpg);
      }
      .working {
        background: var(--colour) url(http://absolute/path/to/image.jpg);
      }
    </style>
  </head>
  <body>
    <div class="not-working"></div>
    <div class="check-relative"></div>
    <div class="working"></div>
  </body>
</html>

The image paths in the CSS should point to the same file, one using relative pathing, the other using absolute path.

What is the expected behavior?
All <div>s should show the same image as its background.

What went wrong?
The .not-working displays the background colour instead of the image. This is because the var() has some kind of conflict with url(), preventing relative path referencing in url() from working.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 53.0.2785.116  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0
 
Further investigation, having url(some/file.png) in a custom property doesn't work either.
Components: -Blink Blink>CSS
Mergedinto: 618165
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment