From: Mauro Carvalho Chehab Date: Mon, 19 Jan 2026 16:23:08 +0000 (+0100) Subject: docs: custom.css: add CSS for python X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b8fae7a169afe26916eb3813b415ff28175a534;p=thirdparty%2Fkernel%2Flinux.git docs: custom.css: add CSS for python As we'll start adding python to documentation, add some CSS templates to better display python code. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: --- diff --git a/Documentation/sphinx-static/custom.css b/Documentation/sphinx-static/custom.css index 6757b5a59f239..db24f4344e6cf 100644 --- a/Documentation/sphinx-static/custom.css +++ b/Documentation/sphinx-static/custom.css @@ -43,6 +43,15 @@ dl.function dt { margin-left: 10em; text-indent: -10em; } dt.sig-object { font-size: larger; } div.kernelindent { margin-left: 2em; margin-right: 4em; } +/* + * Parameters for the display of function prototypes and such included + * from Python source files. + */ +dl.py { margin-top: 2em; background-color: #ecf0f3; } +dl.py.class { margin-left: 2em; text-indent: -2em; padding-left: 2em; } +dl.py.method, dl.py.attribute { margin-left: 2em; text-indent: -2em; } +dl.py li, pre { text-indent: 0em; padding-left: 0 !important; } + /* * Tweaks for our local TOC */