gbranden pushed a commit to branch master
in repository groff.

commit 3c290039dcced859e5f703c3fca9f5ffbe1cbbb6
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Jul 13 11:36:55 2026 -0500

    [grohtml]: Fix Savannah #68309. (1/2)
    
    * src/devices/grohtml/post-html.cpp (html_printer::writeHeadMetaStyle):
      Define new class selector `.code-display`.  Use monospaced font family
      an inherit display properties from parent block.  Define new
      descendant selector thereof for `p` elements, eliminating vertical
      margins.  Initally this is for use by man(7)'s `EX`/`EE` macros, but
      might have applications in other packages.
    
    Begins fixing <https://savannah.gnu.org/bugs/?68309>.
---
 ChangeLog                         | 12 ++++++++++++
 src/devices/grohtml/post-html.cpp |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 4b6629c3e..499322a0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2026-07-13  G. Branden Robinson <[email protected]>
+
+       * src/devices/grohtml/post-html.cpp
+       (html_printer::writeHeadMetaStyle): Define new class selector
+       `.code-display`.  Use monospaced font family and inherit display
+       properties from parent block.  Define new descendant selector
+       thereof for `p` elements, eliminating vertical margins.
+       Initially this is for use by man(7)'s `EX`/`EE` macros, but
+       might have applications in other packages.
+
+       Begins fixing <https://savannah.gnu.org/bugs/?68309>.
+
 2026-07-13  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (token::next): Perform range check on
diff --git a/src/devices/grohtml/post-html.cpp 
b/src/devices/grohtml/post-html.cpp
index 6321e2462..5abc0ae22 100644
--- a/src/devices/grohtml/post-html.cpp
+++ b/src/devices/grohtml/post-html.cpp
@@ -5711,6 +5711,10 @@ void html_printer::writeHeadMetaStyle (void)
   fputs("       table   { margin-top: 0; margin-bottom: 0; "
        "vertical-align: top }\n", stdout);
   fputs("       h1      { text-align: center }\n", stdout);
+  fputs("         .code-display { display: block;"
+        " font-family: monospace; }\n", stdout);
+  fputs("         .code-display p { margin-top: 0; margin-bottom: 0;"
+        " }\n", stdout);
   fputs("</style>\n", stdout);
 }
 

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to