grid-self-baseline-horiz-001.html (2264B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Grid Layout Test: baseline context and self alignment (horizontal)</title> 4 <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-grid/#alignment"> 6 <link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-align-self"> 7 <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-by-baseline"> 8 <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-items-property"> 9 <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-self-property"> 10 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=412410"> 11 <link rel="match" href="grid-self-baseline-horiz-001-ref.html"> 12 <link rel="stylesheet" href="/fonts/ahem.css"> 13 <link rel="stylesheet" href="/css/support/alignment.css"> 14 <link rel="stylesheet" href="/css/support/grid.css"> 15 <meta name="assert" content="Test that all items share 'first-row' Baseline Context and no item shares any column-like Baseline Context. Items participate in both, column and row baseline, but since they only share a row-like Baseline Context only 'aling-self' (column baseline-axis) should apply. The Baseline Alignment may increase size contribution of some items." /> 16 17 <style> 18 body { margin: 0; } 19 .block { 20 background: grey; 21 float: left; 22 margin: 5px; 23 text-orientation: sideways; 24 font-family: Ahem; 25 line-height: 1; 26 } 27 .block > :nth-child(1) { font-size:24px; } 28 .block > :nth-child(2) { font-size:32px; } 29 .block > :nth-child(3) { font-size:48px; } 30 .block > :nth-child(4) { font-size:64px; } 31 .item { 32 border-width: 2px 5px 3px 4px; 33 border-style: solid; 34 padding: 6px 3px 7px 8px; 35 margin: 10px 6px 4px 12px; 36 } 37 .extraBottomPadding { padding-bottom: 30px; } 38 .row { grid-auto-flow: column; } 39 </style> 40 41 <p>1x4 with parallel items.</p> 42 <div class="block grid row contentStart itemsBaseline"> 43 <div class="item">É</div> 44 <div class="item">É</div> 45 <div class="item">É</div> 46 <div class="item">É</div> 47 </div> 48 <div class="block grid row contentStart itemsBaseline"> 49 <div class="item extraBottomPadding">É</div> 50 <div class="item">É</div> 51 <div class="item">É</div> 52 <div class="item">É</div> 53 </div>