table-cell-valign-003.html (1394B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Writing Modes test: vertical-align in orthogonal table cell</title> 4 5 <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#line-mappings"> 6 <meta assert="For the vertical-align property, the 'top' of the line box is its over edge; the 'bottom' of the line box is its under edge."> 7 <meta name="fuzzy" content="maxDifference=0-64; totalPixels=0-1" /> 8 <link rel="match" href="reference/table-cell-valign-003-ref.html"> 9 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com"> 10 11 <meta name="flags" content="ahem" /> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 14 <style> 15 table { 16 font: 50px/1 Ahem; 17 } 18 19 .v { 20 writing-mode: vertical-lr; 21 } 22 23 td { 24 block-size: 2em; 25 padding: 0; 26 color: green; 27 } 28 29 /* If vertical-align works correctly on the cells, their green Ahem glyphs 30 should cover the red part of each background. */ 31 td:nth-child(1) { 32 vertical-align: top; 33 background: linear-gradient(to right, red 50%, transparent 50%); 34 } 35 td:nth-child(2) { 36 vertical-align: middle; 37 background: linear-gradient(to right, transparent 25%, red 25%, red 75%, transparent 75%); 38 } 39 td:nth-child(3) { 40 vertical-align: bottom; 41 background: linear-gradient(to right, transparent 50%, red 50%); 42 } 43 </style> 44 45 <table border=1> 46 <tr> 47 <td class=v>XX</td> 48 <td class=v>XX</td> 49 <td class=v>XX</td> 50 </tr> 51 </table>