summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-06-25 13:01:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-06-25 13:01:19 +0000
commit07fb51c1fa33fa0b6a742cbb9e5489b2d60ddd32 (patch)
tree68ee4922ed0427103f187b7b1fae9c6e5389c50c
parent9165a1c2bfd8bcf4cd141879d15c8e111d200e88 (diff)
downloadmandoc-07fb51c1fa33fa0b6a742cbb9e5489b2d60ddd32.tar.gz
For -man -Thtml, ignore author-specified .HP widths because they
harm responsive design; use @media-dependent defaults instead.
-rw-r--r--man_html.c19
-rw-r--r--mandoc.css5
2 files changed, 9 insertions, 15 deletions
diff --git a/man_html.c b/man_html.c
index fc4bc692..c4253b5f 100644
--- a/man_html.c
+++ b/man_html.c
@@ -557,24 +557,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/mandoc.css b/mandoc.css
index 34fcc899..a46aac12 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -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; }
}