Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-backgrounds/background-size/background-size-contain-svg-view.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>SVG <view>-based sprites in background-image, background-size: contain</title>
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<style>
#target {
width: 100px;
height: 100px;
background-image: url('support/sprite-view-no-viewbox.svg#rect');
background-repeat: no-repeat;
background-position: 50%;
border: 25px solid green;
box-sizing: border-box;
background-origin: border-box;
background-size: contain;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="target"></div>