theme_extra.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*
  2. * Wrap inline code samples otherwise they shoot of the side and
  3. * can't be read at all.
  4. *
  5. * https://github.com/mkdocs/mkdocs/issues/313
  6. * https://github.com/mkdocs/mkdocs/issues/233
  7. * https://github.com/mkdocs/mkdocs/issues/834
  8. */
  9. .rst-content code {
  10. white-space: pre-wrap;
  11. word-wrap: break-word;
  12. padding: 2px 5px;
  13. }
  14. /**
  15. * Make code blocks display as blocks and give them the appropriate
  16. * font size and padding.
  17. *
  18. * https://github.com/mkdocs/mkdocs/issues/855
  19. * https://github.com/mkdocs/mkdocs/issues/834
  20. * https://github.com/mkdocs/mkdocs/issues/233
  21. */
  22. .rst-content pre code {
  23. white-space: pre;
  24. word-wrap: normal;
  25. display: block;
  26. padding: 12px;
  27. font-size: 12px;
  28. }
  29. /**
  30. * Fix code colors
  31. *
  32. * https://github.com/mkdocs/mkdocs/issues/2027
  33. */
  34. .rst-content code {
  35. color: #E74C3C;
  36. }
  37. .rst-content pre code {
  38. color: #000;
  39. background: #f8f8f8;
  40. }
  41. /*
  42. * Fix link colors when the link text is inline code.
  43. *
  44. * https://github.com/mkdocs/mkdocs/issues/718
  45. */
  46. a code {
  47. color: #2980B9;
  48. }
  49. a:hover code {
  50. color: #3091d1;
  51. }
  52. a:visited code {
  53. color: #9B59B6;
  54. }
  55. /*
  56. * The CSS classes from highlight.js seem to clash with the
  57. * ReadTheDocs theme causing some code to be incorrectly made
  58. * bold and italic.
  59. *
  60. * https://github.com/mkdocs/mkdocs/issues/411
  61. */
  62. pre .cs, pre .c {
  63. font-weight: inherit;
  64. font-style: inherit;
  65. }
  66. /*
  67. * Fix some issues with the theme and non-highlighted code
  68. * samples. Without and highlighting styles attached the
  69. * formatting is broken.
  70. *
  71. * https://github.com/mkdocs/mkdocs/issues/319
  72. */
  73. .rst-content .no-highlight {
  74. display: block;
  75. padding: 0.5em;
  76. color: #333;
  77. }
  78. /*
  79. * Additions specific to the search functionality provided by MkDocs
  80. */
  81. .search-results {
  82. margin-top: 23px;
  83. }
  84. .search-results article {
  85. border-top: 1px solid #E1E4E5;
  86. padding-top: 24px;
  87. }
  88. .search-results article:first-child {
  89. border-top: none;
  90. }
  91. form .search-query {
  92. width: 100%;
  93. border-radius: 50px;
  94. padding: 6px 12px; /* csslint allow: box-model */
  95. border-color: #D1D4D5;
  96. }
  97. /*
  98. * Improve inline code blocks within admonitions.
  99. *
  100. * https://github.com/mkdocs/mkdocs/issues/656
  101. */
  102. .rst-content .admonition code {
  103. color: #404040;
  104. border: 1px solid #c7c9cb;
  105. border: 1px solid rgba(0, 0, 0, 0.2);
  106. background: #f8fbfd;
  107. background: rgba(255, 255, 255, 0.7);
  108. }
  109. /*
  110. * Account for wide tables which go off the side.
  111. * Override borders to avoid weirdness on narrow tables.
  112. *
  113. * https://github.com/mkdocs/mkdocs/issues/834
  114. * https://github.com/mkdocs/mkdocs/pull/1034
  115. */
  116. .rst-content .section .docutils {
  117. width: 100%;
  118. overflow: auto;
  119. display: block;
  120. border: none;
  121. }
  122. /*
  123. * Without the following amendments, the navigation in the theme will be
  124. * slightly cut off. This is due to the fact that the .wy-nav-side has a
  125. * padding-bottom of 2em, which must not necessarily align with the font-size of
  126. * 90 % on the .rst-current-version container, combined with the padding of 12px
  127. * above and below. These amendments fix this in two steps: First, make sure the
  128. * .rst-current-version container has a fixed height of 40px, achieved using
  129. * line-height, and then applying a padding-bottom of 40px to this container. In
  130. * a second step, the items within that container are re-aligned using flexbox.
  131. *
  132. * https://github.com/mkdocs/mkdocs/issues/2012
  133. */
  134. .wy-nav-side {
  135. padding-bottom: 40px;
  136. }
  137. /*
  138. * The second step of above amendment: Here we make sure the items are aligned
  139. * correctly within the .rst-current-version container. Using flexbox, we
  140. * achieve it in such a way that it will look like the following:
  141. *
  142. * [No repo_name]
  143. * Next >> // On the first page
  144. * << Previous Next >> // On all subsequent pages
  145. *
  146. * [With repo_name]
  147. * <repo_name> Next >> // On the first page
  148. * <repo_name> << Previous Next >> // On all subsequent pages
  149. *
  150. * https://github.com/mkdocs/mkdocs/issues/2012
  151. */
  152. .rst-versions .rst-current-version {
  153. padding: 0 12px;
  154. display: flex;
  155. font-size: initial;
  156. justify-content: space-between;
  157. align-items: center;
  158. line-height: 40px;
  159. }
  160. /*
  161. * Please note that this amendment also involves removing certain inline-styles
  162. * from the file ./mkdocs/themes/readthedocs/versions.html.
  163. *
  164. * https://github.com/mkdocs/mkdocs/issues/2012
  165. */
  166. .rst-current-version span {
  167. flex: 1;
  168. text-align: center;
  169. }