custom.css 4.1 KB

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