discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Ingo Schwarze <schwarze@usta.de>
Cc: discuss@mandoc.bsd.lv
Subject: Re: Broken tables in HTML output
Date: Mon, 3 Dec 2018 23:01:42 +0100	[thread overview]
Message-ID: <20181203220142.zj5yxqdmgizsmckp@pali> (raw)
In-Reply-To: <20181201172057.GD89021@athene.usta.de>

[-- Attachment #1: Type: text/plain, Size: 4384 bytes --]

On Saturday 01 December 2018 18:20:57 Ingo Schwarze wrote:
> Hi Pali,
> 
> Pali Rohar wrote on Mon, Nov 26, 2018 at 11:05:16PM +0100:
> > On Monday 26 November 2018 23:01:33 Pali Rohar wrote:
> >> On Monday 26 November 2018 22:58:26 Pali Rohar wrote:
> 
> >>> I tested new cvs changes for following table:
> 
> >>> .TS
> >>> box;
> >>> c|c|c.
> >>> A	A1	A_
> >>> \^	A2	\^
> >>> _
> >>> B	B1	B_
> >>> _
> >>> C	C1	C_
> >>> \^	C2	\^
> >>> _
> >>> E	E1	E_
> >>> \^	E2	\^
> >>> \^	E3	\^
> >>> _
> >>> F	F1	F_
> >>> .TE
> 
> The table syntax looks sane to me.
> 
> >>> And in chromium browser 70 there is missing horizontal line between
> >>> A and B; and also between C and D. See attachment how it looks like.
> >>>
> >>> It is really suspicious that horizontal line is just between A2 and B1.
> >>> And not across whole line.
> 
> The rendering in the PNG file you attached seems broken in multiple
> respects:
> 
>  * The outer border of the table as a whole is rendered as "double",
>    even though the mandoc HTML output clearly says:
> 
>    <table class="tbl" style="border-style: solid;">
> 
>  * Same for the horizontal line between B and C:
> 
>    <tr style="border-bottom-style: solid;">
>      <td style="text-align: center; border-right-style: solid;">B</td>
> 
>  * Same for the horizontal line between A and B:
> 
>    <tr style="border-bottom-style: solid;">
>      <td style="text-align: center; border-right-style: solid;">A2</td>
>    </tr>
> 
> So whatever produced that PNG file seems quite broken.
> 
> Oh, one among the bugs in that software could be that for deciding
> where to draw the borders of a row, it only looks at the <td>
> elements contained in that <tr> element itself.
> 
> On https://www.w3.org/TR/html/tabular-data.html
> the algorithm for processing rows says in step 13:
> 
>   Let the slots with coordinates (x, y)
>   such that xcurrent <= x < xcurrent+colspan
>   and ycurrent <= y < ycurrent+rowspan be covered by a new cell c,
>   anchored at (xcurrent, ycurrent), which has width colspan and
>   height rowspan, corresponding to the current cell element.
> 
> That implies that all slots in the second row of the table -
> the row that contains A2 - are covered.  The first slot is
> covered by the cell A, the third slot by the cell A_.
> 
> And right below "4.9.12. Processing model" it says:
> 
>   A row is a complete set of slots from x=0 to x=xwidth-1,
>   for a particular value of y.
> 
> And https://www.w3.org/TR/CSS2/tables.html says
> below "17.6.2 The collapsing border model":
> 
>   In the collapsing border model, it is possible to specify borders
>   that surround all or part of a cell, row, row group, column, and
>   column group.
> 
> Note that mandoc.css says "table { border-collapse: collapse; }",
> so the above applies.  The whole *row* is supposed to be surrounded,
> not just the <td> elements that happen to be contained in the
> associated <tr> element.
> 
> Also, https://validator.w3.org/nu/ does not show any warnings
> except asking for a "lang" attribute of the <html> element.
> 
> So, i believe what mandoc emits is correct and unambiguous -
> if it is not, i'd appreciate clues what is wrong and how to fix it.
> 
> >>> Below is output from GNU man, which I believe is correct:
> [...]
> 
> I agree that rendering is correct.
> It also matches what mandoc -Tutf8 and -Tascii produce now.
> 
> >> Now I tested Firefox and Konqueror browsers too. And they rendered those
> >> missing horizontal lines... Output is exactly same as like GNU man
> >> terminal output.
> 
> Yes, i think Firefox renders the mandoc output correctly.
> 
> >> So it is just problem in Chromium 70?
> 
> It seems so to me, but i'm not a specialist for web technologies,
> so if anyone here knows better, please speak up.

Seems that it is needed to put "border-bottom-style: solid" for
rowspanned td element. At least this is working in chrome. And after
playing a bit I was not able to achieve visible border when was
specified for tr element.

It is possible such change in mandoc generator? I understand that
current HTML output is (or you think) correct, but is unusable in chrome
browser. And chrome is one of the major browsers, so it should not be
ignored.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2018-12-03 22:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 11:03 Pali Rohár
2018-07-16 15:29 ` Ingo Schwarze
2018-07-16 16:36   ` Pali Rohár
2018-07-16 17:44     ` Ingo Schwarze
2018-11-24 23:15   ` Ingo Schwarze
2018-11-25 19:34   ` Ingo Schwarze
2018-11-25 21:25     ` Ingo Schwarze
2018-11-26  8:53       ` Pali Rohár
2018-11-26 21:27   ` Ingo Schwarze
2018-11-26 21:58     ` Pali Rohár
2018-11-26 22:01       ` Pali Rohár
2018-11-26 22:05         ` Pali Rohár
2018-12-01 17:20           ` Ingo Schwarze
2018-12-01 19:35             ` Pali Rohár
2018-12-03 20:46             ` Pali Rohár
2018-12-04  5:33               ` Ingo Schwarze
2018-12-03 22:01             ` Pali Rohár [this message]
2018-12-03 22:14               ` Ingo Schwarze
2018-12-03 22:20                 ` Pali Rohár
2018-12-03 22:37                   ` Ingo Schwarze
2018-12-04 16:44                     ` Pali Rohár
2018-12-04 18:04                       ` Ingo Schwarze
2019-01-21  9:39                         ` Pali Rohár
2019-01-21 13:16                           ` Ingo Schwarze
2018-11-29  2:15     ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181203220142.zj5yxqdmgizsmckp@pali \
    --to=pali.rohar@gmail.com \
    --cc=discuss@mandoc.bsd.lv \
    --cc=schwarze@usta.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).