12056b920SJonathan Corbet/* SPDX-License-Identifier: GPL-2.0 */ 22056b920SJonathan Corbet/* 32056b920SJonathan Corbet * CSS tweaks for the Alabaster theme 42056b920SJonathan Corbet */ 52056b920SJonathan Corbet 62056b920SJonathan Corbet/* Shrink the headers a bit */ 72056b920SJonathan Corbetdiv.body h1 { font-size: 180%; } 82056b920SJonathan Corbetdiv.body h2 { font-size: 150%; } 92056b920SJonathan Corbetdiv.body h3 { font-size: 130%; } 1099aa6117SDonald Hunterdiv.body h4 { font-size: 110%; } 112056b920SJonathan Corbet 12eed94315SVegard Nossum/* toctree captions are styled like h2 */ 13eed94315SVegard Nossumdiv.toctree-wrapper p.caption[role=heading] { font-size: 150%; } 14eed94315SVegard Nossum 152056b920SJonathan Corbet/* Tighten up the layout slightly */ 162056b920SJonathan Corbetdiv.body { padding: 0 15px 0 10px; } 172056b920SJonathan Corbetdiv.sphinxsidebarwrapper { padding: 1em 0.4em; } 18c404f5d4SJonathan Corbetdiv.sphinxsidebar { font-size: inherit; 19c404f5d4SJonathan Corbet max-height: 100%; 20c404f5d4SJonathan Corbet overflow-y: auto; } 21eaf710ceSJonathan Corbet/* Tweak document margins and don't force width */ 22eaf710ceSJonathan Corbetdiv.document { 23eaf710ceSJonathan Corbet margin: 20px 10px 0 10px; 24eaf710ceSJonathan Corbet width: auto; 25eaf710ceSJonathan Corbet} 26eaf710ceSJonathan Corbet 27d49af114SVegard Nossum/* Size the logo appropriately */ 28d49af114SVegard Nossumimg.logo { 29d49af114SVegard Nossum width: 104px; 30d49af114SVegard Nossum margin-bottom: 20px; 31d49af114SVegard Nossum} 32d49af114SVegard Nossum 33eaf710ceSJonathan Corbet/* 34eaf710ceSJonathan Corbet * Parameters for the display of function prototypes and such included 35eaf710ceSJonathan Corbet * from C source files. 36eaf710ceSJonathan Corbet */ 37eaf710ceSJonathan Corbetdl.function, dl.struct, dl.enum { margin-top: 2em; background-color: #ecf0f3; } 38eaf710ceSJonathan Corbet/* indent lines 2+ of multi-line function prototypes */ 39eaf710ceSJonathan Corbetdl.function dt { margin-left: 10em; text-indent: -10em; } 40eaf710ceSJonathan Corbetdt.sig-object { font-size: larger; } 41eaf710ceSJonathan Corbetdiv.kernelindent { margin-left: 2em; margin-right: 4em; } 42c404f5d4SJonathan Corbet 43c404f5d4SJonathan Corbet/* 44c404f5d4SJonathan Corbet * Tweaks for our local TOC 45c404f5d4SJonathan Corbet */ 46c404f5d4SJonathan Corbetdiv.kerneltoc li.toctree-l1 { font-size: smaller; 47c404f5d4SJonathan Corbet text-indent: -1em; 48c404f5d4SJonathan Corbet margin-left: 1em; } 49c404f5d4SJonathan Corbetdiv.kerneltoc li.current > a {font-weight: bold; } 50c404f5d4SJonathan Corbetdiv.kerneltoc li.toctree-l2,li.toctree-l3 { font-size: small; 51c404f5d4SJonathan Corbet text-indent: -1em; 52c404f5d4SJonathan Corbet margin-left: 1em; 53c404f5d4SJonathan Corbet list-style-type: none; 54c404f5d4SJonathan Corbet } 55c404f5d4SJonathan Corbetdiv.kerneltoc li.current ul { margin-left: 0; } 56c404f5d4SJonathan Corbetdiv.kerneltoc { background-color: #eeeeee; } 57c404f5d4SJonathan Corbetdiv.kerneltoc li.current ul { background-color: white; } 58c404f5d4SJonathan Corbet 59c404f5d4SJonathan Corbet/* 60c404f5d4SJonathan Corbet * The CSS magic to toggle the contents on small screens. 61c404f5d4SJonathan Corbet */ 62c404f5d4SJonathan Corbetlabel.kernel-toc-title { display: none; } 63c404f5d4SJonathan Corbetlabel.kernel-toc-title:after { 64c404f5d4SJonathan Corbet content: "[Hide]"; 65c404f5d4SJonathan Corbet} 66c404f5d4SJonathan Corbetinput[type=checkbox]:checked ~ label.kernel-toc-title:after { 67c404f5d4SJonathan Corbet content: "[Show]"; 68c404f5d4SJonathan Corbet} 69c404f5d4SJonathan Corbet/* Hide the toggle on large screens */ 70c404f5d4SJonathan Corbetinput.kernel-toc-toggle { display: none; } 71c404f5d4SJonathan Corbet 72c404f5d4SJonathan Corbet/* 73c404f5d4SJonathan Corbet * Show and implement the toggle on small screens. 74c404f5d4SJonathan Corbet * The 875px width seems to be wired into alabaster. 75c404f5d4SJonathan Corbet */ 76c404f5d4SJonathan Corbet@media screen and (max-width: 875px) { 77c404f5d4SJonathan Corbet label.kernel-toc-title { display: inline; 78c404f5d4SJonathan Corbet font-weight: bold; 79c404f5d4SJonathan Corbet font-size: larger; } 80c404f5d4SJonathan Corbet input[type=checkbox]:checked ~ div.kerneltoc { 81c404f5d4SJonathan Corbet display: none; 82c404f5d4SJonathan Corbet } 83c404f5d4SJonathan Corbet h3.kernel-toc-contents { display: inline; } 84c404f5d4SJonathan Corbet div.kerneltoc a { color: black; } 85c404f5d4SJonathan Corbet} 86*7418ec5bSVegard Nossum 87*7418ec5bSVegard Nossum/* Language selection menu */ 88*7418ec5bSVegard Nossum 89*7418ec5bSVegard Nossumdiv.admonition { 90*7418ec5bSVegard Nossum /* 91*7418ec5bSVegard Nossum * Make sure we don't overlap notes and warnings at the top of the 92*7418ec5bSVegard Nossum * document. 93*7418ec5bSVegard Nossum */ 94*7418ec5bSVegard Nossum clear: both; 95*7418ec5bSVegard Nossum} 96*7418ec5bSVegard Nossum 97*7418ec5bSVegard Nossumdiv.language-selection { 98*7418ec5bSVegard Nossum background: #eeeeee; 99*7418ec5bSVegard Nossum border: 1px solid #cccccc; 100*7418ec5bSVegard Nossum margin-bottom: 1em; 101*7418ec5bSVegard Nossum padding: .5em; 102*7418ec5bSVegard Nossum 103*7418ec5bSVegard Nossum position: relative; 104*7418ec5bSVegard Nossum float: right; 105*7418ec5bSVegard Nossum} 106*7418ec5bSVegard Nossum 107*7418ec5bSVegard Nossumdiv.language-selection a { 108*7418ec5bSVegard Nossum display: block; 109*7418ec5bSVegard Nossum padding: 0.5em; 110*7418ec5bSVegard Nossum color: #333333; 111*7418ec5bSVegard Nossum text-decoration: none; 112*7418ec5bSVegard Nossum} 113*7418ec5bSVegard Nossum 114*7418ec5bSVegard Nossumdiv.language-selection ul { 115*7418ec5bSVegard Nossum display: none; 116*7418ec5bSVegard Nossum position: absolute; 117*7418ec5bSVegard Nossum 118*7418ec5bSVegard Nossum /* Align with the parent div */ 119*7418ec5bSVegard Nossum top: 100%; 120*7418ec5bSVegard Nossum right: 0; 121*7418ec5bSVegard Nossum margin: 0; 122*7418ec5bSVegard Nossum 123*7418ec5bSVegard Nossum list-style: none; 124*7418ec5bSVegard Nossum 125*7418ec5bSVegard Nossum background: #fafafa; 126*7418ec5bSVegard Nossum border: 1px solid #cccccc; 127*7418ec5bSVegard Nossum 128*7418ec5bSVegard Nossum /* Never break menu item lines */ 129*7418ec5bSVegard Nossum white-space: nowrap; 130*7418ec5bSVegard Nossum} 131*7418ec5bSVegard Nossum 132*7418ec5bSVegard Nossumdiv.language-selection:hover ul { 133*7418ec5bSVegard Nossum display: block; 134*7418ec5bSVegard Nossum} 135*7418ec5bSVegard Nossum 136*7418ec5bSVegard Nossumdiv.language-selection ul li:hover { 137*7418ec5bSVegard Nossum background: #dddddd; 138*7418ec5bSVegard Nossum} 139