NYTimes.com – Dark Paywall Bypass [Ath]

Dark theme for New York Times (NYTimes.com). Includes paywall bypass and font configuration. No more unreadable text.

  1. /* ==UserStyle==
  2. @name NYTimes.com – Dark Paywall Bypass [Ath]
  3. @namespace athari
  4. @version 1.1.0
  5. @description Dark theme for New York Times (NYTimes.com). Includes paywall bypass and font configuration. No more unreadable text.
  6. @author Athari (https://github.com/Athari)
  7. @homepageURL https://github.com/Athari/AthariUserCSS
  8. @supportURL https://github.com/Athari/AthariUserCSS/issues
  9. @license MIT
  10. @preprocessor default
  11.  
  12. @var text ath-header-font-family "Font: Headers" "Arial, sans-serif"
  13. @var text ath-text-font-family "Font: Text" "Segoe UI, Arial, sans-serif"
  14. @var number ath-base-font-size "Font size: Base" [16, 8, 30, 0.5, 'px']
  15. @var number ath-adrticle-font-size "Font size: Aricle" [13, 8, 30, 0.5, 'px']
  16. ==/UserStyle== */
  17.  
  18. @-moz-document domain("nytimes.com") {
  19. :root {
  20. --color-content-primary: #eee;
  21. --color-content-secondary: #ccc;
  22. --color-content-tertiary: #999;
  23. --color-background-primary: #111;
  24. --color-background-secondary: #222;
  25. --color-background-tertiary: #333;
  26. --color-background-elevated: #222;
  27. --color-stroke-primary: #ccc;
  28. --color-stroke-quaternary: #aaa;
  29. }
  30.  
  31. html {
  32. font-size: var(--ath-base-font-size);
  33. }
  34. body {
  35. color: var(--color-content-secondary) !important;
  36. }
  37. h1, h2, h3, h4, h5, h6, .summary-class {
  38. font-family: var(--ath-header-font-family) !important;
  39. }
  40. p, li, div, span {
  41. font-family: var(--ath-text-font-family) !important;
  42. }
  43. [name="articleBody"] {
  44. font-size: var(--ath-article-font-size);
  45. p, li, div, span {
  46. font-size: inherit !important;
  47. line-height: 1.5 !important;
  48. }
  49. }
  50.  
  51. html, body, main,
  52. .vi-gateway-container {
  53. height: auto !important;
  54. }
  55. html {
  56. color-scheme: dark;
  57. overflow: hidden scroll;
  58. }
  59. body {
  60. overflow: visible;
  61. background: var(--color-background-primary) !important;
  62. }
  63. .vi-gateway-container {
  64. position: static !important;
  65. /* alternative: > div[class], > div[class]:empty:last-child { */
  66. > div:empty {
  67. display: none !important;
  68. }
  69. }
  70. iframe,
  71. #sponsor-wrapper,
  72. [data-testid^="ReadersModeGateway"] {
  73. display: none !important;
  74. }
  75.  
  76. svg[fill="#000000"] {
  77. fill: #ccc;
  78. }
  79.  
  80. a {
  81. color: var(--color-content-primary);
  82. p {
  83. color: inherit !important;
  84. }
  85. }
  86. [class], [class][class]::before, [class][class]::after {
  87. border-color: #555;
  88. }
  89.  
  90. input:not([type=button], [type=submit]) {
  91. color: revert !important;
  92. }
  93.  
  94. #in-story-masthead,
  95. [data-testid="masthead-container"] {
  96. background: #1f1f1f !important;
  97. border: none;
  98. header {
  99. border: none;
  100. }
  101. span, a {
  102. color: #ccc;
  103. }
  104. }
  105. [data-testid="desktop-nested-nav"] > ul > li {
  106. > div {
  107. background: var(--color-background-secondary) !important;
  108. }
  109. button {
  110. background: var(--color-background-secondary) !important;
  111. }
  112. }
  113. div:has(> div > [data-testid="floating-desktop-nested-nav"]) {
  114. background: var(--color-background-secondary) !important;
  115. button {
  116. background: var(--color-background-secondary) !important;
  117. }
  118. [data-testid^="nav-dropdown-"] {
  119. background: #1f1f1f !important;
  120. }
  121. }
  122. [data-testid="search-form"] {
  123. background: var(--color-background-secondary) !important;
  124. > div,
  125. > div > div {
  126. background: inherit !important;
  127. }
  128. input {
  129. background: revert !important;
  130. }
  131. }
  132. [data-testid="search-results"] {
  133. span {
  134. color: inherit;
  135. }
  136. }
  137. #site-index {
  138. background: #222;
  139. :not(#\0)::before {
  140. border-color: #555 !important;
  141. }
  142. h3 {
  143. color: var(--color-content-primary);
  144. }
  145. a {
  146. color: var(--color-content-secondary);
  147. }
  148. }
  149. path[fill="#000"],
  150. path[fill="#121212"] {
  151. fill: var(--color-stroke-quaternary) !important;
  152. }
  153.  
  154. [data-testid="onsite-messaging-unit-gateway"],
  155. [data-testid="NextBestAction"],
  156. #dock-container {
  157. display: none !important;
  158. }
  159. }