Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/printing/existing-transition-in-media-print.tentative.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Printing with a transition that could trigger as a result of @media print</title>
<link rel="match" href="transition-in-media-print-ref.html">
<style>
#target {
transition-duration: 100000s;
print-color-adjust: exact;
}
#target:not(.print) {
color: red;
}
</style>
<div id="target">
Should not be red
</div>
<script>
let target = document.getElementById("target");
target.getBoundingClientRect();
target.classList.add("print");
</script>