1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-align-self-baseline-horiz-3.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,92 @@ 1.4 +<?xml version="1.0" encoding="UTF-8"?> 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 for how a baseline-aligned flex item's position is impacted by 1.10 + cross-axis margins, in a fixed-size flex container with the cross axis 1.11 + reversed via "flex-wrap: wrap-reverse". 1.12 + --> 1.13 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.14 + <head> 1.15 + <title>CSS Test: Baseline alignment of flex items in fixed-size single-line flex container, with cross axis reversed</title> 1.16 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 1.17 + <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#baseline-participation"/> 1.18 + <link rel="match" href="flexbox-align-self-baseline-horiz-3-ref.xhtml"/> 1.19 + <style> 1.20 + .flexbox { 1.21 + display: flex; 1.22 + align-items: baseline; 1.23 + flex-wrap: wrap-reverse; /* Just to flip cross-axis */ 1.24 + width: 40px; 1.25 + height: 40px; 1.26 + border: 1px solid gray; 1.27 + margin: 5px; /* just for visual separation */ 1.28 + float: left; 1.29 + } 1.30 + 1.31 + .flexbox > * { 1.32 + background: yellow; 1.33 + border: 1px solid black; 1.34 + height: 20px; 1.35 + flex: 1; 1.36 + } 1.37 + </style> 1.38 + </head> 1.39 + <body> 1.40 + <!-- ZEROTH ROW: NO MARGINS --> 1.41 + <!-- No margins on flex item: --> 1.42 + <div class="flexbox"> 1.43 + <div>a</div> 1.44 + </div> 1.45 + 1.46 + 1.47 + <!-- FIRST ROW: SETTING MARGIN-TOP: --> 1.48 + <br style="clear: both"/> 1.49 + 1.50 + <!-- auto: --> 1.51 + <div class="flexbox"> 1.52 + <div style="margin-top: auto">a</div> 1.53 + </div> 1.54 + 1.55 + <!-- Negative: --> 1.56 + <div class="flexbox"> 1.57 + <div style="margin-top: -4px">a</div> 1.58 + </div> 1.59 + 1.60 + <!-- Small: --> 1.61 + <div class="flexbox"> 1.62 + <div style="margin-top: 4px">a</div> 1.63 + </div> 1.64 + 1.65 + <!-- Large (pushing us out of container): --> 1.66 + <div class="flexbox"> 1.67 + <div style="margin-top: 25px">a</div> 1.68 + </div> 1.69 + 1.70 + 1.71 + <!-- SECOND ROW: SETTING MARGIN-BOTTOM: --> 1.72 + <br style="clear: both"/> 1.73 + 1.74 + <!-- auto: --> 1.75 + <div class="flexbox"> 1.76 + <div style="margin-bottom: auto">a</div> 1.77 + </div> 1.78 + 1.79 + <!-- Negative: --> 1.80 + <div class="flexbox"> 1.81 + <div style="margin-bottom: -4px">a</div> 1.82 + </div> 1.83 + 1.84 + <!-- Small: --> 1.85 + <div class="flexbox"> 1.86 + <div style="margin-bottom: 4px">a</div> 1.87 + </div> 1.88 + 1.89 + <!-- Large: --> 1.90 + <div class="flexbox"> 1.91 + <div style="margin-bottom: 25px">a</div> 1.92 + </div> 1.93 + 1.94 + </body> 1.95 +</html>