<!doctype html><title>URLs in embedded style sheets resolve relative to the document base URI</title><linkrel=helphref=https://drafts.csswg.org/css-values/#relative-urls><scriptsrc=/resources/testharness.js></script><scriptsrc=/resources/testharnessreport.js></script><basehref="http://{{hosts[alt][www]}}"><style>:root{--image-path:url("images/test.png");}#relative-image-url{background-image:url(images/test.png);}#relative-image-variable-url{background-image:var(--image-path);}</style><divid="relative-image-url"></div><divid="relative-image-variable-url"></div><script>constids=["relative-image-url","relative-image-variable-url"];for(letidofids){test(()=>{constel=document.getElementById(id);constbackgroundImageStyle=window.getComputedStyle(el)["background-image"];constbaseRelativeImageURL=newURL("images/test.png",document.baseURI);assert_equals(backgroundImageStyle,`url("${baseRelativeImageURL.href}")`);},"base-relative URL: "+id);}</script>