On Saturday 01 December 2018 18:20:57 Ingo Schwarze wrote: > > And in all browsers I see another suspicious thing. Vertical lines in > > the middle of the table are black and horizontal lines are gray or > > rather dark gray (but not black). Border around whole table is also > > gray. > > > > Is this intended? > > No, it is not intended, all lines seem black and of equal width to me > in Firefox 62.0.2 on OpenBSD-current. > > Neither the HTML emitted by mandoc nor mandoc.css makes any statement > about the color or width of the lines. That is intentional: neither > does the tbl(7) input code, and i believe that when styling, it is > best to only style what you intend to style and leave the rest at > the default or user settings. > > I don't see why any browser would render any of the lines in gray, > though, and even less so in two different colors. > > https://www.w3.org/TR/CSS2/tables.html > > doesn't seem to say anything specific about color, so i'd expect > > https://www.w3.org/TR/CSS2/colors.html > > to apply, which says: > > 'color' > Value: | inherit > Initial: depends on user agent > > but whatever the initial value for a root element, it should be inherited > by all children alike, as far as i can see, so the borders should be > the same color as the text. > > Firing up "Web Developer >> Inspector" in Firefox 62.0.2 and enabling > "Browser Styles", i do indeed see "border-bottom-color: rgb(0, 0, 0);" > for the and all its children, as expected. Hi! I played with colors and seems that browsers do not inherit table border color to td border color. And by default my chrome and firefox uses gray color for table (if not specified). E.g. when you set "table { border-color: yellow; }" and border of "table" and "tr" elements are yellow, but "td" elements in black. Following patch "fixes" or rather workaround that problem. It inherits color also for "td" elements. Index: mandoc.css =================================================================== RCS file: /cvs/mandoc/mandoc.css,v retrieving revision 1.40 diff -u -r1.40 mandoc.css --- mandoc.css 26 Nov 2018 21:06:02 -0000 1.40 +++ mandoc.css 3 Dec 2018 20:41:19 -0000 @@ -17,7 +17,8 @@ border-collapse: collapse; } td { vertical-align: middle; padding-left: 0.2em; - padding-right: 0.2em; } + padding-right: 0.2em; + border-color: inherit; } ul, ol, dl { margin-top: 0em; margin-bottom: 0em; } li, dt { margin-top: 1em; } With this patch all border colors are now gray (which comes from user agent style). What do you think about this patch? In troff/tbl you does not specify color, but I think that HTML output should have consistent colors -- not different color for horizontal lines and different for vertical lines. Just because browsers have different defaults. -- Pali Rohár pali.rohar@gmail.com