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