xref: /linux/Documentation/sphinx-static/custom.css (revision fd7d598270724cc787982ea48bbe17ad383a8b7f)
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%; }
10
11/* Tighten up the layout slightly */
12div.body { padding: 0 15px 0 10px; }
13div.sphinxsidebarwrapper { padding: 1em 0.4em; }
14div.sphinxsidebar { font-size: inherit;
15		    max-height: 100%;
16		    overflow-y: auto; }
17/* Tweak document margins and don't force width */
18div.document {
19    margin: 20px 10px 0 10px;
20    width: auto;
21}
22
23/*
24 * Parameters for the display of function prototypes and such included
25 * from C source files.
26 */
27dl.function, dl.struct, dl.enum { margin-top: 2em; background-color: #ecf0f3; }
28/* indent lines 2+ of multi-line function prototypes */
29dl.function dt { margin-left: 10em; text-indent: -10em; }
30dt.sig-object { font-size: larger; }
31div.kernelindent { margin-left: 2em; margin-right: 4em; }
32
33/*
34 * Tweaks for our local TOC
35 */
36div.kerneltoc li.toctree-l1 { font-size: smaller;
37		text-indent: -1em;
38		margin-left: 1em; }
39div.kerneltoc li.current > a {font-weight: bold; }
40div.kerneltoc li.toctree-l2,li.toctree-l3 { font-size: small;
41		text-indent: -1em;
42		margin-left: 1em;
43		list-style-type: none;
44	      }
45div.kerneltoc li.current ul { margin-left: 0; }
46div.kerneltoc { background-color: #eeeeee; }
47div.kerneltoc li.current ul { background-color: white; }
48
49/*
50 * The CSS magic to toggle the contents on small screens.
51 */
52label.kernel-toc-title { display: none; }
53label.kernel-toc-title:after {
54    content: "[Hide]";
55}
56input[type=checkbox]:checked ~ label.kernel-toc-title:after {
57    content: "[Show]";
58}
59/* Hide the toggle on large screens */
60input.kernel-toc-toggle { display: none; }
61
62/*
63 * Show and implement the toggle on small screens.
64 * The 875px width seems to be wired into alabaster.
65 */
66@media screen and (max-width: 875px) {
67    label.kernel-toc-title { display: inline;
68			     font-weight: bold;
69			     font-size: larger; }
70    input[type=checkbox]:checked ~ div.kerneltoc {
71	display: none;
72    }
73    h3.kernel-toc-contents { display: inline; }
74    div.kerneltoc a { color: black; }
75}
76