style.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * Stylesheet for grayscale e-ink readers (reMarkable 2, Kobo Clara HD).
  3. *
  4. * - Pure black only: no colours, no gray text, no background shading.
  5. * Gray text looks faint on e-ink and light fills turn into dithered noise.
  6. * - Font family, size, line spacing and margins are left to the reader's
  7. * own settings; sizes below are relative (em) only.
  8. * - Simple CSS only: Kobo's RMSDK renderer and the reMarkable ignore or
  9. * mis-render flexbox, grid, calc() and custom properties.
  10. */
  11. body {
  12. font-family: serif;
  13. color: #000;
  14. }
  15. h1, h2, h3, h4, h5, h6 {
  16. color: #000;
  17. font-weight: bold;
  18. line-height: 1.2;
  19. text-align: left;
  20. page-break-after: avoid;
  21. }
  22. h1 { font-size: 1.6em; margin: 0 0 0.4em 0; }
  23. h2 { font-size: 1.3em; margin: 1.4em 0 0.5em 0; }
  24. h3 { font-size: 1.15em; margin: 1.2em 0 0.4em 0; }
  25. h4, h5, h6 { font-size: 1em; margin: 1em 0 0.3em 0; }
  26. .byline {
  27. font-style: italic;
  28. margin: 0;
  29. text-indent: 0;
  30. }
  31. .source {
  32. font-size: 0.85em;
  33. margin: 0.2em 0 1.8em 0;
  34. text-indent: 0;
  35. word-wrap: break-word;
  36. }
  37. /* Links are shown by an underline, not by colour. */
  38. a {
  39. color: #000;
  40. text-decoration: underline;
  41. }
  42. blockquote {
  43. margin: 1em 0 1em 0.4em;
  44. padding: 0 0 0 0.8em;
  45. border-left: 3px solid #000;
  46. }
  47. /* E-ink readers can't scroll sideways, so long lines must wrap. */
  48. pre {
  49. font-family: monospace;
  50. font-size: 0.85em;
  51. white-space: pre-wrap;
  52. word-wrap: break-word;
  53. margin: 1em 0;
  54. padding: 0.4em 0 0.4em 0.6em;
  55. border-left: 1px solid #000;
  56. }
  57. code {
  58. font-family: monospace;
  59. }
  60. ul, ol {
  61. margin: 0.8em 0;
  62. padding-left: 1.6em;
  63. }
  64. dt {
  65. font-weight: bold;
  66. }
  67. dd {
  68. margin: 0 0 0.6em 1.4em;
  69. }
  70. table {
  71. border-collapse: collapse;
  72. margin: 1em 0;
  73. }
  74. th, td {
  75. border: 1px solid #000;
  76. padding: 0.2em 0.4em;
  77. text-align: left;
  78. vertical-align: top;
  79. }
  80. th {
  81. font-weight: bold;
  82. }
  83. hr {
  84. border: 0;
  85. border-top: 1px solid #000;
  86. margin: 1.5em 0;
  87. }
  88. img {
  89. max-width: 100%;
  90. height: auto;
  91. }
  92. /* Images are already grayscale and sized for the screen (see internal/assets). */
  93. figure {
  94. margin: 1em 0;
  95. text-align: center;
  96. page-break-inside: avoid;
  97. }
  98. figure img {
  99. display: block;
  100. margin: 0 auto;
  101. }
  102. /* Stands in for an image that couldn't be downloaded. */
  103. .missing-image {
  104. font-style: italic;
  105. }
  106. figcaption {
  107. text-align: left;
  108. font-style: italic;
  109. font-size: 0.9em;
  110. margin-top: 0.3em;
  111. }
  112. aside {
  113. margin: 1em 0;
  114. padding-left: 0.8em;
  115. border-left: 1px solid #000;
  116. }