docbook-screen.css 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. /* @@TITLE@@ version @@VERSION@@
  2. *
  3. * This is docbook-screen.css.
  4. *
  5. * See https://xsltng.docbook.org/
  6. *
  7. */
  8. @media screen {
  9. @import url("https://fonts.googleapis.com/css?family=B612+Mono&display=swap");
  10. @import url("https://fonts.googleapis.com/css?family=Noto+Sans&display=swap");
  11. @import url("https://fonts.googleapis.com/css?family=Noto+Serif&display=swap");
  12. }
  13. :root {
  14. background-color: #fffff8;
  15. }
  16. html {
  17. height: 100%;
  18. width: 100%;
  19. line-height: 1.75rem;
  20. font-size: 13.5pt;
  21. scroll-padding-top: 40px;
  22. }
  23. /* https://www.smashingmagazine.com/2020/07/css-techniques-legibility/ */
  24. @supports (font-size-adjust: 1;) {
  25. html {
  26. font-size-adjust: 0.5;
  27. }
  28. }
  29. body {
  30. min-height: 100%;
  31. padding-left: 0;
  32. padding-right: 0;
  33. margin-left: 0;
  34. margin-right: 0;
  35. display: grid;
  36. grid-template-rows: 1fr auto;
  37. grid-template-columns: 100%;
  38. }
  39. main,
  40. footer {
  41. width: 100%;
  42. max-width: 50rem;
  43. margin-left: auto;
  44. margin-right: auto;
  45. padding-left: 1rem;
  46. padding-right: 1rem;
  47. }
  48. main {
  49. padding-top: 3rem;
  50. }
  51. .book + .book {
  52. border-top: 4px solid #abcdef;
  53. margin-top: 6em;
  54. padding-top: 6em;
  55. }
  56. .refentry + .refentry {
  57. border-top: 4px solid #abcdef;
  58. margin-top: 6em;
  59. padding-top: 6em;
  60. }
  61. .book > .dedication > header,
  62. .article > .dedication > header,
  63. .book .chapter > header,
  64. .book .preface > header,
  65. .book .appendix > header,
  66. .book .part > header {
  67. margin-top: 4rem;
  68. padding-top: 2rem;
  69. border-top: 0.25rem solid var(--border-grey);
  70. }
  71. .dedication + .dedication > header {
  72. border-top: inherit;
  73. }
  74. .colophon {
  75. margin-top: 6rem;
  76. margin-bottom: 6rem;
  77. margin-left: 6rem;
  78. margin-right: 6rem;
  79. border: 1px solid var(--border-grey);
  80. border-radius: 1em;
  81. padding-left: 2em;
  82. padding-right: 2em;
  83. padding-bottom: 2em;
  84. }
  85. .set header h1,
  86. .book header h1 {
  87. text-align: center;
  88. }
  89. .footnotes {
  90. margin-top: 2em;
  91. }
  92. .footnotes div.footnote-number {
  93. display: inline-block;
  94. width: 0.75rem;
  95. height: 0;
  96. margin-left: -0.75rem;
  97. margin-top: 0.5rem;
  98. vertical-align: top;
  99. }
  100. .footnotes div.footnote-body {
  101. display: inline-block;
  102. }
  103. .footnotes .footnote {
  104. margin-left: 0.75rem;
  105. }
  106. .footnote p {
  107. margin-bottom: 0;
  108. }
  109. .footnotes hr {
  110. max-width: 1in;
  111. margin: 0;
  112. }
  113. .calloutlist dl {
  114. display: grid;
  115. grid-template-columns: max-content auto;
  116. }
  117. .calloutlist dl dt {
  118. float: none;
  119. width: inherit;
  120. grid-column-start: 1;
  121. }
  122. .calloutlist dl dd {
  123. margin-left: 1em;
  124. grid-column-start: 2;
  125. }
  126. /* ============================================================ */
  127. nav table td.previous {
  128. text-align: left;
  129. }
  130. nav table td.up {
  131. text-align: center;
  132. }
  133. nav table td.next {
  134. text-align: right;
  135. }
  136. nav.bottom {
  137. background-color: var(--nav-background-color);
  138. }
  139. nav.bottom table {
  140. border-top: 2px solid var(--border-grey);
  141. margin-bottom: 1rem;
  142. }
  143. nav.bottom table .previous {
  144. padding-left: 4rem;
  145. }
  146. nav.bottom table .next {
  147. padding-right: 4rem;
  148. }
  149. nav.top {
  150. position: fixed;
  151. width: 100%;
  152. background-color: var(--nav-background-color);
  153. opacity: 1;
  154. }
  155. body.home nav.top {
  156. display: none;
  157. }
  158. nav.top div {
  159. border-bottom: 1px solid var(--border-grey);
  160. padding-left: 4rem;
  161. padding-right: 4rem;
  162. }
  163. @media screen and (max-width: 1199px) {
  164. nav.top div {
  165. padding-left: 2rem;
  166. padding-right: 2rem;
  167. }
  168. nav.bottom table .previous {
  169. padding-left: 2rem;
  170. }
  171. nav.bottom table .next {
  172. padding-right: 2rem;
  173. }
  174. }
  175. @media screen and (max-width: 767px) {
  176. nav.top div {
  177. padding-left: 1rem;
  178. padding-right: 1rem;
  179. }
  180. nav.bottom table .previous {
  181. padding-left: 1rem;
  182. }
  183. nav.bottom table .next {
  184. padding-right: 1rem;
  185. }
  186. }