summaryrefslogtreecommitdiffstats
path: root/layout/reftests/first-line/out-of-flow-1d.html
blob: f674011fb960b877deaffe32bcee91a46c6a923c (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
26
27
<!DOCTYPE html>
<html>
  <head>
    <title>CSS 2.1 Test Suite: :first-line</title>
    <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" />
    <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
    <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line"/>
    <meta name="flags" content="dom" />
    <style>
      div { color: green }
      div::first-line { color: red }
    </style>
    <script>
      function runTest() {
        var s = document.createElement("span");
        s.setAttribute("style", "float: left");
        s.appendChild(document.createTextNode("This should be green"));
        var i = document.getElementById("i");
        i.parentNode.insertBefore(s, i);
      }
    </script>
  </head>
  <body onload="runTest()">
    <div><span id="i"></span></div>
  </body>
</html>