Skip to content

Commit bb7f057

Browse files
committed
doc: css: Add style for C code, files and man pages
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> Link: https://lore.kernel.org/ltp/20260114122611.372930-1-pvorel@suse.cz/ Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com> Signed-off-by: Petr Vorel <pvorel@suse.cz>
1 parent 4d256a3 commit bb7f057

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

doc/_static/custom.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@
88
.rst-content table td ul {
99
margin-bottom: 0;
1010
}
11+
12+
/* monospace and disable italic for C code, files and man pages */
13+
a.extlink-master, a.extlink-kernel_tree, a.extlink-kselftest, a.extlink-shell_lib, a.manpage, .std.std-ref {
14+
font-style: normal;
15+
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace;
16+
}

0 commit comments

Comments
 (0)