docbook-screen.css 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. /* DocBook xslTNG version 1.3.0
  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. --popup-annotation-color: var(--surface-color);
  15. --on-popup-annotation-color: var(--on-surface-color);
  16. --popup-annotation-border-color: var(--primary-color);
  17. --popup-annotation-border-style: 1px solid var(--popup-annotation-border-color);
  18. --popup-annotation-header-color: var(--primary-color);
  19. --on-popup-annotation-header-color: var(--on-primary-color);
  20. --popup-annotation-header-separator-border-style: 1px solid var(--popup-annotation-border-color);
  21. --js-controls-border-color: var(--primary-color);
  22. --js-controls-border-style: 1px solid var(--js-controls-border-color);
  23. --js-controls-header-color: var(--primary-color);
  24. --on-js-controls-header-color: var(--on-primary-color);
  25. --js-controls-header-separator-border-style: 1px solid var(--popup-annotation-border-color);
  26. --js-controls-color: var(--surface-color);
  27. --on-js-controls-color: var(--on-surface-color);
  28. }
  29. html {
  30. color: var(--on-background-color);
  31. background-color: var(--background-color);
  32. height: 100%;
  33. width: 100%;
  34. line-height: 1.75rem;
  35. font-size: 13.5pt;
  36. scroll-padding-top: 40px;
  37. }
  38. /* https://www.smashingmagazine.com/2020/07/css-techniques-legibility/ */
  39. @supports (font-size-adjust: 1;) {
  40. html {
  41. font-size-adjust: 0.5;
  42. }
  43. }
  44. body {
  45. min-height: 100%;
  46. padding-left: 0;
  47. padding-right: 0;
  48. margin-left: 0;
  49. margin-right: 0;
  50. display: grid;
  51. grid-template-rows: 1fr auto;
  52. grid-template-columns: 100%;
  53. }
  54. main,
  55. footer {
  56. width: 100%;
  57. max-width: 50rem;
  58. margin-left: auto;
  59. margin-right: auto;
  60. padding-left: 1rem;
  61. padding-right: 1rem;
  62. }
  63. main {
  64. padding-top: 3rem;
  65. }
  66. .book + .book {
  67. border-top: var(--division-separator-border-style);
  68. margin-top: 6em;
  69. padding-top: 6em;
  70. }
  71. .refentry + .refentry {
  72. border-top: var(--division-separator-border-style);
  73. margin-top: 6em;
  74. padding-top: 6em;
  75. }
  76. .book > .dedication > header,
  77. .article > .dedication > header,
  78. .book .chapter > header,
  79. .book .preface > header,
  80. .book .appendix > header,
  81. .book .part > header {
  82. margin-top: 4rem;
  83. padding-top: 2rem;
  84. border-top: 0.25rem solid var(--border-color);
  85. }
  86. .dedication + .dedication > header {
  87. border-top: inherit;
  88. }
  89. .colophon {
  90. margin-top: 6rem;
  91. margin-bottom: 6rem;
  92. margin-left: 6rem;
  93. margin-right: 6rem;
  94. border: 1px solid var(--border-color);
  95. border-radius: 1em;
  96. padding-left: 2em;
  97. padding-right: 2em;
  98. padding-bottom: 2em;
  99. }
  100. .set header h1,
  101. .book header h1 {
  102. text-align: center;
  103. }
  104. .footnotes {
  105. margin-top: 2em;
  106. }
  107. .footnotes div.footnote-number {
  108. display: inline-block;
  109. width: 0.75rem;
  110. height: 0;
  111. margin-left: -0.75rem;
  112. margin-top: 0.5rem;
  113. vertical-align: top;
  114. }
  115. .footnotes div.footnote-body {
  116. display: inline-block;
  117. }
  118. .footnotes .footnote {
  119. margin-left: 0.75rem;
  120. }
  121. .footnote p {
  122. margin-bottom: 0;
  123. }
  124. .footnotes hr {
  125. max-width: 1in;
  126. margin: 0;
  127. }
  128. .calloutlist dl {
  129. display: grid;
  130. grid-template-columns: max-content auto;
  131. }
  132. .calloutlist dl dt {
  133. float: none;
  134. width: inherit;
  135. grid-column-start: 1;
  136. }
  137. .calloutlist dl dd {
  138. margin-left: 1em;
  139. grid-column-start: 2;
  140. }
  141. /* ============================================================ */
  142. nav table td.previous {
  143. text-align: left;
  144. }
  145. nav table td.up {
  146. text-align: center;
  147. }
  148. nav table td.next {
  149. text-align: right;
  150. }
  151. nav.bottom {
  152. background-color: var(--nav-background-color);
  153. }
  154. nav.bottom table {
  155. border-top: 2px solid var(--border-color);
  156. margin-bottom: 1rem;
  157. }
  158. nav.bottom table .previous {
  159. padding-left: 4rem;
  160. }
  161. nav.bottom table .next {
  162. padding-right: 4rem;
  163. }
  164. nav.top {
  165. position: fixed;
  166. width: 100%;
  167. background-color: var(--nav-background-color);
  168. opacity: 1;
  169. }
  170. body.home nav.top {
  171. display: none;
  172. }
  173. nav.top div {
  174. border-bottom: 1px solid var(--border-color);
  175. padding-left: 4rem;
  176. padding-right: 4rem;
  177. }
  178. /* ============================================================ */
  179. /* Javascript annotations */
  180. .popup-annotation-wrapper {
  181. display: none;
  182. position: fixed;
  183. left: 0;
  184. top: 0;
  185. height: 100%;
  186. width: 100%;
  187. background-color: var(--modal-overlay-color);
  188. }
  189. .popup-annotation-body {
  190. background-color: var(--popup-annotation-color);
  191. color: var(--on-popup-annotation-color);
  192. border: var(--popup-annotation-border-style);
  193. width: 50%;
  194. min-height: 40%;
  195. max-height: 50%;
  196. margin-top: 10%;
  197. margin-left: auto;
  198. margin-right: auto;
  199. border-radius: 0.15em;
  200. display: grid;
  201. grid-template-rows: auto 1fr;
  202. grid-template-columns: 100%;
  203. }
  204. .wide .popup-annotation-body {
  205. width: 80%;
  206. }
  207. .tall .popup-annotation-body {
  208. max-height: 80%;
  209. }
  210. .popup-annotation-header {
  211. height: 2em;
  212. background-color: var(--popup-annotation-header-color);
  213. color: var(--on-popup-annotation-header-color);
  214. padding-left: 1em;
  215. padding-right: 0.5em;
  216. border-bottom: var(--popup-annotation-header-separator-border-style);
  217. }
  218. .popup-annotation-header .annotation-close {
  219. float: right;
  220. cursor: pointer;
  221. font-size: 125%;
  222. }
  223. .popup-annotation-header .annotation-title {
  224. padding-top: 0.1em;
  225. }
  226. .popup-annotation-content {
  227. padding-left: 1em;
  228. padding-right: 1em;
  229. padding-top: 0.5em;
  230. padding-bottom: 0.5em;
  231. overflow: scroll;
  232. }
  233. .annotation-close {
  234. padding-top: 4px;
  235. }
  236. /* ============================================================ */
  237. /* Javascript controls */
  238. .js-controls-wrapper {
  239. display: none;
  240. position: fixed;
  241. left: 0;
  242. top: 0;
  243. height: 100%;
  244. width: 100%;
  245. background-color: var(--modal-overlay-color);
  246. }
  247. .js-controls-body {
  248. background-color: var(--js-controls-color);
  249. color: var(--on-js-controls-color);
  250. border: var(--js-controls-border-style);
  251. max-width: 300px;
  252. margin-top: 5px;
  253. margin-left: 10px;
  254. opacity: 1;
  255. }
  256. .js-controls-header {
  257. height: 2em;
  258. background-color: var(--js-controls-header-color);
  259. color: var(--on-js-controls-header-color);
  260. padding-left: 1em;
  261. padding-right: 0.5em;
  262. border-bottom: var(--js-controls-header-separator-border-style);
  263. }
  264. .js-controls-header .js-controls-close {
  265. float: right;
  266. cursor: pointer;
  267. font-size: 125%;
  268. }
  269. .js-controls-header .js-controls-title {
  270. padding-top: 0.1em;
  271. }
  272. .js-controls-content {
  273. background-color: var(--js-controls-color);
  274. color: var(--on-js-controls-color);
  275. padding: 1em;
  276. }
  277. .js-controls-buttons {
  278. text-align: center;
  279. padding-bottom: 0.5em;
  280. }
  281. .js-controls-buttons button {
  282. display: inline-block;
  283. text-align: center;
  284. font-size: 14pt;
  285. background-color: var(--enabled-color);
  286. border-radius: 5px;
  287. border: 2px solid var(--primary-color);
  288. color: var(--on-surface-color);
  289. text-align: center;
  290. padding: 5px;
  291. width: 3em;
  292. transition: all 0.5s;
  293. cursor: pointer;
  294. margin: 5px;
  295. }
  296. .js-controls-reload {
  297. text-align: center;
  298. background-color: var(--error-color);
  299. color: var(--on-error-color);
  300. }
  301. /* ============================================================ */
  302. /* For progressive reveals in chunked content. */
  303. .reveal {
  304. display: none;
  305. }
  306. ul.reveal,
  307. ol.reveal {
  308. display: inherit;
  309. }
  310. .reveal > li {
  311. display: none;
  312. }
  313. .reveal > li:first-child {
  314. display: list-item;
  315. }
  316. .noreveal {
  317. display: inherit;
  318. }
  319. /* ============================================================ */
  320. @media screen and (max-width: 1199px) {
  321. nav.top div {
  322. padding-left: 2rem;
  323. padding-right: 2rem;
  324. }
  325. nav.bottom table .previous {
  326. padding-left: 2rem;
  327. }
  328. nav.bottom table .next {
  329. padding-right: 2rem;
  330. }
  331. }
  332. @media screen and (max-width: 767px) {
  333. nav.top div {
  334. padding-left: 1rem;
  335. padding-right: 1rem;
  336. }
  337. nav.bottom table .previous {
  338. padding-left: 1rem;
  339. }
  340. nav.bottom table .next {
  341. padding-right: 1rem;
  342. }
  343. }