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