xref: /linux/Documentation/sphinx-static/custom.css (revision 99aa6117a34eef02c135a7199c709541d4445677)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * CSS tweaks for the Alabaster theme
4 */
5
6/* Shrink the headers a bit */
7div.body h1 { font-size: 180%; }
8div.body h2 { font-size: 150%; }
9div.body h3 { font-size: 130%; }
10div.body h4 { font-size: 110%; }
11
12/* toctree captions are styled like h2 */
13div.toctree-wrapper p.caption[role=heading] { font-size: 150%; }
14
15/* Tighten up the layout slightly */
16div.body { padding: 0 15px 0 10px; }
17div.sphinxsidebarwrapper { padding: 1em 0.4em; }
18div.sphinxsidebar { font-size: inherit;
19		    max-height: 100%;
20		    overflow-y: auto; }
21/* Tweak document margins and don't force width */
22div.document {
23    margin: 20px 10px 0 10px;
24    width: auto;
25}
26
27/* Size the logo appropriately */
28img.logo {
29    width: 104px;
30    margin-bottom: 20px;
31}
32
33/*
34 * Parameters for the display of function prototypes and such included
35 * from C source files.
36 */
37dl.function, dl.struct, dl.enum { margin-top: 2em; background-color: #ecf0f3; }
38/* indent lines 2+ of multi-line function prototypes */
39dl.function dt { margin-left: 10em; text-indent: -10em; }
40dt.sig-object { font-size: larger; }
41div.kernelindent { margin-left: 2em; margin-right: 4em; }
42
43/*
44 * Tweaks for our local TOC
45 */
46div.kerneltoc li.toctree-l1 { font-size: smaller;
47		text-indent: -1em;
48		margin-left: 1em; }
49div.kerneltoc li.current > a {font-weight: bold; }
50div.kerneltoc li.toctree-l2,li.toctree-l3 { font-size: small;
51		text-indent: -1em;
52		margin-left: 1em;
53		list-style-type: none;
54	      }
55div.kerneltoc li.current ul { margin-left: 0; }
56div.kerneltoc { background-color: #eeeeee; }
57div.kerneltoc li.current ul { background-color: white; }
58
59/*
60 * The CSS magic to toggle the contents on small screens.
61 */
62label.kernel-toc-title { display: none; }
63label.kernel-toc-title:after {
64    content: "[Hide]";
65}
66input[type=checkbox]:checked ~ label.kernel-toc-title:after {
67    content: "[Show]";
68}
69/* Hide the toggle on large screens */
70input.kernel-toc-toggle { display: none; }
71
72/*
73 * Show and implement the toggle on small screens.
74 * The 875px width seems to be wired into alabaster.
75 */
76@media screen and (max-width: 875px) {
77    label.kernel-toc-title { display: inline;
78			     font-weight: bold;
79			     font-size: larger; }
80    input[type=checkbox]:checked ~ div.kerneltoc {
81	display: none;
82    }
83    h3.kernel-toc-contents { display: inline; }
84    div.kerneltoc a { color: black; }
85}
86