diff options
author | 2018-06-25 13:01:14 +0000 | |
---|---|---|
committer | 2018-06-25 13:01:14 +0000 | |
commit | dd2b196545baea65af34df7587871708a7ffe7b5 (patch) | |
tree | 20119d5da0844eff1432c31f2e18dfd7929a8a7b | |
parent | OO version of atend (diff) | |
download | wireguard-openbsd-dd2b196545baea65af34df7587871708a7ffe7b5.tar.xz wireguard-openbsd-dd2b196545baea65af34df7587871708a7ffe7b5.zip |
For -man -Thtml, ignore author-specified .HP widths because they
harm responsive design; use @media-dependent defaults instead.
-rw-r--r-- | usr.bin/mandoc/man_html.c | 21 | ||||
-rw-r--r-- | usr.bin/mandoc/mandoc.css | 7 |
2 files changed, 11 insertions, 17 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c index 49d89429551..d6a8571615f 100644 --- a/usr.bin/mandoc/man_html.c +++ b/usr.bin/mandoc/man_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_html.c,v 1.103 2018/05/25 20:23:39 schwarze Exp $ */ +/* $OpenBSD: man_html.c,v 1.104 2018/06/25 13:01:14 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org> @@ -555,24 +555,13 @@ man_IP_pre(MAN_ARGS) static int man_HP_pre(MAN_ARGS) { - struct roffsu sum, sui; - const struct roff_node *np; - if (n->type == ROFFT_HEAD) return 0; - else if (n->type != ROFFT_BLOCK) - return 1; - - np = n->head->child; - - if (np == NULL || !a2width(np, &sum)) - SCALE_HS_INIT(&sum, INDENT); - sui.unit = sum.unit; - sui.scale = -sum.scale; - - print_bvspace(h, n); - print_otag(h, TAG_DIV, "csului", "Pp", &sum, &sui); + if (n->type == ROFFT_BLOCK) { + print_bvspace(h, n); + print_otag(h, TAG_DIV, "c", "HP"); + } return 1; } diff --git a/usr.bin/mandoc/mandoc.css b/usr.bin/mandoc/mandoc.css index b320f441a59..c9bf9267001 100644 --- a/usr.bin/mandoc/mandoc.css +++ b/usr.bin/mandoc/mandoc.css @@ -1,4 +1,4 @@ -/* $OpenBSD: mandoc.css,v 1.20 2018/06/10 16:15:40 schwarze Exp $ */ +/* $OpenBSD: mandoc.css,v 1.21 2018/06/25 13:01:14 schwarze Exp $ */ /* * Standard style sheet for mandoc(1) -Thtml and man.cgi(8). */ @@ -153,6 +153,9 @@ table.Bl-compact > tbody > tr > td { .eqn { } .tbl { } +.HP { margin-left: 3.8em; + text-indent: -3.8em; } + /* Semantic markup for command line utilities. */ table.Nm { } @@ -245,4 +248,6 @@ dl.Bl-hang > dd { dl.Bl-tag { margin-left: 2em; } dl.Bl-tag > dt { margin-left: -2em; } +.HP { margin-left: 2em; + text-indent: -2em; } } |