wpt / css / css-pseudo / first-line-insert-text-node-dynamic.html

Status: FAIL | Duration: 14ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-pseudo/first-line-insert-text-node-dynamic.html

<!doctype html>
<title>CSS Test: ::first-line updates after inserting text node at start of paragraph</title>
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo">
<link rel="match" href="first-line-insert-text-node-dynamic-ref.html">
<style>
p { width: 100px; }
p::first-line { text-decoration: underline; color: #CB000F; }
</style>
<p id="test">This is a test paragraph. You can insert extra text at its start; the ::first-line styles should be updated to accommodate this new text.</p>
<script>
document.body.offsetTop;
var para = document.getElementById('test');
para.insertBefore(document.createTextNode('I am adding a new text. '), para.firstChild);
</script>

/css/css-pseudo/first-line-insert-text-node-dynamic-ref.html

<!doctype html>
<title>CSS Test: ::first-line updates after inserting text node at start of paragraph (reference)</title>
<style>
p { width: 100px; }
p::first-line { text-decoration: underline; color: #CB000F; }
</style>
<p>I am adding a new text. This is a test paragraph. You can insert extra text at its start; the ::first-line styles should be updated to accommodate this new text.</p>