tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

grid-baseline-002.html (2230B)


      1 <!DOCTYPE html>
      2 <title>CSS Grid: Grid container baseline</title>
      3 <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com">
      4 <link rel="help" href="https://drafts.csswg.org/css-grid/#grid-baselines">
      5 <link rel="help" href="https://crbug.com/234191">
      6 <link rel="match" href="references/grid-baseline-002-ref.html">
      7 <meta name="assert" content="Check that Baseline Alignment works for 1-dimensional Grid like in Flexible Box, even using margins, paddings and borders."/>
      8 
      9 <link href="/css/support/grid.css" rel="stylesheet">
     10 <style>
     11 .inline-block { display: inline-block; }
     12 .grid, .inline-grid {
     13   background-color: lightgrey;
     14   grid-auto-flow: column;
     15 }
     16 .border { border: 11px solid pink; }
     17 .padding { padding: 13px; }
     18 .margin { margin: 8px 0; }
     19 </style>
     20 <div>
     21 before text
     22 <div class="border" style="display: inline-block; background-color: lightgrey">
     23 <div class="grid" style="height: 30px; margin-top: 7px; padding-top: 10px;">
     24  baseline
     25 </div>
     26 </div>
     27 after text
     28 </div>
     29 
     30 <div>
     31 Should align
     32 <div class="inline-block border">
     33  <div class="grid padding" style="grid-template-columns: 50px; grid-template-rows: 50px; background-color: pink">
     34      <div style="background-color: lightgrey"></div>
     35  </div>
     36 </div>
     37 with the
     38 <div class="inline-block margin">
     39  <div class="grid border" style="grid-template-columns: 50px; grid-template-rows: 50px; background-color: pink">
     40      <div style="background-color: lightgrey"></div>
     41  </div>
     42 </div>
     43 bottom of
     44 <div class="inline-block padding" style="padding-left: 0; padding-right: 0">
     45  <div class="grid margin border" style="grid-template-columns: 50px; grid-template-rows: 50px; background-color: pink">
     46      <div style="background-color: lightgrey;"></div>
     47  </div>
     48 </div>
     49 the grey box.
     50 </div>
     51 
     52 <div>
     53 Should align with the
     54 <div class="inline-block">
     55  <div class="grid" style="background-color: white">
     56      <div class="border padding margin" style="background-color: lightgrey;"></div>
     57  </div>
     58 </div>
     59 bottom of the pink box.
     60 </div>
     61 
     62 <div>
     63 Should align 8px
     64 <div class="inline-grid margin border" style="grid-template-columns: 30px; grid-template-rows: 30px;"></div>
     65 below the bottom
     66 <div class="inline-grid margin border padding"></div>
     67 of the pink box.
     68 </div>