Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-pseudo/first-line-change-inline-color-nested.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="first-line-change-inline-color-nested-ref.html">
<style>
#block { color: green; }
#block::first-line { color: blue; }
.green { color: green; }
</style>
<div id="block">
<div>
<p>Blue <span id="target"><span>This text should be green.</span></span> Blue</p>
</div>
</div>
<script>
requestAnimationFrame(() => {
requestAnimationFrame(() => {
target.className = 'green';
document.documentElement.removeAttribute('class');
});
});
</script>
</html>