1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-align-self-vert-3-ref.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,80 @@ 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 +<!-- Reference case for align-items / align-self behavior, using blocks in 1.10 + place of flex items and using float and width keywords to emulate the 1.11 + align-items / align-self properties. --> 1.12 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.13 + <head> 1.14 + <title>CSS Reftest Reference</title> 1.15 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 1.16 + <style> 1.17 + .flexbox { 1.18 + border: 1px dashed blue; 1.19 + width: 4px; 1.20 + font-family: sans-serif; 1.21 + font-size: 10px; 1.22 + margin-left: 80px; 1.23 + } 1.24 + 1.25 + div.big { 1.26 + font-size: 18px; 1.27 + width: 50px; 1.28 + } 1.29 + 1.30 + /* Classes for each of the various align-self values */ 1.31 + .flex-start { 1.32 + background: lime; 1.33 + float: left; 1.34 + } 1.35 + .flex-end { 1.36 + background: orange; 1.37 + float: right; 1.38 + } 1.39 + <!-- We center shrinkwrapped text by putting it into an inline-block, and 1.40 + then wrapping that inline-block in a helper-div that has 1.41 + "text-align:center" set. For this to work, the parent has to be at 1.42 + least as wide as the centered content inside of it, so we make it 1.43 + large with a negative margin such that its center aligns with the 1.44 + 4px-wide container's center. --> 1.45 + .centerParent { 1.46 + text-align: center; 1.47 + width: 100px; 1.48 + margin-left: -48px; 1.49 + } 1.50 + .center { 1.51 + background: lightblue; 1.52 + display: inline-block; 1.53 + text-align: left; /* Keep parent's centering from tweaking my text */ 1.54 + } 1.55 + .baseline { 1.56 + background: teal; 1.57 + float: left; 1.58 + } 1.59 + .stretch { 1.60 + background: pink; 1.61 + } 1.62 + .clearFloats { clear: both } 1.63 + </style> 1.64 + </head> 1.65 + <body> 1.66 + <div class="flexbox"> 1.67 + <div class="flex-start">start</div> 1.68 + <div class="flex-start big">a b</div> 1.69 + <div class="flex-end">end</div> 1.70 + <div class="flex-end big">a b</div> 1.71 + <div class="centerParent clearFloats"> 1.72 + <div class="center">center</div> 1.73 + </div> 1.74 + <div class="centerParent"> 1.75 + <div class="center big">a b</div> 1.76 + </div> 1.77 + <div class="baseline">base</div> 1.78 + <div class="baseline big">abc</div> 1.79 + <div class="stretch clearFloats">stretch</div> 1.80 + <div class="stretch big">a b</div> 1.81 + </div> 1.82 + </body> 1.83 +</html>