public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] doc: css: Add style for C code, files and man pages
@ 2026-01-14 12:26 Petr Vorel
  2026-01-14 12:45 ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2026-01-14 12:26 UTC (permalink / raw)
  To: ltp

Use monospace and disable italic for various C code, files and man
pages. For is used as the default for sphinx
(sphinx/themes/basic/static/basic.css.jinja).

Examples of code where it is used:

    <a class="reference internal"
    href="api_c_tests.html#struct-tst-test"><span class="std std-ref">struct
    tst_test</span></a>p

    <a class="extlink-master reference external"
    href="https://github.com/linux-test-project/ltp/blob/master/include/tst_test.h">include/tst_test.h</a>

    <a class="extlink-kernel_tree reference external"
    href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/stat.h">include/uapi/linux/stat.h</a>

    <a class="manpage reference external"
    href="https://man7.org/linux/man-pages/man2/setrlimit.2.html">setrlimit(2)</a>

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 doc/_static/custom.css | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/_static/custom.css b/doc/_static/custom.css
index e918b0e609..5017fda2e1 100644
--- a/doc/_static/custom.css
+++ b/doc/_static/custom.css
@@ -8,3 +8,9 @@
 .rst-content table td ul {
     margin-bottom: 0;
 }
+
+/* monospace and disable italic for C code, files and man pages */
+a.extlink-master, a.extlink-kernel_tree, a.extlink-kselftest, a.extlink-shell_lib, a.manpage, .std.std-ref {
+    font-style: normal;
+    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace;
+}
-- 
2.51.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-15 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14 12:26 [LTP] [PATCH 1/1] doc: css: Add style for C code, files and man pages Petr Vorel
2026-01-14 12:45 ` Andrea Cervesato via ltp
2026-01-15 16:29   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox