multiline-span-with-overflowing-text-and-box-decorations.html (1767B)
1 <!DOCTYPE html> 2 <html class=reftest-wait> 3 <title>View transitions: span with overflowing text is rendered correctly</title> 4 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/"> 5 <link rel="author" href="mailto:khushalsagar@chromium.org"> 6 <link rel="match" href="multiline-span-with-overflowing-text-and-box-decorations-ref.html"> 7 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 8 <meta name="fuzzy" content="maxDifference=0-3; totalPixels=0-4900"> 9 10 11 <script src="/common/reftest-wait.js"></script> 12 <script src="/common/rendering-utils.js"></script> 13 <style> 14 :root { 15 font: 20px/1 Ahem; 16 } 17 18 #wrapper { 19 width: 250px; 20 visibility: hidden; 21 } 22 span { 23 text-shadow: red -2px -5px; 24 border: 2px solid black; 25 box-shadow: 3px 3px red, -1em 0 .4em olive; 26 view-transition-name: target; 27 visibility: visible; 28 } 29 30 .hidden { 31 view-transition-name: hidden; 32 } 33 34 html::view-transition-group(hidden) { animation-duration: 300s; } 35 html::view-transition-image-pair(hidden) { animation: unset; opacity: 0; } 36 html::view-transition-group(root) { visibility: hidden; } 37 38 html::view-transition-group(target) { 39 animation: unset; 40 } 41 42 html::view-transition-old(target) { 43 animation: unset; 44 opacity: 0; 45 } 46 47 html::view-transition-new(target) { 48 animation: unset; 49 opacity: 1; 50 } 51 52 html::view-transition { 53 background: pink; 54 } 55 </style> 56 57 <div id="wrapper"> 58 FILLER FILLER<span>This text should render correctly</span> 59 </div> 60 61 <div class="hidden"></div> 62 63 <script> 64 failIfNot(document.startViewTransition, "Missing document.startViewTransition"); 65 66 async function runTest() { 67 let transition = document.startViewTransition(); 68 transition.ready.then(takeScreenshot); 69 } 70 onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); 71 </script>