blob: d4eb11a76dbcf646ad2c2a2fb6728a91e2233cae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<!DOCTYPE html>
<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org">
<meta name="assert" content="Test that the browser doesn't crash when a first-letter pseudo-element toggles visiblity as a child of a before pseudo-element.">
<style>
.btn-text::before {
content: "a";
visibility: hidden;
}
.btn-text.visible::before {
visibility: visible;
}
#problem::first-letter {
text-transform: none;
}
</style>
<div id="problem">
<span class="btn-text"></span>
</div>
<script>
requestAnimationFrame(() => requestAnimationFrame(() => {
document.querySelector('.btn-text').classList.toggle('visible')
}));
</script>
|