position-try-rule-caching-002.html (851B)
1 <!DOCTYPE html> 2 3 <title>Tests that given two sheets containing the same @position-try, modifying one sheet doesn't affect the other sheet</title> 4 5 <link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#fallback-rule"> 6 <link rel="author" title="Kiet Ho" href="mailto:kiet.ho@apple.com"> 7 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 11 <style id="style1"> 12 @position-try --try { 13 position-area: right top; 14 } 15 </style> 16 17 <style id="style2"> 18 @position-try --try { 19 position-area: right top; 20 } 21 </style> 22 23 <script> 24 test(() => { 25 style1.sheet.cssRules[0].style.positionArea = "right bottom"; 26 assert_equals(style2.sheet.cssRules[0].style.positionArea, "right top"); 27 }, "Modifying one sheet containing @position-try rule doesn't affect another sheet"); 28 </script>