From 1ec67c1af1b363b2138d23adb47cf9a20831b5d1 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 25 Jan 2017 02:14:43 +0000 Subject: Improve HTML formatting of .Bl -tag. In particular, when using the style sheet, put the body on the same line as the head for short heads, or on the next line for long heads, in a way that preserves both correct indentation and correct vertical spacing with and without -compact, and with one or more heads per body (hi, Zaphod) - eight use cases so far - and with and without -tag, and with and without -offset, 32 use cases grand total. Using many ideas from zhuk@, from , and from Benny Lofgren , and a few of my own. This is an excellent demonstration that CSS is an extremely hostile language, much more trapful and much harder to use than, say, C. When matthew@ reported this in July 2014 (!), it was already a known issue, and i no longer remember for how long. My first serious attempt at fixing it (in November 2015) failed miserably. I'd love to see simplifications of both the generated HTML code and of the style sheet, but without breaking any of the 32 use cases, please. --- mandoc.css | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'mandoc.css') diff --git a/mandoc.css b/mandoc.css index 162b7307..e299069d 100644 --- a/mandoc.css +++ b/mandoc.css @@ -1,4 +1,4 @@ -/* $Id: mandoc.css,v 1.13 2017/01/21 02:29:57 schwarze Exp $ */ +/* $Id: mandoc.css,v 1.14 2017/01/25 02:14:43 schwarze Exp $ */ /* * Standard style sheet for mandoc(1) -Thtml and man.cgi(8). */ @@ -91,9 +91,18 @@ dd.It-inset { } dl.Bl-ohang { } dt.It-ohang { } dd.It-ohang { margin-left: 0ex; } -dl.Bl-tag { } -dt.It-tag { } -dd.It-tag { } +dl.Bl-tag { margin-left: 8ex; } +dt.It-tag { float: left; + clear: both; + margin-top: 0ex; + margin-left: -8ex; + padding-right: 2ex; + vertical-align: top; } +dd.It-tag { width: 100%; + margin-top: 0ex; + margin-left: 0ex; + vertical-align: top; + overflow: auto; } table.Bl-column { } tr.It-column { } -- cgit v1.2.3-56-ge451