revert-layer-011.html (737B)
1 <!DOCTYPE html> 2 <title>CSS Cascade Layers: 'revert-layer' from animation origin to author origin on custom property</title> 3 <link rel="help" href="https://drafts.csswg.org/css-cascade-5/#revert-layer"> 4 <link rel="author" href="mailto:xiaochengh@chromium.org"> 5 <link rel="match" href="reference/ref-filled-green-100px-square.xht"> 6 7 <style> 8 #target { 9 width: var(--x); 10 --x: 150px; 11 height: 100px; 12 background-color: green; 13 animation: anim linear 2s -1s paused; 14 } 15 16 @property --x { 17 syntax: '<length>'; 18 initial-value: 0px; 19 inherits: false; 20 } 21 22 @keyframes anim { 23 from { --x: 50px; } 24 to { --x: revert-layer; } 25 } 26 </style> 27 28 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 29 <div id="target"></div>