Greasy Fork is available in English.

Reddit Colored Comments [Updated for RES Users]

Customizable Colored Comments for Reddit. [Updated for RES Users 2025]

  1. /* ==UserStyle==
  2. @name Reddit Colored Comments [Updated for RES Users]
  3. @namespace typpi.online
  4. @description Customizable Colored Comments for Reddit. [Updated for RES Users 2025]
  5. @author vednoc [Updated by Nick2bad4u]
  6. @version 1.6.6
  7. @license MIT
  8. @homepageURL https://github.com/Nick2bad4u/UserStyles
  9. @supportURL https://github.com/Nick2bad4u/UserStyles/issues
  10. @preprocessor stylus
  11.  
  12. ------------------------------------------------
  13. New Reddit Options
  14. ------------------------------------------------
  15. @var range lineWidth '● New Design - Line Width' [4, 1, 25, 1]
  16. @var checkbox lineStyle '⠀⠀⚬ Line Color Style: Full or Partial' 0
  17. @var checkbox hideLines '⠀⠀⚬ Hide previous lines' 0
  18.  
  19. ------------------------------------------------
  20. Old Reddit Options
  21. ------------------------------------------------
  22. @var range oldLineWidth '● Old Design - Line Width' [4, 1, 25, 1]
  23. @var checkbox oldLineStyle '⠀⠀Line Style: Solid or Dotted' 0
  24.  
  25. ------------------------------------------------
  26. Old Reddit - Minimize Button Area
  27. ------------------------------------------------
  28. @var checkbox oldMinimizeArea '● Old Design - Color the Minimize Button Area' 0
  29. @var color oldMinimizeColor '⠀⠀⚬ Color of the Minimize Button Area' #00000080
  30. @var checkbox oldMinimizeRainbow '⠀⠀⚬ Rainbow Color the Minimize Button Area' 0
  31.  
  32. ------------------------------------------------
  33. Old Reddit - Minimize Button Area Hover
  34. ------------------------------------------------
  35. @var checkbox oldHoverArea '● Old Design - Color the Minimize Button Area Hover' 0
  36. @var color oldHoverColor '⠀⠀⚬ Color of the Minimize Button Area Hover' #00000080
  37. @var checkbox oldHoverRainbow '⠀⠀⚬ Rainbow Color the Minimize Button Area Hover' 0
  38.  
  39. ------------------------------------------------
  40. New Reddit and Old Reddit - Comment Depth Colors
  41. ------------------------------------------------
  42. @var color color1 '>>> Old + New - Comment Depth 1 - Color' #f07178
  43. @var color color2 '>>> Old + New - Comment Depth 2 - Color' #f78c6c
  44. @var color color3 '>>> Old + New - Comment Depth 3 - Color' #ffcb6b
  45. @var color color4 '>>> Old + New - Comment Depth 4 - Color' #f3ff89
  46. @var color color5 '>>> Old + New - Comment Depth 5 - Color' #c3e88d
  47. @var color color6 '>>> Old + New - Comment Depth 6 - Color' #8de89e
  48. @var color color7 '>>> Old + New - Comment Depth 7 - Color' #89ddff
  49. @var color color8 '>>> Old + New - Comment Depth 8 - Color' #82aaff
  50. @var color color9 '>>> Old + New - Comment Depth 9 - Color' #c792ea
  51. @var color color10 '>>> Old + New - Comment Depth 10 - Color' #9a91ea
  52. @var color color11 '>>> Old + New - Comment Depth 11 - Color' #f8b0b7
  53. @var color color12 '>>> Old + New - Comment Depth 12 - Color' #fbc7c3
  54. @var color color13 '>>> Old + New - Comment Depth 13 - Color' #ffd6a9
  55. @var color color14 '>>> Old + New - Comment Depth 14 - Color' #fdf8b2
  56. @var color color15 '>>> Old + New - Comment Depth 15 - Color' #d8f1b9
  57. @var color color16 '>>> Old + New - Comment Depth 16 - Color' #aeecc3
  58. @var color color17 '>>> Old + New - Comment Depth 17 - Color' #a5e2f9
  59. @var color color18 '>>> Old + New - Comment Depth 18 - Color' #a2bff8
  60. @var color color19 '>>> Old + New - Comment Depth 19 - Color' #ddbaf5
  61. @var color color20 '>>> Old + New - Comment Depth 20 - Color' #c4bcf5
  62.  
  63. ------------------------------------------------
  64. Original Style made by Vendoc
  65. ------------------------------------------------
  66. @var text originalstyle '● Original Style made by Vendoc' "'https://userstyles.world/style/4734/reddit-colored-comments'"
  67.  
  68. ==/UserStyle== */
  69. @-moz-document domain('reddit.com') {
  70. // Set line width for the new design
  71. if ( lineWidth != 2 ) {
  72. .threadline {
  73. border-right-width: s( '%spx', lineWidth ) !important;
  74. }
  75. }
  76.  
  77. // Set mode for line style in the new design
  78. $mode = '';
  79.  
  80. if ( lineStyle ) {
  81. $mode = '> div >';
  82. }
  83.  
  84. // Apply colors and styles to each level up to 20
  85. for $i in 1 .. 20 {
  86. div[id ^= 't'] > :first-child,
  87. div[id ^= 'moreComments'] > :first-child,
  88. div[id ^= 'continueThread'] > :first-child {
  89. // Create a string for the nth-child selector
  90. $nth = s( '%s', $i );
  91.  
  92. > :nth-child({$nth}) {
  93. $mode;
  94. }
  95.  
  96. .threadline {
  97. border-right-color: color + $i !important;
  98. }
  99.  
  100. // Hide previous lines if the option is checked
  101. if ( hideLines ) {
  102. > :nth-child({$nth}) > .threadline {
  103. border-right-color: #0000 !important;
  104. }
  105. }
  106. }
  107. }
  108.  
  109. // Old design specific styles
  110. .comment .child,
  111. .comment .showreplies,
  112. .res-commentBoxes.res-continuity .comment div.child {
  113. // Set line width for the old design
  114. if ( oldLineWidth != 1 ) {
  115. border-left-width: s( '%spx', oldLineWidth ) !important;
  116. }
  117.  
  118. // Set line style for the old design
  119. if ( oldLineStyle == 0 ) {
  120. border-left-style: solid !important;
  121. }
  122. else {
  123. border-left-style: dotted !important;
  124. }
  125. }
  126.  
  127. // Apply colors to nested child elements
  128. $str = '.res-commentBoxes.res-continuity .comment div.child ';
  129.  
  130. for $i in 1 .. 20 {
  131. {$str} {
  132. border-left-color: color + $i !important;
  133. }
  134.  
  135. // Increase the nesting level for each iteration
  136. $str += '> .sitetable > .comment > .child ';
  137. }
  138.  
  139. // Toggle coloring of the area
  140. if ( oldMinimizeRainbow == 1 ) {
  141. // Apply color to .expand elements within nested child elements
  142. $str2 = '.res-commentBoxes.res-continuity .comment div.child ';
  143.  
  144. for $i in 1 .. 20 {
  145. {$str2} .expand {
  146. background-color: color + $i !important;
  147. }
  148.  
  149. // Increase the nesting level for each iteration
  150. $str2 += '> .sitetable > .comment > .child ';
  151. }
  152. }
  153.  
  154. if ( oldHoverRainbow == 1 && ( oldMinimizeRainbow == 1 ) ) {
  155. // Apply hover effect to .expand elements within nested child elements
  156. $str5 = '.res-commentBoxes.res-continuity .comment div.child ';
  157.  
  158. for $i in 11 .. 20 {
  159. {$str5} .expand:hover {
  160. background-color: color + $i !important;
  161. }
  162.  
  163. // Increase the nesting level for each iteration
  164. $str5 += '> .sitetable > .comment > .child ';
  165. }
  166. }
  167.  
  168. if ( oldHoverRainbow == 1 && ( oldMinimizeRainbow == 0 ) ) {
  169. // Apply hover effect to .expand elements within nested child elements
  170. $str5 = '.res-commentBoxes.res-continuity .comment div.child ';
  171.  
  172. for $i in 1 .. 20 {
  173. {$str5} .expand:hover {
  174. background-color: color + $i !important;
  175. }
  176.  
  177. // Increase the nesting level for each iteration
  178. $str5 += '> .sitetable > .comment > .child ';
  179. }
  180. }
  181.  
  182. if ( oldMinimizeArea == 1 ) {
  183. // Apply a background color to .expand elements in the tagline
  184. .commentarea .entry > .tagline > .expand {
  185. background-color: oldMinimizeColor !important;
  186. }
  187. }
  188.  
  189. if ( oldHoverArea == 1 ) {
  190. // Apply a background color to .expand elements in the tagline
  191. .commentarea .entry > .tagline > .expand:hover {
  192. background-color: oldHoverColor !important;
  193. }
  194. }
  195. }