2
0

theme_overrides.css 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. /* -*- coding: utf-8; mode: css -*-
  2. *
  3. * Sphinx HTML theme customization: read the doc
  4. * Based on Linux Documentation/sphinx-static/theme_overrides.css
  5. */
  6. /* Improve contrast and increase size for easier reading. */
  7. body {
  8. font-family: serif;
  9. color: black;
  10. font-size: 100%;
  11. }
  12. h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend {
  13. font-family: sans-serif;
  14. }
  15. .rst-content dl:not(.docutils) dt {
  16. border-top: none;
  17. border-left: solid 5px #bcc6d2;
  18. background-color: #eaedf1;
  19. color: black;
  20. }
  21. .wy-nav-top {
  22. background: #802400;
  23. }
  24. .wy-side-nav-search input[type="text"] {
  25. border-color: #f60;
  26. }
  27. .wy-menu-vertical p.caption {
  28. color: white;
  29. }
  30. .wy-menu-vertical li.current a {
  31. color: #505050;
  32. }
  33. .wy-menu-vertical li.on a, .wy-menu-vertical li.current > a {
  34. color: #303030;
  35. }
  36. .fa-gitlab {
  37. box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19);
  38. border-radius: 5px;
  39. }
  40. div[class^="highlight"] pre {
  41. font-family: monospace;
  42. color: black;
  43. font-size: 100%;
  44. }
  45. .wy-menu-vertical {
  46. font-family: sans-serif;
  47. }
  48. .c {
  49. font-style: normal;
  50. }
  51. p {
  52. font-size: 100%;
  53. }
  54. /* Interim: Code-blocks with line nos - lines and line numbers don't line up.
  55. * see: https://github.com/rtfd/sphinx_rtd_theme/issues/419
  56. */
  57. div[class^="highlight"] pre {
  58. line-height: normal;
  59. }
  60. .rst-content .highlight > pre {
  61. line-height: normal;
  62. }
  63. /* Keep fields from being strangely far apart due to inheirited table CSS. */
  64. .rst-content table.field-list th.field-name {
  65. padding-top: 1px;
  66. padding-bottom: 1px;
  67. }
  68. .rst-content table.field-list td.field-body {
  69. padding-top: 1px;
  70. padding-bottom: 1px;
  71. }
  72. /* qmp-example directive styling */
  73. .rst-content .admonition-example {
  74. /* do not apply the standard admonition background */
  75. background-color: transparent;
  76. border: solid #ffd2ed 1px;
  77. }
  78. .rst-content .admonition-example > .admonition-title:before {
  79. content: "▷";
  80. }
  81. .rst-content .admonition-example > .admonition-title {
  82. background-color: #5980a6;
  83. }
  84. .rst-content .admonition-example > div[class^="highlight"] {
  85. /* make code boxes take up the full width of the admonition w/o margin */
  86. margin-left: -12px;
  87. margin-right: -12px;
  88. border-top: 1px solid #ffd2ed;
  89. border-bottom: 1px solid #ffd2ed;
  90. border-left: 0px;
  91. border-right: 0px;
  92. }
  93. .rst-content .admonition-example > div[class^="highlight"]:nth-child(2) {
  94. /* If a code box is the second element in an example admonition,
  95. * it is the first child after the title. let it sit flush against
  96. * the title. */
  97. margin-top: -12px;
  98. border-top: 0px;
  99. }
  100. .rst-content .admonition-example > div[class^="highlight"]:last-child {
  101. /* If a code box is the final element in an example admonition, don't
  102. * render margin below it; let it sit flush with the end of the
  103. * admonition box */
  104. margin-bottom: -12px;
  105. border-bottom: 0px;
  106. }
  107. .rst-content .admonition-example .highlight {
  108. background-color: #fffafd;
  109. }
  110. /* end qmp-example styling */
  111. @media screen {
  112. /* content column
  113. *
  114. * RTD theme's default is 800px as max width for the content, but we have
  115. * tables with tons of columns, which need the full width of the view-port.
  116. */
  117. .wy-nav-content{max-width: none; }
  118. /* table:
  119. *
  120. * - Sequences of whitespace should collapse into a single whitespace.
  121. * - make the overflow auto (scrollbar if needed)
  122. * - align caption "left" ("center" is unsuitable on vast tables)
  123. */
  124. .wy-table-responsive table td { white-space: normal; }
  125. .wy-table-responsive { overflow: auto; }
  126. .rst-content table.docutils caption { text-align: left; font-size: 100%; }
  127. /* captions:
  128. *
  129. * - captions should have 100% (not 85%) font size
  130. * - hide the permalink symbol as long as link is not hovered
  131. */
  132. .toc-title {
  133. font-size: 150%;
  134. font-weight: bold;
  135. }
  136. caption, .wy-table caption, .rst-content table.field-list caption {
  137. font-size: 100%;
  138. }
  139. caption a.headerlink { opacity: 0; }
  140. caption a.headerlink:hover { opacity: 1; }
  141. /* Menu selection and keystrokes */
  142. span.menuselection {
  143. color: blue;
  144. font-family: "Courier New", Courier, monospace
  145. }
  146. code.kbd, code.kbd span {
  147. color: white;
  148. background-color: darkblue;
  149. font-weight: bold;
  150. font-family: "Courier New", Courier, monospace
  151. }
  152. /* fix bottom margin of lists items */
  153. .rst-content .section ul li:last-child, .rst-content .section ul li p:last-child {
  154. margin-bottom: 12px;
  155. }
  156. /* inline literal: drop the borderbox, padding and red color */
  157. code, .rst-content tt, .rst-content code {
  158. color: inherit;
  159. border: none;
  160. padding: unset;
  161. background: inherit;
  162. font-size: 85%;
  163. }
  164. .rst-content tt.literal,.rst-content tt.literal,.rst-content code.literal {
  165. color: inherit;
  166. }
  167. }
  168. /* QAPI domain theming */
  169. /* most content in a QAPI object definition should not eclipse about
  170. 80ch, but nested field lists are explicitly exempt due to their
  171. two-column nature */
  172. .qapi dd *:not(dl) {
  173. max-width: 80ch;
  174. }
  175. /* but the content column itself should still be less than ~80ch. */
  176. .qapi .field-list dd {
  177. max-width: 80ch;
  178. }
  179. .qapi-infopips {
  180. margin-bottom: 1em;
  181. }
  182. .qapi-infopip {
  183. display: inline-block;
  184. padding: 0em 0.5em 0em 0.5em;
  185. margin: 0.25em;
  186. }
  187. .qapi-deprecated,.qapi-unstable {
  188. background-color: #fffef5;
  189. border: solid #fff176 6px;
  190. font-weight: bold;
  191. padding: 8px;
  192. border-radius: 15px;
  193. margin: 5px;
  194. }
  195. .qapi-unstable::before {
  196. content: '🚧 ';
  197. }
  198. .qapi-deprecated::before {
  199. content: '⚠️ ';
  200. }
  201. .qapi-ifcond::before {
  202. /* gaze ye into the crystal ball to determine feature availability */
  203. content: '🔮 ';
  204. }
  205. .qapi-ifcond {
  206. background-color: #f9f5ff;
  207. border: solid #dac2ff 6px;
  208. padding: 8px;
  209. border-radius: 15px;
  210. margin: 5px;
  211. }
  212. /* code blocks */
  213. .qapi div[class^="highlight"] {
  214. width: fit-content;
  215. background-color: #fffafd;
  216. border: 2px solid #ffe1f3;
  217. }
  218. /* note, warning, etc. */
  219. .qapi .admonition {
  220. width: fit-content;
  221. }
  222. /* pad the top of the field-list so the text doesn't start directly at
  223. the top border; primarily for the field list labels, but adjust the
  224. field bodies as well for parity. */
  225. dl.field-list > dt:first-of-type, dl.field-list > dd:first-of-type {
  226. padding-top: 0.3em;
  227. }
  228. dl.field-list > dt:last-of-type, dl.field-list > dd:last-of-type {
  229. padding-bottom: 0.3em;
  230. }
  231. /* pad the field list labels so they don't crash into the border */
  232. dl.field-list > dt {
  233. padding-left: 0.5em;
  234. padding-right: 0.5em;
  235. }
  236. /* Add a little padding between field list sections */
  237. dl.field-list > dd:not(:last-child) {
  238. padding-bottom: 1em;
  239. }
  240. /* Sphinx 3.x: unresolved xrefs */
  241. .rst-content *:not(a) > code.xref {
  242. font-weight: 400;
  243. color: #333333;
  244. }