XP Mail Archive: XP> Border-spacing property of enhanced lay

XP> Border-spacing property of enhanced layout not effective

From: BIGELOW,JIM (HP-Boise,ex1) (jim.bigelow@hp.com)
Date: Tue Dec 17 2002 - 12:46:11 EST

  • Next message: BIGELOW,JIM (HP-Boise,ex1): "XP> New versions of the XHTML-Print specifications available"

    Hello,

    The CSS Print Profile
    (http://www.pwg.org/xhtml-print/HTML-Version/CSS-Print.html) for XHTML-Print
    states that the border-spacing property but not the border-collapse property
    must be supported by a printer conforming to the Enhance Layout extensions.

    The border-collapse property allows the document author to control whether a
    single line (border-collapse: collapse) separates table cells or whether
    each table cell has its own border (border-collapse: separate) so that there
    are two lines separating each table cell. When border-collapse has the value
    separate, the border-spacing property controls the distance between the cell
    borders, otherwise the value is irrelevant.

    The xhtml file at the end of this message illustrates how border-spacing
    separates borders when each cell has its own border, but not when a single
    border separates cells. The resulting page rendered with Netscape is
    attached as a pdf.

    What to do?
    -----------
    Requiring that an enhanced layout printer implement border-spacing without
    border-collapse seems to be specifying only half a solution. To remedy the
    situation the specification could do one of the following:

    1. Drop the requirement for supporting the border-spacing property and say
    that printers must only implement the collapsed border model. Documents
    could use the padding property to separate table cells, ex. td {padding :
    4mm}

    2. Require support for border-collapse and that printers support both the
    collapsed and separated border models. For consistency across all printers,
    a recommendation of how to render empty cells should be included in place of
    support for the empty-cells property.

    Weighting the tradeoffs
    -----------------------
    Option 0 (do nothing) could lead to inconsistencies between printers since
    there's no direction on what to do with the border-spacing information and
    lack of support for border-collapse doesn't allow the implementer to use the
    CSS2 spec.

    Option 1. (only implement the collapsed border model) This seems sufficient
    for simple tables of picture thumbnails from digital cameras. This seems to
    be what Internet Explorer 5.5 and 6.0 have done.

    Option 2. (implement both collapsed and separate border models) This is the
    full CSS2 solution. Document writers have available the full range of CSS2
    functionality. Documents viewed in opera and Netscape navigator would be
    printed as seen in the browser. However, this will require more processing
    to compute the table's width, but doesn't violate the one-pass table layout
    if the fixed table layout algorithm is used.

    Recommendation
    --------------
    I recommend option 2 -- supporting both border models, collapsed and
    separate, and the border-collapse and border-spacing properties. What do
    the champions of low-cost printers say?

    Jim Bigelow
    Hewlett-Packard
    208-396-2068
    jim.bigelow@hp.com

    XHTML-Print file
    =====================

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://ww.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>table border spacing</title>
    <style type="text/css">
     
          table { border-spacing:4mm; }
          table.col {
                 border-collapse:collapse;
                 border: 2mm outset;

                }
          table.sep {
                 border-collapse:separate;
                 border: 2mm outset;
                }
          table.sep td {border: inset 1mm;}
          
    </style>
    </head>
    <body>
    <p>
    <table class="col">
    <tr>
    <td>0123456789</td>
    <td>0123456789</td>
    <td>0123456789</td>
    <td>0123456789</td>
    </tr>
    <tr>
    <td>01234567890123456789</td>
    <td>01234567890123456789</td>
    <td>01234567890123456789</td>
    <td>01234567890123456789</td>
    </tr>
    </table>
    </p>

    <p>
    <table class="sep">
    <tr>
    <td>0123456789</td>
    <td>0123456789</td>
    <td>0123456789</td>
    <td>0123456789</td>
    </tr>
    <tr>
    <td>01234567890123456789</td>
    <td>01234567890123456789</td>
    <td>01234567890123456789</td>
    <td>01234567890123456789</td>
    </tr>
    </table>
    </p>

    </body>
    </html>





    This archive was generated by hypermail 2b29 : Tue Dec 17 2002 - 12:46:32 EST