Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-transforms/transform-box/content-box-mutation-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<title>transform-box: content-box, box border mutated</title>
<link rel="match" href="reference/cssbox-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
<meta name="assert" content="This should display a square with a black bar at the top whose top-left corner is at 100,100."/>
<style>
#target {
width: 150px;
height: 200px;
margin-left: 300px;
margin-top: 100px;
background-color: green;
border-left: solid 25px black;
transform: rotate(90deg);
transform-origin: -50px 0;
transform-box: content-box;
}
</style>
<div id="target"></div>
<script>
waitForAtLeastOneFrame().then(() => {
document.querySelector('#target').style.borderLeft = 'solid 50px black';
takeScreenshot();
});
</script>