Use CSS variables for image references

This CL is the result of applying the following regex:

```
url\(Images/(.+)\.\w+\)
```

and replacing it with

```
var(--image-file-$1)
```

R=jacktfranklin@chromium.org

Bug: 1183361
Change-Id: I3255dd23c817b050deaa55835eb8c715d00387aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2732375
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
This commit is contained in:
Tim van der Lippe
2021-03-04 15:31:13 +00:00
committed by Commit Bot
parent 2c62a07c4a
commit 88ba72dc73
36 changed files with 91 additions and 90 deletions
+1 -1
View File
@@ -201,7 +201,7 @@ async function checkFileExists(filePath) {
/**
* In Devtools-Frontend we load images without a leading slash, e.g.
* url(Images/checker.png). This works within devtools, but breaks this component
* var(--image-file-checker). This works within devtools, but breaks this component
* server as the path ends up as /component_docs/my_component/Images/checker.png.
* So we check if the path ends in Images/*.* and if so, remove anything before
* it. Then it will be resolved correctly.