OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <link href="resources/grid.css" rel="stylesheet"> |
| 3 <link href="resources/grid-alignment.css" rel="stylesheet"> |
| 4 <style> |
| 5 body { margin: 0; } |
| 6 .flex { |
| 7 display: flex; |
| 8 background: grey; |
| 9 float: left; |
| 10 margin: 5px; |
| 11 } |
| 12 .row { flex-flow: row; } |
| 13 .column { flex-flow: column; } |
| 14 span:nth-child(1) { font-size:12px; } |
| 15 span:nth-child(2) { font-size:16px; } |
| 16 span:nth-child(3) { font-size:24px; } |
| 17 span:nth-child(4) { font-size:32px; } |
| 18 span { |
| 19 border: 2px solid; |
| 20 padding: 3px; |
| 21 margin: 5px; |
| 22 } |
| 23 .extraTopPadding { padding-top: 15px; } |
| 24 .extraBottomPadding { padding-bottom: 15px; } |
| 25 .extraLeftPadding { padding-left: 15px; } |
| 26 .extraRightPadding { padding-right: 15px; } |
| 27 .verticalLR { text-orientation: sideways; } |
| 28 .verticalRL { text-orientation: sideways; } |
| 29 </style> |
| 30 |
| 31 <p>1x4 with parallel items, but opposite block-flow direction.<br>All items shar
e 'first-row' (matches their inline axis) Baseline Context.<br>No item participa
tes in column-like Baseline Context.<br>We have 2 baseline-sharing groups.<br>Th
e 'align-self' property can be used to align items along their block-axis so ite
ms of each baseline-sharing group are baseline-aligned to each other.<br>The Bas
eline Alignment may increase size contribution of some items.</p> |
| 32 <div class="flex row verticalLR itemsBaseline"><span>A</span><span class="vertic
alRL">A</span><span>A</span><span class="verticalRL">A</span></div> |
| 33 <div class="flex row verticalLR itemsBaseline"><span class="extraLeftPadding">A<
/span><span class="verticalRL">A</span><span>A</span><span class="verticalRL">A<
/span></div> |
| 34 <div class="flex row verticalRL itemsBaseline"><span>A</span><span class="vertic
alLR">A</span><span>A</span><span class="verticalLR">A</span></div> |
| 35 <div class="flex row verticalRL itemsBaseline"><span class="extraLeftPadding">A<
/span><span class="verticalLR">A</span><span>A</span><span class="verticalLR">A<
/span></div> |
| 36 |
| 37 <br clear="all"> |
| 38 |
| 39 <p>4x1 with orthogonal items, but opposite block-flow direction.<br>No item part
icipates in row-like Baseline Context.<br>All items share 'first-column' (matche
s their inline axis) Baseline Context.<br>We have 2 baseline-sharing groups.<br>
The 'justify-self' property can be used to align items along their block-axis so
items of each baseline-sharing group are baseline-aligned to each other.<br>The
Baseline Alignment may increase size contribution of some items.</p> |
| 40 <div class="flex column itemsBaseline"><span class="verticalLR">A</span><span cl
ass="verticalRL">A</span><span class="verticalLR">A</span><span class="verticalR
L">A</span></div> |
| 41 <div class="flex column itemsBaseline"><span class="verticalLR extraLeftPadding
">A</span><span class="verticalRL">A</span><span class="verticalLR">A</span><spa
n class="verticalRL">A</span></div> |
| 42 |
OLD | NEW |