YouTube Chat Tints

Make YouTube Chat Tints

  1. /* ==UserStyle==
  2. @name YouTube Chat Tints
  3. @version 0.4.9
  4. @namespace github.com/cyfung1031
  5. @license MIT
  6. @description Make YouTube Chat Tints
  7. @author CY Fung
  8. @preprocessor stylus
  9. @var color color-sponsor-text "Sponsor Text Color" #71ff8c
  10. @var color color-moderator-text "Moderator Text Color" #70a7ff
  11. @var color color-owner-chip-background "Owner Chip Background Color" #ffff3c
  12. @var color color-general-author "General Author Color" #a3e3e3
  13. @var range loading-effect-ms "loading-effect (0ms=disable; 600ms)" [0, 0, 900, 50, 'ms']
  14. @var checkbox chat-author-vline-enable "Enable Chat Author Vline" 1
  15. @var range v-transparent "Vline Transparency" [0.1, 0.01, 0.32, 0.01]
  16. @var range vline-gap-1 "Vline Gap 1" [0, -2, 18, 1]
  17. @var range vline-gap-2 "Vline Gap 2" [0, -6, 6, 1]
  18. @var checkbox fade-author-icon-enable "Enable Fade Author Icon" 1
  19. @var range author-icon-transition "Author Icon Transition" [0, 0, 600, 50, 'ms']
  20. @var number author-icon-opacity "Author Icon Opacity" [0.6, 0.2, 1.0, 0.2]
  21. @var range author-icon-size "Author Icon Size" [24, 12, 36, 2, 'px']
  22. @var range author-font-ratio "Author Text Size" [3.6, 2.0, 4.6, 0.2]
  23. @var range author-line-height "Author Line Height" [0, -4, 10, 1]
  24. @var number author-chip-default-order "Author Chip Default Order" [0, 0, 80, 5]
  25. @var number author-chip-pre-badge-order "Author Chip Pre-Badge Order" [0, 0, 80, 5]
  26. @var number author-chip-author-name-order "Author Chip Author-Name Order" [0, 0, 80, 5]
  27. @var number author-chip-member-badge-order "Author Chip Member-Badge Order" [0, 0, 80, 5]
  28. @var range author-chip-member-badge-at "Author Chip Member-Badge Align Top" [-1, -1, 4, 1, 'px']
  29. @var range author-chip-member-badge-mw "Author Chip Member-Badge Min Width" [0, 0, 32, 2, 'px']
  30. @var range author-chip-member-badge-mh "Author Chip Member-Badge Min Height" [0, 0, 32, 2, 'px']
  31. @var range member-icon-font-size "Member Icon Font Size" [1.4, 0.6, 2.6, 0.2, 'rem']
  32. @var range message-font-ratio "Message Font Size" [4.6, 2.0, 6.6, 0.2]
  33. @var range message-line-height "Message Line Height" [0, -4, 10, 1]
  34. @var checkbox emoji-normalize-enable "Emoji Size Adjust" 0
  35. @var range emoji-font-size "Emoji Font Size" [2.0, 0.6, 3.4, 0.2, 'rem']
  36. @var number emoji-vertical-shift "Emoji Vertical Shift" [14, 1, 32, 1]
  37. @var range emoji-margin "Emoji Margin" [2.0, 1.0, 6.0, 1.0, 'px']
  38. @var number emoji-shadow-size "emoji-shadow-size (1=disable)" [3, 1, 4, 1]
  39. @var color emoji-shadow "emoji-shadow" #b5b4b4
  40.  
  41. @var range padding-left-message "Message Padding Left" [0.4, 0.2, 2, 0.2, 'em']
  42. @var range padding-left-author-icon-x "Author Icon Padding Left" [4, 2, 26, 2, 'px']
  43. @var range padding-right-author-icon "Author Icon Padding Right" [6, 2, 32, 2, 'px']
  44.  
  45. @var number final-message-opacity "Final Message Opacity" [0.8, 0.5, 1.0, 0.1]
  46. @var number min-content-text-height "Min Content Text Height (0=disable)" [0, 0, 18, 1]
  47. @var range message-opacity-ms "message-opacity-animation (0ms=disable; 250ms)" [0, 0, 600, 50, 'ms']
  48.  
  49. @var checkbox enable-smaller-super-chat "enable-smaller-super-chat" 1
  50. @var number msg-block-margin-2 "Message Block Margin" [20.0, 4.0, 40.0, 4.0, 'px']
  51. @var range msg-block-margin-rr "Message Block Margin Right Ratio" [0, -0.8, 0.8, 0.2]
  52.  
  53. ==/UserStyle== */
  54. /*
  55.  
  56. @var checkbox ruby-font "Ruby Font" 1
  57. @var checkbox pw-font "Proportional Width Font" 1
  58. */
  59. ruby-font=0 //
  60. pw-font=0 //
  61.  
  62. msg-block-margin-1 = 48px //
  63.  
  64. vline-gap-1-px = vline-gap-1 * 1px //
  65. vline-gap-2-px = vline-gap-2 * 2px //
  66. padding-right-author-icon-diff = padding-right-author-icon - 6px //
  67. author-icon-size-diff = author-icon-size - 24px + vline-gap-1-px //
  68. cb-w = 78px + author-icon-size-diff + vline-gap-1-px //
  69. cb-ml = -( 48px + cb-w + author-icon-size-diff + padding-right-author-icon-diff + vline-gap-2-px + vline-gap-1-px ) //
  70. padding-left-author-icon = padding-left-author-icon-x + vline-gap-1-px //
  71. ds-w = 14px + vline-gap-2-px + vline-gap-1-px //
  72.  
  73. if chat-author-vline-enable == 0 //
  74. ds-w = 0px //
  75.  
  76. author-icon-mr = padding-right-author-icon + ds-w //
  77.  
  78. final-message-opacity-0 = final-message-opacity * 0.2 //
  79. final-message-opacity-10 = final-message-opacity * 0.45 //
  80.  
  81.  
  82. message-font-size = message-font-ratio * 0.4rem //
  83. author-font-size-2=author-font-ratio * 0.4rem //
  84.  
  85.  
  86. sl-3a = (emoji-vertical-shift - 4) * 0.5px //
  87. emoji-vertical-shift-px = sl-3a //
  88.  
  89. dummy()
  90. // dummy
  91. border: 0;
  92.  
  93.  
  94.  
  95. cc(colorCode)
  96. transparentify(colorCode, v-transparent)
  97.  
  98.  
  99. myChars = (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9)
  100.  
  101.  
  102. gen1()
  103.  
  104. for c1, i in myChars
  105. d1 = '&:has(#img[src*="m/%s"])' % c1
  106. {d1} //
  107. --author-color-1 'var(--vline-color-%s)' % (i+1+1000) //
  108.  
  109. for c1, i in myChars
  110. d1 = '&:has(#img[src*="%s="])' % c1
  111. {d1} //
  112. --author-color-1 'var(--vline-color-%s)' % (i+1+1000) //
  113.  
  114. for c1, i in myChars
  115. d1 = '&:has(.yt-live-chat-author-badge-renderer[src*="m/%s"])' % c1
  116. {d1} //
  117. --author-color-2 'var(--vline-color-%s)' % (i+1+1000) //
  118.  
  119.  
  120. authorNameColor()
  121. --yt-live-chat-sponsor-color: color-sponsor-text; //
  122. --yt-live-chat-secondary-text-color: #ddd; //
  123. --yt-live-chat-author-chip-owner-background-color: color-owner-chip-background; // --yt-live-chat-moderator-color: #5e84f1;
  124. --yt-live-chat-moderator-color: color-moderator-text; //
  125.  
  126. #author-name {
  127. --yt-live-chat-secondary-text-color: color-general-author;
  128. word-break: break-word;
  129. display: inline;
  130. vertical-align: middle;
  131. }
  132. @-moz-document url-prefix("https://www.youtube.com/live_chat") {
  133.  
  134. msg-line-height-o = (message-line-height + 4) * 0.15rem
  135. msg-line-height-d = message-font-size + msg-line-height-o
  136. msg-min-height = msg-line-height-d * 1.08
  137.  
  138. line-height-message = msg-line-height-d
  139. line-height-author-name = author-font-size-2 + (author-line-height + 4) * 0.15rem
  140. line-height-min = 0
  141.  
  142. if message-font-size >0 and author-font-size-2 > 0 {
  143. line-height-min = line-height-message + line-height-author-name
  144. }
  145.  
  146. html{
  147. --final-message-opacity-0: final-message-opacity-0;
  148. --final-message-opacity-10: final-message-opacity-10;
  149. --final-message-opacity: final-message-opacity;
  150. --emoji-vertical-shift-px: emoji-vertical-shift-px;
  151. --author-chip-display: !invalid;
  152. --author-chip-mt: !invalid;
  153. --author-chip-mb: !invalid;
  154.  
  155. }
  156.  
  157. yt-live-chat-author-chip {
  158. display: var(--author-chip-display);
  159. margin-top: var( --author-chip-mt);
  160. margin-bottom: var( --author-chip-mb);
  161. }
  162.  
  163. makeBoxShadow(){
  164.  
  165.  
  166. contain: strict;
  167. content-visibility: auto;
  168.  
  169. position: absolute;
  170. box-shadow-w1 = 32px + author-icon-size-diff + vline-gap-1-px
  171. box-shadow-w2 = box-shadow-w1 + 12px + vline-gap-2-px
  172. --box-shadow-w1: box-shadow-w1;
  173. --box-shadow-w2: box-shadow-w2;
  174. box-shadow: var(--box-shadow-w1) 0px 0px 0px var(--author-color-1), var(--box-shadow-w1) 0px 0px 0px #ddd, var(--box-shadow-w2) 0px 0px 0px var(--author-color-2), var(--box-shadow-w2) 0px 0px 0px #888;
  175. content: '';
  176. width: cb-w;
  177. border-radius: 0;
  178. display: block;
  179. pointer-events: none;
  180. touch-action: none;
  181. user-select: none;
  182. z-index: 0;
  183. bottom: 1px;
  184. top: 1px;
  185.  
  186. }
  187.  
  188.  
  189. #menu.style-scope.yt-live-chat-paid-message-renderer {
  190. z-index: 77;
  191. pointer-events: all;
  192. }
  193.  
  194.  
  195. /* */
  196. @keyframes yt-live-chat-text-message-renderer-animation3 {
  197.  
  198. 0% {
  199. opacity: var(--final-message-opacity-0); /* */
  200. }
  201.  
  202.  
  203. 100% {
  204. opacity: var(--final-message-opacity); /* */
  205. }
  206.  
  207. }
  208. /* */
  209.  
  210. @keyframes yt-live-chat-text-message-renderer-animation2 {
  211. 0% {
  212. left: 48px;
  213.  
  214. height: 6px;
  215. width: 32px;
  216. opacity: 0.9;
  217. }
  218.  
  219. 50% {
  220. left: 48px;
  221.  
  222. height: 3.2px;
  223.  
  224. width: calc(100% - 72px);
  225. opacity: 0.8;
  226. }
  227.  
  228. 51% {
  229. left: 48px;
  230.  
  231. height: 3.2px;
  232.  
  233. width: calc(100% - 72px);
  234. opacity: 0.4;
  235. }
  236.  
  237. 100% {
  238. left: 48px;
  239.  
  240. height: 3.2px;
  241.  
  242. width: calc(100% - 72px);
  243. opacity: 0.0;
  244. }
  245. }
  246.  
  247. /* */
  248.  
  249.  
  250. yt-live-chat-author-chip #chat-badges.yt-live-chat-author-chip,
  251. yt-live-chat-author-chip #chat-badges.yt-live-chat-author-chip yt-live-chat-author-badge-renderer,
  252. yt-live-chat-author-chip #chat-badges.yt-live-chat-author-chip yt-live-chat-author-badge-renderer #image,
  253. yt-live-chat-author-chip #chat-badges.yt-live-chat-author-chip yt-live-chat-author-badge-renderer #image img {
  254. contain: layout style;
  255. display: inline-flex;
  256. vertical-align: middle;
  257. }
  258.  
  259.  
  260.  
  261. sl-1 = 0px
  262.  
  263. if emoji-shadow-size > 1 {
  264.  
  265. sl=(emoji-shadow-size - 1) * 0.5px //
  266. sr=-1 * sl //
  267. sl-1 = sl //
  268.  
  269. }
  270.  
  271. sl-2 = sl-1 + emoji-margin
  272. sl-3 = sl-1
  273.  
  274. .emoji{
  275. --emoji-margin-left: sl-2;
  276. }
  277. .emoji + .emoji {
  278. --emoji-margin-left: sl-1;
  279. }
  280.  
  281.  
  282. #message.yt-live-chat-text-message-renderer .emoji.yt-live-chat-text-message-renderer {
  283. contain: layout paint style;
  284.  
  285. display: inline-block;
  286.  
  287.  
  288. if emoji-shadow-size > 1 {
  289.  
  290. filter: drop-shadow(0px sl 0px emoji-shadow) drop-shadow(sl 0px 0px emoji-shadow) drop-shadow(sr 0px 0px emoji-shadow) drop-shadow(0px sr 0px emoji-shadow);
  291.  
  292. }
  293.  
  294.  
  295. margin-left: var(--emoji-margin-left);
  296. margin-right: sl-2;
  297. margin-top: sl-3;
  298. margin-bottom: sl-1;
  299. border-bottom: var(--emoji-vertical-shift-px) solid transparent;
  300.  
  301. if emoji-normalize-enable {
  302.  
  303. --emoji-font-size: emoji-font-size;
  304.  
  305. height: calc(var(--emoji-font-size) * 1.12);
  306. width: auto;
  307. object-fit: contain;
  308. }
  309. }
  310. yt-live-chat-pinned-message-renderer#pinned-message #message.yt-live-chat-pinned-message-renderer #card #message .emoji {
  311. if emoji-shadow-size > 1 {
  312.  
  313. filter: drop-shadow(0px sl 0px emoji-shadow) drop-shadow(sl 0px 0px emoji-shadow) drop-shadow(sr 0px 0px emoji-shadow) drop-shadow(0px sr 0px emoji-shadow);
  314.  
  315. }
  316. }
  317.  
  318. body yt-img-shadow#author-photo.style-scope.yt-live-chat-text-message-renderer {
  319. contain-intrinsic-size: author-icon-size author-icon-size;
  320. }
  321.  
  322.  
  323.  
  324. yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer yt-live-chat-author-chip.yt-live-chat-text-message-renderer {
  325. align-items: center;
  326. display: inline-flex;
  327. flex-direction: row;
  328. margin: 0;
  329.  
  330. font-size: author-font-size-2;
  331. line-height: line-height-author-name; /* 120% */
  332. }
  333.  
  334. yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer yt-live-chat-author-chip.yt-live-chat-paid-message-renderer {
  335. align-items: center;
  336. display: inline-flex;
  337. flex-direction: row;
  338.  
  339. font-size: author-font-size-2;
  340. line-height: line-height-author-name; /* 120% */
  341. }
  342.  
  343.  
  344.  
  345. #items yt-live-chat-text-message-renderer { // weak selector
  346. contain: layout style;
  347. } //
  348. xfont-variant-east-asian=unset // ;
  349. if ruby-font { //
  350. xfont-variant-east-asian=ruby //
  351. } //
  352. if pw-font { //
  353. xfont-variant-east-asian=proportional-width //
  354. } //
  355. if ruby-font and pw-font { //
  356. xfont-variant-east-asian=ruby proportional-width //
  357. } //
  358. //
  359.  
  360.  
  361. yt-live-chat-item-list-renderer:not([allow-scroll]) #item-scroller.yt-live-chat-item-list-renderer {
  362. overflow-y: scroll;
  363. padding-right: 0;
  364. }
  365. yt-live-chat-message-input-renderer {
  366. authorNameColor()
  367. }
  368.  
  369. #items.style-scope.yt-live-chat-item-list-renderer {
  370.  
  371. if chat-author-vline-enable {
  372.  
  373. paid-msg-pl = msg-block-margin-2 + author-icon-size-diff + vline-gap-2-px
  374. paid-msg-vline-padding = paid-msg-pl + msg-block-margin-1
  375. paid-msg-vline-ml = -120px - paid-msg-pl - author-icon-size-diff + padding-left-author-icon - 2 * vline-gap-1-px - 10px
  376.  
  377.  
  378. & > yt-live-chat-paid-message-renderer, & > yt-live-chat-membership-item-renderer, & > yt-live-chat-paid-sticker-renderer {
  379.  
  380. --paid-msg-vline-ml: paid-msg-vline-ml;
  381. --paid-msg-vline-padding-l: paid-msg-vline-padding;
  382. --paid-msg-vline-padding-r: '%s' % (paid-msg-vline-padding * (msg-block-margin-rr + 1.0));
  383. padding: 4px var(--paid-msg-vline-padding-r) 4px var(--paid-msg-vline-padding-l);
  384. position: relative !important;
  385.  
  386.  
  387. &::before {
  388.  
  389. makeBoxShadow()
  390. margin-left: var(--paid-msg-vline-ml);
  391. }
  392.  
  393. }
  394.  
  395.  
  396. .yt-live-chat-paid-message-renderer, .yt-live-chat-membership-item-renderer, .yt-live-chat-paid-sticker-renderer {
  397.  
  398.  
  399.  
  400.  
  401. &#author-photo.style-scope.no-transition {
  402. position:fixed;
  403. left:0px;
  404.  
  405. align-self: center;
  406. display: flex;
  407. padding: 0;
  408. margin: 0;
  409. z-index: 1;
  410.  
  411. margin: 0 0 0 padding-left-author-icon;
  412.  
  413. &,
  414. & img[src] {
  415.  
  416. height: author-icon-size;
  417. object-fit: contain;
  418. width: auto;
  419. }
  420.  
  421. }
  422.  
  423.  
  424. &#header {
  425.  
  426. padding: 8px 14px 8px 14px;
  427. }
  428.  
  429.  
  430.  
  431. if fade-author-icon-enable {
  432.  
  433.  
  434. &#author-photo {
  435. opacity: author-icon-opacity;
  436. if author-icon-transition && (author-icon-transition > 0) {
  437. transition: 'opacity %s' % author-icon-transition;
  438. }
  439.  
  440. &:hover {
  441. opacity: 1;
  442.  
  443. }
  444. }
  445.  
  446. }
  447.  
  448.  
  449.  
  450. &#menu.style-scope yt-icon-button {
  451. position:fixed;
  452. right:0;
  453. }
  454. }
  455.  
  456.  
  457. } else {
  458.  
  459.  
  460.  
  461. }
  462.  
  463.  
  464.  
  465. & > .yt-live-chat-item-list-renderer #card #header:has(#overlay-image) {
  466.  
  467. min-height: 48px;
  468.  
  469.  
  470. }
  471.  
  472.  
  473. authorNameColor()
  474. & > yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer #message.yt-live-chat-text-message-renderer {
  475. padding: 0px 0px;
  476. margin-left: padding-left-message;
  477. display: block;
  478. align-items: center;
  479. font-size: message-font-size;
  480. line-height: normal; /* 120% */
  481. min-height: msg-min-height;
  482. line-height: msg-line-height-d;
  483. --padding-v: 'calc( 4px + %s )' % ((msg-line-height-d - message-font-size)/2);
  484. padding-top: var(--padding-v) !important;
  485. padding-bottom: var(--padding-v) !important;
  486. /*
  487. margin-left:2px;
  488. margin-right:2px;
  489. */
  490.  
  491. font-variant-east-asian: xfont-variant-east-asian;
  492. letter-spacing: 0px !important;
  493.  
  494. line-break: auto;
  495. text-align:justify;
  496. word-break: break-word;
  497. white-space: pre-line;
  498. overflow-wrap: break-word;
  499. -ms-word-break: break-word;
  500. word-break: break-word;
  501. -ms-hyphens: auto;
  502. -moz-hyphens: auto;
  503. -webkit-hyphens: auto;
  504. hyphens: auto;
  505. }
  506.  
  507.  
  508. & > yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer #message.yt-live-chat-text-message-renderer a {
  509. color: inherit !important;
  510. font-variant-east-asian: revert;
  511. }
  512.  
  513.  
  514.  
  515. yt-live-chat-author-chip.yt-live-chat-text-message-renderer {
  516. --author-chip-display: inline-block;
  517. --author-chip-mt: 4px;
  518. --author-chip-mb: 2px;
  519. }
  520.  
  521. #author-photo.yt-live-chat-text-message-renderer {
  522. align-self: center;
  523. display: flex;
  524. padding: 0;
  525. margin-top: 0
  526. margin-right: author-icon-mr !important; /* important for Kaitei */
  527. margin-bottom:0;
  528. margin-left: padding-left-author-icon;
  529. z-index: 1;
  530. }
  531.  
  532. #author-photo.yt-live-chat-text-message-renderer img[src] {
  533. height: author-icon-size;
  534. object-fit: contain;
  535. width: auto;
  536. }
  537.  
  538. img.yt-live-chat-author-badge-renderer {
  539. height: member-icon-font-size;
  540. width: auto;
  541. }
  542.  
  543.  
  544. #chat-badges.style-scope.yt-live-chat-author-chip {
  545. /* display: inline;*/
  546. flex-direction: row;
  547. align-items: center;
  548. justify-items: center;
  549. }
  550.  
  551.  
  552. & > yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer {
  553. padding: 0;
  554. margin: 0;
  555. padding-right: 28px;
  556. margin-right: 4px;
  557.  
  558.  
  559. if fade-author-icon-enable {
  560.  
  561.  
  562. #author-photo.yt-live-chat-text-message-renderer {
  563. opacity: author-icon-opacity;
  564. if author-icon-transition > 0 {
  565. transition: 'opacity %s' % author-icon-transition;
  566. }
  567. }
  568.  
  569. #author-photo.yt-live-chat-text-message-renderer:hover {
  570. opacity: 1;
  571. }
  572. }
  573. }
  574.  
  575. if loading-effect-ms > 0 {
  576.  
  577.  
  578. & > yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer::before {
  579. content: '';
  580. display: block;
  581. position: absolute;
  582. background: rgba(77, 77, 77, 0.5);
  583. animation: yt-live-chat-text-message-renderer-animation2 loading-effect-ms linear 0ms 1 normal forwards;
  584.  
  585. pointer-events: none;
  586. touch-action: none;
  587. user-select: none;
  588. transform-origin: 50% 50%;
  589.  
  590. width: 32px;
  591. bottom: 0;
  592. height: 16px;
  593. border-radius: 32px;
  594. z-index: 1;
  595. }
  596. }
  597.  
  598.  
  599. & > yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer:hover #content {
  600. opacity: 1.0 !important;
  601. }
  602.  
  603. & > yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer #content {
  604. transform-origin: 0 50%;
  605. opacity: final-message-opacity;
  606.  
  607. if line-height-min > 0 and min-content-text-height > 0 {
  608. --line-height-min: line-height-min;
  609. --line-height-adjust: (min-content-text-height * 2px);
  610. min-height: calc(var(--line-height-min) + var(--line-height-adjust));
  611. }
  612. }
  613.  
  614.  
  615. if message-opacity-ms > 0 {
  616.  
  617. & > yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer #content {
  618. animation: yt-live-chat-text-message-renderer-animation3 message-opacity-ms ease-in 0s 1 normal forwards;
  619. }
  620. }
  621.  
  622. if chat-author-vline-enable {
  623.  
  624.  
  625. & > yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer #content::before {
  626.  
  627. makeBoxShadow()
  628. margin-left: cb-ml;
  629. }
  630. }
  631.  
  632. --vline-color-1001: cc(#696969);
  633. --vline-color-1002: cc(#a9a9a9);
  634. --vline-color-1003: cc(#dcdcdc);
  635. --vline-color-1004: cc(#2f4f4f);
  636. --vline-color-1005: cc(#556b2f);
  637. --vline-color-1006: cc(#6b8e23);
  638. --vline-color-1007: cc(#a0522d);
  639. --vline-color-1008: cc(#228b22);
  640. --vline-color-1009: cc(#800000);
  641. --vline-color-1010: cc(#191970);
  642. --vline-color-1011: cc(#483d8b);
  643. --vline-color-1012: cc(#3cb371);
  644. --vline-color-1013: cc(#bc8f8f);
  645. --vline-color-1014: cc(#663399);
  646. --vline-color-1015: cc(#008080);
  647. --vline-color-1016: cc(#b8860b);
  648. --vline-color-1017: cc(#bdb76b);
  649. --vline-color-1018: cc(#4682b4);
  650. --vline-color-1019: cc(#000080);
  651. --vline-color-1020: cc(#d2691e);
  652. --vline-color-1021: cc(#9acd32);
  653. --vline-color-1022: cc(#20b2aa);
  654. --vline-color-1023: cc(#cd5c5c);
  655. --vline-color-1024: cc(#32cd32);
  656. --vline-color-1025: cc(#8fbc8f);
  657. --vline-color-1026: cc(#8b008b);
  658. --vline-color-1027: cc(#b03060);
  659. --vline-color-1028: cc(#d2b48c);
  660. --vline-color-1029: cc(#66cdaa);
  661. --vline-color-1030: cc(#ff0000);
  662. --vline-color-1031: cc(#ffa500);
  663. --vline-color-1032: cc(#ffd700);
  664. --vline-color-1033: cc(#ffff00);
  665. --vline-color-1034: cc(#c71585);
  666. --vline-color-1035: cc(#0000cd);
  667. --vline-color-1036: cc(#7fff00);
  668. --vline-color-1037: cc(#00ff00);
  669. --vline-color-1038: cc(#ba55d3);
  670. --vline-color-1039: cc(#00fa9a);
  671. --vline-color-1040: cc(#4169e1);
  672. --vline-color-1041: cc(#e9967a);
  673. --vline-color-1042: cc(#dc143c);
  674. --vline-color-1043: cc(#00ffff);
  675. --vline-color-1044: cc(#00bfff);
  676. --vline-color-1045: cc(#f4a460);
  677. --vline-color-1046: cc(#9370db);
  678. --vline-color-1047: cc(#0000ff);
  679. --vline-color-1048: cc(#a020f0);
  680. --vline-color-1049: cc(#ff6347);
  681. --vline-color-1050: cc(#d8bfd8);
  682. --vline-color-1051: cc(#ff00ff);
  683. --vline-color-1052: cc(#db7093);
  684. --vline-color-1053: cc(#f0e68c);
  685. --vline-color-1054: cc(#6495ed);
  686. --vline-color-1055: cc(#dda0dd);
  687. --vline-color-1056: cc(#87ceeb);
  688. --vline-color-1057: cc(#ff1493);
  689. --vline-color-1058: cc(#afeeee);
  690. --vline-color-1059: cc(#ee82ee);
  691. --vline-color-1060: cc(#98fb98);
  692. --vline-color-1061: cc(#7fffd4);
  693. --vline-color-1062: cc(#ff69b4);
  694. --vline-color-1063: cc(#ffe4c4);
  695. --vline-color-1064: cc(#ffb6c1);
  696.  
  697.  
  698.  
  699. --author-color-1-default: var(--vline-color-1064);
  700.  
  701. & > .yt-live-chat-item-list-renderer {
  702.  
  703.  
  704.  
  705.  
  706. & {
  707. --author-color-1: var(--author-color-1-default);
  708. --author-color-2: var(--author-color-1-default);
  709. }
  710.  
  711. gen1()
  712. }
  713.  
  714. }
  715.  
  716.  
  717.  
  718. @supports (contain: layout paint style) {
  719.  
  720. /*
  721. contain: layout paint style;
  722. // #item-offset uses transform, it is buggy in Opera 93.0 with contain: layout & paint
  723. */
  724.  
  725. #items.style-scope.yt-live-chat-item-list-renderer{
  726. contain: layout paint style;
  727. }
  728.  
  729. #item-offset.style-scope.yt-live-chat-item-list-renderer {
  730. contain: style;
  731. }
  732.  
  733. #item-scroller.style-scope.yt-live-chat-item-list-renderer {
  734. contain: size style;
  735. }
  736.  
  737. #contents.style-scope.yt-live-chat-item-list-renderer,
  738. #chat.style-scope.yt-live-chat-renderer,
  739. img.style-scope.yt-img-shadow[width][height] {
  740. contain: size layout paint style;
  741. }
  742.  
  743. .style-scope.yt-live-chat-ticker-renderer[role="button"][aria-label],
  744. .style-scope.yt-live-chat-ticker-renderer[role="button"][aria-label]>#container {
  745. contain: layout paint style;
  746. }
  747.  
  748.  
  749. yt-img-shadow#author-photo.style-scope {
  750. contain: layout paint style;
  751. content-visibility: auto;
  752. contain-intrinsic-size: 24px 24px;
  753. }
  754.  
  755. yt-live-chat-text-message-renderer:not([author-is-owner]) #author-photo.style-scope.yt-live-chat-text-message-renderer,
  756. yt-live-chat-text-message-renderer:not([author-is-owner]) yt-live-chat-author-chip.style-scope.yt-live-chat-text-message-renderer {
  757. pointer-events: var(--tabview-msg-pointer-events);
  758. }
  759.  
  760. yt-live-chat-text-message-renderer:not([author-is-owner]) span#message.style-scope.yt-live-chat-text-message-renderer>img.emoji.yt-formatted-string.style-scope.yt-live-chat-text-message-renderer {
  761. cursor: var(--tabview-msg-cursor);
  762. }
  763.  
  764.  
  765. yt-live-chat-text-message-renderer:not([author-is-owner]) span#message.style-scope.yt-live-chat-text-message-renderer,
  766. yt-live-chat-paid-message-renderer #message.yt-live-chat-paid-message-renderer,
  767. yt-live-chat-text-message-renderer:not([author-is-owner]) #timestamp.style-scope.yt-live-chat-text-message-renderer,
  768. yt-live-chat-membership-item-renderer #header-content.style-scope.yt-live-chat-membership-item-renderer,
  769. yt-live-chat-membership-item-renderer #timestamp.style-scope.yt-live-chat-membership-item-renderer,
  770. yt-live-chat-paid-message-renderer #header-content.yt-live-chat-paid-message-renderer,
  771. yt-live-chat-paid-message-renderer #timestamp.style-scope.yt-live-chat-paid-message-renderer,
  772. yt-live-chat-paid-sticker-renderer #content.style-scope.yt-live-chat-paid-sticker-renderer,
  773. yt-live-chat-paid-sticker-renderer #timestamp.style-scope.yt-live-chat-paid-sticker-renderer {
  774. cursor: var(--tabview-msg-cursor);
  775. pointer-events: var(--tabview-msg-pointer-events);
  776. }
  777.  
  778. yt-live-chat-text-message-renderer.style-scope.yt-live-chat-item-list-renderer,
  779. yt-live-chat-membership-item-renderer.style-scope.yt-live-chat-item-list-renderer,
  780. yt-live-chat-paid-message-renderer.style-scope.yt-live-chat-item-list-renderer,
  781. yt-live-chat-banner-manager.style-scope.yt-live-chat-item-list-renderer {
  782. contain: layout style;
  783. }
  784.  
  785. tp-yt-paper-tooltip[style*="inset"][role="tooltip"] {
  786. contain: layout paint style;
  787. }
  788.  
  789. }
  790.  
  791. #item-offset.style-scope.yt-live-chat-item-list-renderer {
  792.  
  793. position: relative !important;
  794. height: auto !important;
  795.  
  796. }
  797.  
  798. #item-offset.style-scope.yt-live-chat-item-list-renderer > #items.style-scope.yt-live-chat-item-list-renderer {
  799. position: static !important;
  800. }
  801.  
  802.  
  803. #sticker #img[width][height] {
  804.  
  805. max-width: var( --sticker-width);
  806. max-height: var( --sticker-height);
  807.  
  808. }
  809.  
  810.  
  811. if enable-smaller-super-chat {
  812.  
  813. yt-live-chat-paid-sticker-renderer.yt-live-chat-item-list-renderer #sticker.yt-live-chat-paid-sticker-renderer #img[width="144"][height="144"] {
  814.  
  815. /* two row height */
  816. --sticker-width: 8em;
  817. --sticker-height: 8em;
  818.  
  819. }
  820.  
  821. }
  822.  
  823. html {
  824. --author-chip-child-order: author-chip-default-order;
  825. }
  826.  
  827. #prepend-chat-badges {
  828. --author-chip-child-order: author-chip-pre-badge-order;
  829. }
  830.  
  831. #author-name {
  832. --author-chip-child-order: author-chip-author-name-order;
  833. }
  834. #chat-badges {
  835. --author-chip-child-order: author-chip-member-badge-order;
  836. }
  837.  
  838. yt-live-chat-author-chip.yt-live-chat-text-message-renderer > .yt-live-chat-author-chip {
  839. order: var(--author-chip-child-order);
  840. }
  841.  
  842.  
  843. if ( author-chip-member-badge-at > -1px ) {
  844.  
  845. yt-live-chat-author-chip.yt-live-chat-text-message-renderer > #chat-badges.yt-live-chat-author-chip:not(:empty) {
  846. align-self: flex-start;
  847. padding-top: author-chip-member-badge-at;
  848. display: inline-block;
  849. }
  850.  
  851. }
  852.  
  853. if ( author-chip-member-badge-order < max(author-chip-pre-badge-order, author-chip-author-name-order, author-chip-default-order) ) {
  854.  
  855. yt-live-chat-author-chip.yt-live-chat-text-message-renderer > yt-live-chat-author-badge-renderer.yt-live-chat-author-chip {
  856. margin: 0 0 0 0;
  857. }
  858.  
  859. yt-live-chat-author-chip.yt-live-chat-text-message-renderer {
  860. column-gap: 2px;
  861. }
  862.  
  863. }
  864.  
  865. if ( author-chip-member-badge-mw > 0px) {
  866.  
  867. yt-live-chat-author-chip.yt-live-chat-text-message-renderer > #chat-badges {
  868. min-width: author-chip-member-badge-mw;
  869. text-align: center;
  870. }
  871.  
  872. yt-live-chat-author-chip.yt-live-chat-text-message-renderer > #author-name.owner ~ #chat-badges:empty {
  873. min-width: initial;
  874. }
  875.  
  876. }
  877.  
  878.  
  879. if ( author-chip-member-badge-mh > 0px) {
  880.  
  881. #chat-badges.yt-live-chat-author-chip yt-live-chat-author-badge-renderer #image img {
  882. min-height: author-chip-member-badge-mh;
  883. }
  884.  
  885. }
  886.  
  887. }