Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-lists/pseudo-element-remove-update.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Lists: counters updated when element with counter operation on its pseudo element is removed</title>
<link rel="match" href="pseudo-element-remove-update-ref.html">
<style>
body {
counter-reset: myCounter;
}
div::before {
content: counter(myCounter);
counter-increment: myCounter;
}
</style>
<body>
<div>test</div>
<div id="target">test</div>
<div>test</div>
<script>
document.documentElement.offsetTop;
target.remove();
</script>
</body>