diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/selectors/invalidation/nth-child-when-sibling-changes.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/selectors/invalidation/nth-child-when-sibling-changes.html')
-rw-r--r-- | testing/web-platform/tests/css/selectors/invalidation/nth-child-when-sibling-changes.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/selectors/invalidation/nth-child-when-sibling-changes.html b/testing/web-platform/tests/css/selectors/invalidation/nth-child-when-sibling-changes.html new file mode 100644 index 0000000000..43374df917 --- /dev/null +++ b/testing/web-platform/tests/css/selectors/invalidation/nth-child-when-sibling-changes.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>CSS Selectors Invalidation: :nth-child(... of class) when sibling changes</title> +<link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> +<link rel="match" href="nth-child-when-sibling-changes-ref.html"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> +<style> + .sibling + :nth-child(odd of .c) { + color: green; + } +</style> +<div> + <p class="sibling" id="toggler">Ignored</p> + <p class="c">Odd; used to be green, should not be since no sibling</p> + <p class="c">Even, so should not be green</p> + <p class="c" class="sibling">Odd, but no sibling, so should not be green</p> + <p class="c">Even, so should not be green</p> + <p class="sibling">Ignored</p> + <p class="c">Odd, should be green</p> +</div> +<script> + document.documentElement.offsetTop; + toggler.classList.toggle("sibling"); +</script> + |