Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
michael@0 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
michael@0 | 2 | <!-- |
michael@0 | 3 | Any copyright is dedicated to the Public Domain. |
michael@0 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 5 | --> |
michael@0 | 6 | <!-- Testcase for align-items / align-self behavior, with all the possible |
michael@0 | 7 | values included on different items within a flex container, and with |
michael@0 | 8 | margin/border/padding values on each item. --> |
michael@0 | 9 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 10 | <head> |
michael@0 | 11 | <title>CSS Test: Testing the behavior of 'align-self' with a horizontal flex container, with margin/padding/border on the items</title> |
michael@0 | 12 | <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> |
michael@0 | 13 | <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#align-items-property"/> |
michael@0 | 14 | <link rel="match" href="flexbox-align-self-horiz-2-ref.xhtml"/> |
michael@0 | 15 | <style> |
michael@0 | 16 | .flexbox { |
michael@0 | 17 | border: 1px dashed blue; |
michael@0 | 18 | height: 200px; |
michael@0 | 19 | display: inline-flex; |
michael@0 | 20 | font-size: 10px; |
michael@0 | 21 | line-height: 10px; |
michael@0 | 22 | vertical-align: top; |
michael@0 | 23 | } |
michael@0 | 24 | |
michael@0 | 25 | .flexbox > div { |
michael@0 | 26 | width: 40px; |
michael@0 | 27 | margin: 1px 2px 3px 4px; |
michael@0 | 28 | border-width: 2px 3px 4px 5px; |
michael@0 | 29 | padding: 3px 4px 5px 6px; |
michael@0 | 30 | border-style: dotted; |
michael@0 | 31 | } |
michael@0 | 32 | |
michael@0 | 33 | .big { |
michael@0 | 34 | height: 100px; |
michael@0 | 35 | font-size: 20px; |
michael@0 | 36 | line-height: 20px; |
michael@0 | 37 | } |
michael@0 | 38 | |
michael@0 | 39 | /* Classes for each of the various align-self values */ |
michael@0 | 40 | .flex-start { |
michael@0 | 41 | background: lime; |
michael@0 | 42 | align-self: flex-start; |
michael@0 | 43 | } |
michael@0 | 44 | .flex-end { |
michael@0 | 45 | background: orange; |
michael@0 | 46 | align-self: flex-end; |
michael@0 | 47 | } |
michael@0 | 48 | .center { |
michael@0 | 49 | background: lightblue; |
michael@0 | 50 | align-self: center; |
michael@0 | 51 | } |
michael@0 | 52 | .baseline { |
michael@0 | 53 | background: teal; |
michael@0 | 54 | align-self: baseline; |
michael@0 | 55 | } |
michael@0 | 56 | .stretch { |
michael@0 | 57 | background: pink; |
michael@0 | 58 | align-self: stretch; |
michael@0 | 59 | } |
michael@0 | 60 | </style> |
michael@0 | 61 | </head> |
michael@0 | 62 | <body> |
michael@0 | 63 | <div class="flexbox"> |
michael@0 | 64 | <div class="flex-start">start</div> |
michael@0 | 65 | <div class="flex-start big">a b c d e f</div> |
michael@0 | 66 | <div class="flex-end">end</div> |
michael@0 | 67 | <div class="flex-end big">a b c d e f</div> |
michael@0 | 68 | <div class="center">center</div> |
michael@0 | 69 | <div class="center big">a b c d e f</div> |
michael@0 | 70 | </div> |
michael@0 | 71 | <br/> |
michael@0 | 72 | <div class="flexbox"> |
michael@0 | 73 | <div class="baseline">base</div> |
michael@0 | 74 | <div class="baseline big">abc</div> |
michael@0 | 75 | <div class="stretch">stretch</div> |
michael@0 | 76 | <div class="stretch big">a b c d e f</div> |
michael@0 | 77 | </div> |
michael@0 | 78 | </body> |
michael@0 | 79 | </html> |