1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html><head>
3 <link rel="reference" href="first-letter-dynamic-001-ref.xht">
4 <title>CSS Test: :first-letter</title>
5 <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu">
6 <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
7 <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-letter">
8 <meta name="flags" content="dom">
9 <script type="text/javascript">function setTextContent(n, t) { n.textContent = t; }
10
11 var stylesheets = [];
12 function initFuzzerSpecific()
13 {
14 var myStylesheetHolder = document.getElementsByTagName("head")[0];
15
16 for (var i = 0; i < 25; ++i) {
17 var s = document.createElementNS("http://www.w3.org/1999/xhtml", 'style');
18 s.style.display = "none";
19 myStylesheetHolder.appendChild(s);
20 stylesheets.push(s);
21 }
22 }
23 </script>
24 <style type="text/css">
25 span:before { content: open-quote; }
26 span:after { content: close-quote; }
27 span { quotes: '"' '"'; }
28 </style>
29 </head>
30 <body>
31
32 <p><span>Foo</span></p>
33
34 <p id="p2"><span id="q2"></span></p>
35
36 <script type="text/javascript">
37 document.body.offsetWidth;
38 initFuzzerSpecific();
39 setTextContent(stylesheets[1], "*:after { border: 3px solid green; } :first-letter { color: green; }");
40 setTextContent(stylesheets[2], "*:before { counter-reset: chicken; }");
41 </script>
42
43
44
45 </body></html>