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