W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 2008

[Bug 6320] New: Explicit Row Height, table-cell’s Borders and border-separation

From: <bugzilla@wiggum.w3.org>
Date: Thu, 18 Dec 2008 14:43:01 +0000
To: xsl-editors@w3.org
Message-ID: <bug-6320-2197@http.www.w3.org/Bugs/Public/>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6320

           Summary: Explicit Row Height, table-cell’s Borders and border-
                    separation
           Product: XSLFO
           Version: 2.0 Working Draft
          Platform: All
               URL: http://lists.w3.org/Archives/Public/xsl-
                    editors/2008JanMar/0002
        OS/Version: All
            Status: ASSIGNED
          Severity: normal
          Priority: P2
         Component: XSL-FO
        AssignedTo: alb.w3c@gmail.com
        ReportedBy: Tony.Graham@MenteithConsulting.com
         QAContact: xsl-editors@w3.org


As far as I can tell the XSL-FO 1.1 Recommendation doesn’t indicate 
whether an explicit height set on a table-row element should include the 
table’s border-separation and the children cells’ border widths, or not. 
In section 7.15.6, a reference to CSS 2 is made “for a discussion of the 
‘height’ property in tables”, but the CSS 2 Recommendation is itself not 
clear what the height of a cell should be in this context.

Also, in section 6.7.9, “fo:table-row”, the “row-height trait” is 
mentioned but is not referenced anywhere else.

So, in the following example:
    <fo:table table-layout="fixed" width="100%" 
      border-collapse="separate"
      border="1pt solid black"
      border-separation="6pt">
      <fo:table-body font-size="8pt" line-height="10pt">
        <fo:table-row block-progression-dimension="45pt">
          <fo:table-cell border="2pt solid black">
            <fo:block>Cell 1</fo:block>
          </fo:table-cell>
          <fo:table-cell border="5pt solid black">
            <fo:block>Cell 2</fo:block>
          </fo:table-cell>
        </fo:table-row>
      </fo:table-body>
    </fo:table>

What should be the final block-progression-dimensions for the cells?
There are 3 possibilities:
1. the explicit row height shall include the cells’ borders and the 
   table’s border-separation:
   - height of cell 1 = 3 (half of border-separation)
            + 2 (border-before)
            + 10 (b-p-d)
            + 2 (border-after)
            + 3 (half of border-separation)
            = 20pt
   - height of cell 2 = 3 + 5 + 10 + 5 + 3 = 26pt  
   - height of row = max(explicit row height, height of cell 1, height of cell
2)
                   = 45pt
   As a consequence the final block-progression-dimensions of the cells 
   are re-evaluated to match the row’s explicit height:
   - b-p-d of cell 1 = 45 - (3 + 2 + 2 + 3) = 35pt
   - b-p-d of cell 2 = 45 - (3 + 5 + 5 + 3) = 29pt

2. the explicit row height shall include the cells’ borders but not the 
   table’s border-separation:
   - height of cell 1 = 2 + 10 + 2 = 14pt
   - height of cell 2 = 5 + 10 + 5 = 20pt
   - height of row = max(45, 14, 20) = 45pt
   So the final block-progression-dimensions of the cells would be:
   - b-p-d of cell 1 = 45 - (2 + 2) = 41pt
   - b-p-d of cell 2 = 45 - (5 + 5) = 35pt

3. the explicit row height shall include only the cells’ 
   block-progression-dimensions:
   - height of cell 1 = 10pt
   - height of cell 2 = 10pt
   - height of row = max(45, 10, 10) = 45pt
   So the final block-progression-dimensions of the cells would be:
   - b-p-d of cell 1 = 45pt
   - b-p-d of cell 2 = 45pt
   But then what would be the final row height? Should it be re-computed 
   as in the case where the row height is left to auto? Then:
   - height of cell 1 = 2 + 45 + 2 = 49pt
   - height of cell 2 = 5 + 45 + 5 = 55pt
   - height of row = max(49, 55) = 55pt
   So final b-p-ds of the cells:
   - b-p-d of cell 1 = 55 - (2 + 2) = 51pt
   - b-p-d of cell 2 = 45pt

There are some hints in the Recommendation which would tend towards 
solution #2, but a clarification in this area would be much appreciated.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 18 December 2008 14:43:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 11:00:00 GMT