Raphael Graf wrote:
> The diff inserts some space above the footer.
> This improves readability and makes it similar to the other output formats.
> 
> Here is an example found in the wild, demonstrating the problem:
> https://webassembly.github.io/wabt/doc/wasm-objdump.1.html

So I think one answer to this problem is "use the provided mandoc.css".
However, that's not the default. But perhaps it, or a variant of it, should
be.

I guess one objection to always using mandoc.css is that it's another file
that may get lost. And perhaps it's a touch too large to inline?
But we can trim it down some to where I think it can be reasonably inlined in
every html and I don't think there will be many complaints about bloat.

This is only a start. I noticed there's a lot of redundant definitions, and by
inverting the selector property grouping we can trim many lines off the file.
I don't think this impedes readability of maintenance. On the contrary,
(personally) I find it easier to see all the italic tags in one place versus
scanning a list of mostly identical looking elements. But that may just be the
way I look at it.

A few more operations like this, and elimination of the emtpy { } sets and I
think we can consider inlining this as a default style instead of the current
minimal one. Maybe we embed this minimized version but provide the full file
complete with empty blocks for local customization?

Index: mandoc.css
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mandoc.css,v
retrieving revision 1.29
diff -u -p -r1.29 mandoc.css
--- mandoc.css  4 Dec 2018 06:11:44 -0000       1.29
+++ mandoc.css  20 Dec 2018 16:27:46 -0000
@@ -171,27 +171,13 @@ td.foot-os {      text-align: right; }
 
 /* Semantic markup for command line utilities. */
 
-table.Nm { }
-code.Nm {      font-style: normal;
-               font-weight: bold;
-               font-family: inherit; }
-.Fl {          font-style: normal;
-               font-weight: bold;
-               font-family: inherit; }
-.Cm {          font-style: normal;
-               font-weight: bold;
-               font-family: inherit; }
-.Ar {          font-style: italic;
-               font-weight: normal; }
+code.Nm, .Fl, .Cm, .Ic, .Ev { font-style: normal; }
+.Ar, .Pa { font-style: italic; }
+code.Nm, .Fl, .Cm, .Ic { font-weight: bold; }
+.Ar, .Ev, .Pa { font-weight: normal; }
+code.Nm, .Fl, .Cm, .Ic { font-family: inherit; }
+.Ev { font-family: monospace; }
 .Op {          display: inline; }
-.Ic {          font-style: normal;
-               font-weight: bold;
-               font-family: inherit; }
-.Ev {          font-style: normal;
-               font-weight: normal;
-               font-family: monospace; }
-.Pa {          font-style: italic;
-               font-weight: normal; }
 
 /* Semantic markup for function libraries. */
 

Reply via email to