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

RE: XP> Border-spacing property of enhanced layout not effective

From: SILBERNAGEL,SCOTT (HP-Vancouver,ex1) (scott_silbernagel@hp.com)
Date: Tue Dec 17 2002 - 14:14:39 EST

  • Next message: BIGELOW,JIM (HP-Boise,ex1): "XP> Removal of width attribute of table element in XHTML-Print"

    Hello,

    My two cents: I agree with Jim. Option #2 (supporting both border-spacing
    and border-collapse) should be reasonable for a low-cost printer to
    implement.

    Option #1 is also a perfectly valid option but I believe it should read:
    only implement the _separated_ border model and not collapsed. The CSS2
    errata changed the default value for border-collapse to "separate" since
    this is the default value in IE, Opera, Mozilla, etc...

    Scott Silbernagel
    Hewlett-Packard
    360-212-0472
    scott.silbernagel@hp.com

    > -----Original Message-----
    > From: BIGELOW,JIM (HP-Boise,ex1) [mailto:jim.bigelow@hp.com]
    > Sent: Tuesday, December 17, 2002 9:46 AM
    > To: xp@pwg.org
    > Subject: XP> Border-spacing property of enhanced layout not effective
    >
    >
    > 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 - 14:14:53 EST