Debian Codegraph @

Documentation/sphinx-static/custom.css

raw
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * CSS tweaks for the Alabaster theme
4 */
5
6 /* Shrink the headers a bit */
7 div.body h1 { font-size: 180%; }
8 div.body h2 { font-size: 150%; }
9 div.body h3 { font-size: 130%; }
10 div.body h4 { font-size: 110%; }
11
12 /* toctree captions are styled like h2 */
13 div.toctree-wrapper p.caption[role=heading] { font-size: 150%; }
14
15 /* Tighten up the layout slightly */
16 div.body { padding: 0 15px 0 10px; }
17 div.sphinxsidebarwrapper { padding: 1em 0.4em; }
18 div.sphinxsidebar { font-size: inherit;
19 max-height: 100%;
20 overflow-y: auto; }
21 /* Tweak document margins and don't force width */
22 div.document {
23 margin: 20px 10px 0 10px;
24 width: auto;
25 }
26
27 /* Size the logo appropriately */
28 img.logo {
29 width: 104px;
30 margin-bottom: 20px;
31 }
32
33 /* The default is to use -1em, wich makes it override text */
34 li { text-indent: 0em; }
35
36 /*
37 * Parameters for the display of function prototypes and such included
38 * from C source files.
39 */
40 dl.function, dl.struct, dl.enum { margin-top: 2em; background-color: #ecf0f3; }
41 /* indent lines 2+ of multi-line function prototypes */
42 dl.function dt { margin-left: 10em; text-indent: -10em; }
43 dt.sig-object { font-size: larger; }
44 div.kernelindent { margin-left: 2em; margin-right: 4em; }
45
46 /*
47 * Parameters for the display of function prototypes and such included
48 * from Python source files.
49 */
50 dl.py { margin-top: 2em; background-color: #ecf0f3; }
51 dl.py.class { margin-left: 2em; text-indent: -2em; padding-left: 2em; }
52 dl.py.method, dl.py.attribute { margin-left: 2em; text-indent: -2em; }
53 dl.py li, pre { text-indent: 0em; padding-left: 0 !important; }
54
55 /*
56 * Tweaks for our local TOC
57 */
58 div.kerneltoc li.toctree-l1 { font-size: smaller;
59 text-indent: -1em;
60 margin-left: 1em; }
61 div.kerneltoc li.current > a {font-weight: bold; }
62 div.kerneltoc li.toctree-l2,li.toctree-l3 { font-size: small;
63 text-indent: -1em;
64 margin-left: 1em;
65 list-style-type: none;
66 }
67 div.kerneltoc li.current ul { margin-left: 0; }
68 div.kerneltoc { background-color: #eeeeee; }
69 div.kerneltoc li.current ul { background-color: white; }
70
71 /*
72 * The CSS magic to toggle the contents on small screens.
73 */
74 label.kernel-toc-title { display: none; }
75 label.kernel-toc-title:after {
76 content: "[Hide]";
77 }
78 input[type=checkbox]:checked ~ label.kernel-toc-title:after {
79 content: "[Show]";
80 }
81 /* Hide the toggle on large screens */
82 input.kernel-toc-toggle { display: none; }
83
84 /*
85 * Show and implement the toggle on small screens.
86 * The 875px width seems to be wired into alabaster.
87 */
88 @media screen and (max-width: 875px) {
89 label.kernel-toc-title { display: inline;
90 font-weight: bold;
91 font-size: larger; }
92 input[type=checkbox]:checked ~ div.kerneltoc {
93 display: none;
94 }
95 h3.kernel-toc-contents { display: inline; }
96 div.kerneltoc a { color: black; }
97 }
98
99 /* Language selection menu */
100
101 div.admonition {
102 /*
103 * Make sure we don't overlap notes and warnings at the top of the
104 * document.
105 */
106 clear: both;
107 }
108
109 div.language-selection {
110 background: #eeeeee;
111 border: 1px solid #cccccc;
112 margin-bottom: 1em;
113 padding: .5em;
114
115 position: relative;
116 float: right;
117 }
118
119 div.language-selection a {
120 display: block;
121 padding: 0.5em;
122 color: #333333;
123 text-decoration: none;
124 }
125
126 div.language-selection ul {
127 display: none;
128 position: absolute;
129
130 /* Align with the parent div */
131 top: 100%;
132 right: 0;
133 margin: 0;
134
135 list-style: none;
136
137 background: #fafafa;
138 border: 1px solid #cccccc;
139
140 /* Never break menu item lines */
141 white-space: nowrap;
142 }
143
144 div.language-selection:hover ul {
145 display: block;
146 }
147
148 div.language-selection ul li:hover {
149 background: #dddddd;
150 }
151
152 /* Make xrefs more universally visible */
153 a.reference, a.reference:hover {
154 border-bottom: none;
155 text-decoration: underline;
156 text-underline-offset: 0.3em;
157 }
158
159 /* Slightly different style for sidebar links */
160 div.sphinxsidebar a { border-bottom: none; }
161 div.sphinxsidebar a:hover {
162 border-bottom: none;
163 text-decoration: underline;
164 text-underline-offset: 0.3em;
165 }
166
167 a.manpage {
168 font-style: normal;
169 font-weight: bold;
170 font-family: "Courier New", Courier, monospace;
171 }