custom.css 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. /*
  29. * Parameters for the display of function prototypes and such included
  30. * from C source files.
  31. */
  32. dl.function, dl.struct, dl.enum { margin-top: 2em; background-color: #ecf0f3; }
  33. /* indent lines 2+ of multi-line function prototypes */
  34. dl.function dt { margin-left: 10em; text-indent: -10em; }
  35. dt.sig-object { font-size: larger; }
  36. div.kernelindent { margin-left: 2em; margin-right: 4em; }
  37. /*
  38. * Tweaks for our local TOC
  39. */
  40. div.kerneltoc li.toctree-l1 { font-size: smaller;
  41. text-indent: -1em;
  42. margin-left: 1em; }
  43. div.kerneltoc li.current > a {font-weight: bold; }
  44. div.kerneltoc li.toctree-l2,li.toctree-l3 { font-size: small;
  45. text-indent: -1em;
  46. margin-left: 1em;
  47. list-style-type: none;
  48. }
  49. div.kerneltoc li.current ul { margin-left: 0; }
  50. div.kerneltoc { background-color: #eeeeee; }
  51. div.kerneltoc li.current ul { background-color: white; }
  52. /*
  53. * The CSS magic to toggle the contents on small screens.
  54. */
  55. label.kernel-toc-title { display: none; }
  56. label.kernel-toc-title:after {
  57. content: "[Hide]";
  58. }
  59. input[type=checkbox]:checked ~ label.kernel-toc-title:after {
  60. content: "[Show]";
  61. }
  62. /* Hide the toggle on large screens */
  63. input.kernel-toc-toggle { display: none; }
  64. /*
  65. * Show and implement the toggle on small screens.
  66. * The 875px width seems to be wired into alabaster.
  67. */
  68. @media screen and (max-width: 875px) {
  69. label.kernel-toc-title { display: inline;
  70. font-weight: bold;
  71. font-size: larger; }
  72. input[type=checkbox]:checked ~ div.kerneltoc {
  73. display: none;
  74. }
  75. h3.kernel-toc-contents { display: inline; }
  76. div.kerneltoc a { color: black; }
  77. }
  78. /* Language selection menu */
  79. div.admonition {
  80. /*
  81. * Make sure we don't overlap notes and warnings at the top of the
  82. * document.
  83. */
  84. clear: both;
  85. }
  86. div.language-selection {
  87. background: #eeeeee;
  88. border: 1px solid #cccccc;
  89. margin-bottom: 1em;
  90. padding: .5em;
  91. position: relative;
  92. float: right;
  93. }
  94. div.language-selection a {
  95. display: block;
  96. padding: 0.5em;
  97. color: #333333;
  98. text-decoration: none;
  99. }
  100. div.language-selection ul {
  101. display: none;
  102. position: absolute;
  103. /* Align with the parent div */
  104. top: 100%;
  105. right: 0;
  106. margin: 0;
  107. list-style: none;
  108. background: #fafafa;
  109. border: 1px solid #cccccc;
  110. /* Never break menu item lines */
  111. white-space: nowrap;
  112. }
  113. div.language-selection:hover ul {
  114. display: block;
  115. }
  116. div.language-selection ul li:hover {
  117. background: #dddddd;
  118. }