grid-column-axis-self-baseline-synthesized-004.html (3376B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Grid Layout Test: Self-Baseline alignment along column-axis on content-sized grids and synthesized baselines</title> 4 <link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-grid-1/#alignment"> 6 <link rel="help" href="https://drafts.csswg.org/css-grid-1/#column-align"> 7 <link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-items"> 8 <link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-alignment"> 9 <link rel="help" href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-baseline"> 10 <link rel="help" href="https://drafts.csswg.org/css-align/#synthesize-baseline"> 11 <link rel="stylesheet" href="/css/support/grid.css"> 12 <link rel="stylesheet" href="../../support/alignment.css"> 13 <meta name="assert" content="Grid items orthogonal to the Baseline Alignment Context should use their border-box 'under' edge as synthesized baseline."> 14 <meta name="assert" content="Empty grid items with fixed size should use their border-box 'under' edge as synthesized baseline."> 15 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 16 <style> 17 .grid { 18 position: relative; 19 text-orientation: sideways; 20 grid: auto auto / 100px 200px; 21 font-family: Ahem; 22 line-height: 1; 23 } 24 .bigFont { font-size: 50px; } 25 .height25 { height: 25px; } 26 .width25 { width: 25px; } 27 .width300 { width: 300px; } 28 29 .paddingLeft { padding-left: 20px; } 30 .paddingRight { padding-right: 20px; } 31 32 .fixedHeight { height: 125px; } 33 .fixedWidth { width: 125px; } 34 </style> 35 <script src="/resources/testharness.js"></script> 36 <script src="/resources/testharnessreport.js"></script> 37 <script src="/resources/check-layout-th.js"></script> 38 <script type="text/javascript"> 39 setup({ explicit_done: true }); 40 </script> 41 <body onload="document.fonts.ready.then(() => { checkLayout('.grid'); })"> 42 43 <pre>Horizontal grid and item with fixed height</pre> 44 45 <div class="grid width300 alignItemsBaseline"> 46 <div class="firstRowFirstColumn fixedHeight" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="125"></div> 47 <div class="firstRowSecondColumn bigFont" data-offset-x="100" data-offset-y="85" data-expected-width="200" data-expected-height="100">É É ÉÉ</div> 48 <div class="autoRowAutoColumnSpanning2 height25"></div> 49 </div> 50 51 <pre>VerticalLR grid and item with fixed width</pre> 52 53 <div class="grid alignItemsBaseline verticalLR"> 54 <div class="firstRowFirstColumn fixedWidth" data-offset-x="30" data-offset-y="0" data-expected-width="125" data-expected-height="100"></div> 55 <div class="firstRowSecondColumn bigFont paddingLeft" data-offset-x="0" data-offset-y="100" data-expected-width="120" data-expected-height="200">É É ÉÉ</div> 56 <div class="autoRowAutoColumnSpanning2 width25"></div> 57 </div> 58 59 <pre>VerticalRL grid and item with fixed width</pre> 60 61 <div class="grid alignItemsBaseline verticalRL"> 62 <div class="firstRowFirstColumn fixedWidth" data-offset-x="85" data-offset-y="0" data-expected-width="125" data-expected-height="100"></div> 63 <div class="firstRowSecondColumn bigFont paddingRight" data-offset-x="25" data-offset-y="100" data-expected-width="120" data-expected-height="200">É É ÉÉ</div> 64 <div class="autoRowAutoColumnSpanning2 width25"></div> 65 </div>