Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!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>