Advertisement
EvilAsh25

Streamchat

Aug 23rd, 2021
1,631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.87 KB | None | 0 0
  1. /* Dynamically scaling chat
  2.  * For use with https://nightdev.com/kapchat/
  3.  *
  4.  * Main file – full replace.
  5.  * This should override all CSS in the default clear theme.
  6.  */
  7. html {
  8.     font-size: 17px;
  9.     /* Everything scales with this font-size.
  10.      * Default if not manually set is 16px.    
  11.      * Common values are 20px, 24px, 36px 48px.
  12.      * Usage of `em` in font-size refers to the parent's font-size as 1em.
  13.      * Usage of `rem` refers to the root em value ( this ) instead.
  14.      * Use `rem` when scaling child objects where possible.
  15.      *
  16.      * You could potentially just use em values here
  17.      * if you only cared about "scale" and not about exact font values.
  18.      * For example, 2.0em would be 200% scale on everything,
  19.      * but is the same as setting it to 32px ( 16px base. )
  20.      */  
  21.     width: 100%;
  22.     height: 100%;
  23. }
  24. body {
  25.     overflow: hidden;
  26.     margin: 0.313rem;
  27. }
  28. #chat_box {
  29.     background-color: black;
  30.     font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  31.     /* This font-size changes all child element em bases
  32.      * to 0.813 of the root, and is the reason why
  33.      * we use `rem` everywhere.
  34.      * Otherwise everything in the lines themselves
  35.      * would scale at only 81% of native.
  36.      */
  37.     font-size: 0.813rem;
  38.     font-style: normal;
  39.     font-variant: normal;
  40.     font-weight: bold;
  41.     position: absolute;
  42.     overflow: hidden;
  43.     color: #FFFFFF;
  44.     border-radius: 0.250rem;
  45.     width: calc(100% - 0.625rem);
  46. }
  47. #chat_box.dark {
  48.     background: rgba(0, 0, 0, 0.3);
  49.     color: #fff;
  50. }
  51. #chat_box.light {
  52.     background: rgba(255, 255, 255, 0.3);
  53.     color: #000;
  54. }
  55. .nick {
  56.     font-weight: bold;
  57. }
  58.  
  59. .tag {
  60.     display: inline-block;
  61.     text-indent: 1.313rem;
  62.     background-position: 0 center;
  63.     background-repeat: no-repeat;
  64.     background-size: contain;
  65.     display: inline-block;
  66.     vertical-align: bottom;
  67.     height: 1.125rem;
  68.     min-width: 1.125rem;
  69.     padding: 0;
  70.     margin-right: 0.188rem;
  71.     margin-bottom: -0.063rem;
  72.     text-indent: -624.938rem;
  73.     border-radius: 0.125rem;
  74.     -moz-border-radius: 0.125rem;
  75.     -webkit-border-radius: 0.125rem;
  76.     overflow: hidden;
  77.     /* Aligns with the vertical center of the line */
  78.     vertical-align: sub;
  79. }
  80.  
  81. /* default all badges to off */
  82. .tag {
  83.     display: none;
  84. }
  85. /* add back the badges I want */
  86. /* broadcaster badge */
  87. img[class*='broadcaster']{
  88.     display: inline-block;
  89. }
  90. /* moderator badge */
  91. img[class*='moderator']{
  92.     display: inline-block;
  93. }
  94. /* subscriber badges */
  95. img[class*='subscriber']{
  96.     display: inline-block;
  97. }
  98. /* founder badges */
  99. img[class*='founder']{
  100.     display: inline-block;
  101. }
  102. /* sub gifter badges */
  103. img[class*='sub-gifter']{
  104.     display: inline-block;
  105. }
  106. /* bits badges */
  107. img[class*='bits']{
  108.     display: inline-block;
  109. }
  110. /* vip badge */
  111. img[class*='vip']{
  112.     display: inline-block;
  113. }
  114.  
  115. /* remove bits charity badges */
  116. img[class*='bits-charity']{
  117.     display: none;
  118. }
  119.  
  120. .chat_line {
  121.     margin-left: 0.188rem;
  122.     margin-right: 0.188rem;
  123.     padding-top: 0rem;
  124.     padding-bottom: 0.04rem;
  125.     /* Avoids clipping by increasing line height */
  126.     line-height: 1.250rem;
  127. }
  128.  
  129. .chat_line > span {
  130.     /* Aligns all children with the vertical center of the line */
  131.     vertical-align: middle;
  132. }
  133. .chat_line .message {
  134.     word-wrap: break-word;
  135. }
  136.  
  137. .chat_line .time_stamp {
  138.     display: none;
  139.     padding-right: 0.188rem;
  140. }
  141. .emoticon {
  142.     margin-bottom: -0.438rem;
  143.     /* Min-width/height are enforced to some scale of 18x18.
  144.      * Max-height is set to compensate for srcset scaling,
  145.      * else larger scales produce giant emoticons with 3x img scale
  146.      */
  147.     #min-width:1.750rem;
  148.     #min-height:1.750rem;
  149.     max-height:1.750rem;
  150.     /* Aligns with the vertical center of the line */
  151.     vertical-align: sub;
  152. }
  153. .cheermote {
  154.     width: auto;
  155.     max-height: 1.750rem;
  156. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement