layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-3.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-3.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +<!DOCTYPE html>
     1.5 +<!--
     1.6 +     Any copyright is dedicated to the Public Domain.
     1.7 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.8 +-->
     1.9 +<!-- Testcase to ensure we handle ::before and ::after pseudo-elements on a
    1.10 +     flex container, specifically when they've got display:table-row or
    1.11 +     table-cell.
    1.12 +
    1.13 +     Note that we *don't* treat the table row or cell frames themselves as flex
    1.14 +     items, because they get wrapped in an anonymous table box, and *that* is
    1.15 +     the flex item.  So, "align-self" and "order" have no effect on the
    1.16 +     row/cell. -->
    1.17 +<html>
    1.18 +<head>
    1.19 +  <title>CSS Test: Testing that generated content nodes with table-part display types are wrapped with an anonymous table, which forms a flex item</title>
    1.20 +  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
    1.21 +  <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-items">
    1.22 +  <link rel="match" href="flexbox-with-pseudo-elements-3-ref.html">
    1.23 +  <meta charset="utf-8">
    1.24 +  <style>
    1.25 +    .flexContainer {
    1.26 +      display: flex;
    1.27 +      align-items: flex-end;
    1.28 +      justify-content: space-between;
    1.29 +      height: 50px;
    1.30 +      width: 300px;
    1.31 +      margin-bottom: 2px;
    1.32 +      background: lightgray;
    1.33 +    }
    1.34 +    div.withBefore::before {
    1.35 +      display: table-row;
    1.36 +      content: 'b';
    1.37 +      background: yellow;
    1.38 +      align-self: center; /* should have no effect */
    1.39 +      order: 1;           /* should have no effect */
    1.40 +    }
    1.41 +    div.withAfter::after {
    1.42 +      display: table-cell;
    1.43 +      content: 'a';
    1.44 +      background: lightblue;
    1.45 +      align-self: center; /* should have no effect */
    1.46 +      order: -1;          /* should have no effect */
    1.47 +    }
    1.48 +  </style>
    1.49 +</head>
    1.50 +<body>
    1.51 +  <div class="flexContainer withBefore">
    1.52 +    x
    1.53 +    <div>y</div>
    1.54 +    z
    1.55 +  </div>
    1.56 +  <div class="flexContainer withAfter">
    1.57 +    x
    1.58 +    <div>y</div>
    1.59 +    z
    1.60 +  </div>
    1.61 +  <div class="flexContainer withBefore withAfter">
    1.62 +    x
    1.63 +    <div>y</div>
    1.64 +    z
    1.65 +  </div>
    1.66 +</body>
    1.67 +</html>

mercurial