Skip to content

Truly independent web browser

861 B
Raw Blame
<!DOCTYPE html>

<title>Tests that given two sheets containing the same @position-try, modifying one sheet doesn't affect the other sheet</title>

<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#fallback-rule">
<link rel="author" title="Kiet Ho" href="mailto:[email protected]">

<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>

<style id="style1">
  @position-try --try {
    position-area: right top;
  }
</style>

<style id="style2">
  @position-try --try {
    position-area: right top;
  }
</style>

<script>
  test(() => {
    style1.sheet.cssRules[0].style.positionArea = "right bottom";
    assert_equals(style2.sheet.cssRules[0].style.positionArea, "right top");
  }, "Modifying one sheet containing @position-try rule doesn't affect another sheet");
</script>