41 lines
1.1 KiB
HTML
41 lines
1.1 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>Test for first-letter for nested elements</title>
|
|
<style>
|
|
.test:first-letter { color: green; }
|
|
.boxed { border: solid 1px; }
|
|
</style>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="description"></div>
|
|
|
|
<p class="test" id="test_p_1">
|
|
<span class="boxed" id="test_span_1">Span</span>
|
|
</p>
|
|
<p class="test">
|
|
<span class="boxed" id="test_span_2" class="boxed">Span</span>
|
|
</p>
|
|
<p>
|
|
<span class="boxed" id="ref_span" style="font-size:32px"><span style="color:green">S</span>pan</span>
|
|
</p>
|
|
|
|
<div id="console"></div>
|
|
|
|
<script>
|
|
document.body.offsetTop;
|
|
|
|
document.getElementById('test_p_1').style.fontSize = '32px';
|
|
document.getElementById('test_span_2').style.fontSize = '32px';
|
|
|
|
document.body.offsetTop;
|
|
|
|
description("The three spans below should look the same.");
|
|
shouldBe("document.getElementById('test_span_1').offsetWidth", "document.getElementById('ref_span').offsetWidth");
|
|
shouldBe("document.getElementById('test_span_2').offsetWidth", "document.getElementById('ref_span').offsetWidth");
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|