Proton Mail Carbon Editor Theme + customizations

Carbon theme in Proton Mail is beautiful but not complete, so i fix this.

  1. /* ==UserStyle==
  2. @name Proton Mail Carbon Editor Theme + customizations
  3. @description Carbon theme in Proton Mail is beautiful but not complete, so i fix this.
  4. @version 2.0.6
  5. @author BreatFR
  6. @namespace https://gitlab.com/breatfr
  7. @homepageURL https://gitlab.com/breatfr/proton-mail
  8. @supportURL https://discord.gg/Q8KSHzdBxs
  9. @license AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
  10. @preprocessor stylus
  11.  
  12. @var checkbox carbontheme "Fix Carbon Theme" 1
  13. @var checkbox meterbar "Fix Meter bar colors" 1
  14. @var checkbox fixtop "Fix Space Top" 1
  15. @var checkbox folders1st "Folders 1st" 1
  16. @var checkbox hidelabels "Hide Labels" 1
  17. @var checkbox hideleftnav "Hide Left Nav Icon" 1
  18. @var checkbox hideless "Hide Less Toggle" 1
  19. @var checkbox hideoffer "Hide Special Offer" 1
  20. @var checkbox hidetips "Hide Tips" 1
  21. @var checkbox hideview "Hide View" 0
  22. @var checkbox nospace "No space between all messages and folders" 1
  23. ==/UserStyle== */
  24.  
  25. /* === Credits ===
  26. Website https://breat.fr
  27. facebook https://www.facebook.com/breatfroff
  28. mastodon https://mastodon.social/@breat_fr
  29. telegram https://t.me/breatfr
  30. vk https://vk.com/breatfroff
  31. X (twitter) https://x.com/breatfroff
  32. === Credits === */
  33.  
  34. @-moz-document domain("account.proton.me"), domain("mail.proton.me") {
  35. if meterbar {
  36. .meter-bar-thumb--success {
  37. --meter-bar-thumb-color-success: var(--signal-success);
  38. }
  39. .meter-bar-thumb--warning {
  40. --meter-bar-thumb-color-warning: var(--signal-warning);
  41. }
  42. .meter-bar-thumb--danger {
  43. --meter-bar-thumb-color-danger: var(--signal-danger);
  44. }
  45. }
  46. if fixtop {
  47. .app-root {
  48. margin-bottom: 0 !important;
  49. }
  50. }
  51. if hideleftnav {
  52. .sidebar-collapse-button-container--above-scroll {
  53. display: none;
  54. }
  55. }
  56. /* Labels */
  57. ul.unstyled.navigation-list:last-child {
  58. padding-bottom: 0;
  59. }
  60. if hidelabels {
  61. ul.unstyled.navigation-list > li:has([data-shortcut-target="toggle-labels"]) {
  62. display: none;
  63. }
  64. }
  65. li.navigation-item--label,
  66. ul.unstyled.navigation-list > div.py-2.ml-7.text-sm.color-weak {
  67. padding-left: 1.75em;
  68. }
  69. if hideless {
  70. ul.unstyled.navigation-list > div:nth-of-type(5) {
  71. display: none;
  72. }
  73. }
  74. if hideoffer {
  75. [data-testid="cta:special-offer"] {
  76. display: none;
  77. }
  78. }
  79. if hidetips {
  80. .tip-box {
  81. display: none;
  82. }
  83. }
  84. if folders1st {
  85. ul.unstyled.navigation-list {
  86. display: flex;
  87. flex-direction: column;
  88. }
  89. ul.unstyled.navigation-list > li:nth-of-type(2) {
  90. order: 0;
  91. }
  92. ul.unstyled.navigation-list > li:nth-of-type(1) {
  93. order: 1;
  94. }
  95. ul.unstyled.navigation-list > div:nth-of-type(10) {
  96. order: 2;
  97. }
  98. }
  99. /* View */
  100. ul.unstyled.navigation-list > div:nth-of-type(10) {
  101. padding-left: 1.75em;
  102. }
  103. if hideview {
  104. ul.unstyled.navigation-list > li:nth-of-type(1) {
  105. display: none;
  106. }
  107. }
  108. if nospace {
  109. ul.unstyled.navigation-list {
  110. padding-bottom: 0 !important;
  111. }
  112. ul.unstyled.navigation-list > li:nth-of-type(1),
  113. ul.unstyled.navigation-list > li:nth-of-type(2),
  114. ul.unstyled.navigation-list > li:has([data-shortcut-target="toggle-labels"]) {
  115. margin-top: 0;
  116. }
  117. }
  118. if carbontheme {
  119. #proton-editor-container,
  120. #proton-editor-toggle-container,
  121. #proton-root,
  122. #proton-root *,
  123. #rooster-editor,
  124. #rooster-editor div,
  125. #rooster-editor p,
  126. .composer-content--rich-edition,
  127. .message-content,
  128. .message-iframe *,
  129. .protonmail_quote,
  130. blockquote div,
  131. blockquote *,
  132. iframe {
  133. background-color: var(--email-message-view-background-color) !important;
  134. color: var(--text-norm) !important;
  135. }
  136.  
  137. blockquote {
  138. border-bottom-color: #444444 !important;
  139. border-left: 3px solid #444444 !important;
  140. border-right-color: #444444 !important;
  141. border-top-color: #444444 !important;
  142. }
  143.  
  144. #ellipsis > svg {
  145. stroke: var(--text-norm) !important;
  146. }
  147.  
  148. /* Signature color */
  149. .protonmail_signature_block-user,
  150. .protonmail_signature_block-user table div,
  151. .protonmail_signature_block-proton {
  152. color: var(--text-norm) !important;
  153. }
  154.  
  155. /* Link color */
  156. #rooster-editor a,
  157. .protonmail_signature_block-user a,
  158. .protonmail_signature_block-proton a {
  159. color: #657ee4 !important;
  160. }
  161. /* Message list */
  162. .items-column-list-inner--mail {
  163. background-color: var(--email-message-view-background-color) !important;
  164. }
  165. .item-container:hover {
  166. box-shadow: var(--shadow-raised);
  167. }
  168. .item-container.read {
  169. background-color: var(--email-message-view-background-color) !important;
  170. color: var(--email-item-read-text-color) !important;
  171. }
  172. .item-container.unread {
  173. background-color: var(--email-item-unread-background-color) !important;
  174. color: var(--email-item-unread-text-color) !important;
  175. }
  176. .item-container.item-is-selected {
  177. background-color: var(--email-item-selected-background-color) !important;
  178. color: var(--email-item-selected-text-color) !important;
  179. }
  180. /* Settings */
  181. .quickSettings,
  182. .quickSettings .footer,
  183. .quickSettings .header--drawer {
  184. background-color: var(--email-message-view-background-color) !important;
  185. }
  186. }
  187. /* Images in emails */
  188. .rio-asin-container-image img {
  189. mix-blend-mode: normal !important;
  190. }
  191. }