Created
July 13, 2021 03:04
-
-
Save eai04191/943e0821fb7960b94da82b6537cd4d40 to your computer and use it in GitHub Desktop.
streamlabs chat box, clean theme custom style. https://i.imgur.com/JxDbf6D.png
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@800&display=swap" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@800&display=swap" rel="stylesheet"> | |
<!-- item will be appened to this layout --> | |
<div id="log" class="sl__chat__layout"> | |
</div> | |
<!-- chat item --> | |
<script type="text/template" id="chatlist_item"> | |
<div data-from="{from}" data-id="{messageId}"> | |
<span class="meta" style="color: {color}"> | |
<span class="badges"> | |
</span> | |
<span class="name">{from}</span> | |
</span> | |
<span class="message"> | |
{message} | |
</span> | |
</div> | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--font_size: {font_size}; | |
--background_color: {background_color}; | |
--text_color: {text_color}; | |
--message_hide_delay: {message_hide_delay}; | |
} | |
*, | |
*:before, | |
*:after { | |
box-sizing: border-box; | |
} | |
html, | |
body { | |
height: 100%; | |
overflow: hidden; | |
} | |
body { | |
/* background: var(--background_color); */ | |
background: transparent; | |
font-family: "Nunito", "M PLUS Rounded 1c", sans-serif; | |
font-weight: 700; | |
font-size: var(--font_size); | |
line-height: 1.5em; | |
color: var(--text_color); | |
} | |
#log > div { | |
animation: slideInUp .3s ease forwards, fadeOut 0.5s ease var(--message_hide_delay) forwards; | |
} | |
#log { | |
display: table; | |
position: absolute; | |
bottom: 0; | |
left: 0; | |
padding: 0; | |
width: 100%; | |
table-layout: fixed; | |
} | |
#log > div { | |
display: table-row; | |
} | |
#log > div.deleted { | |
visibility: hidden; | |
} | |
.message, | |
.meta { | |
vertical-align: top; | |
display: table-cell; | |
padding-bottom: 0.1em; | |
} | |
.message { | |
filter: drop-shadow(0 0 1.5px black) drop-shadow(0 1px 0 hsla(0, 0%, 0%, .75)); | |
} | |
.meta .name { | |
filter: drop-shadow(0 0 1px hsla(0, 0%, 0%, .75)) drop-shadow(0 1px 0 hsla(0, 0%, 0%, .75)); | |
} | |
.meta { | |
width: 35%; | |
text-align: right; | |
padding-right: 0.5em; | |
white-space: nowrap; | |
text-overflow: ellipsis; | |
overflow: hidden; | |
} | |
.badges { | |
margin-right: -.3em; | |
} | |
.badge { | |
display: inline-block; | |
margin-right: 0.2em; | |
position: relative; | |
height: 0.9em; | |
vertical-align: middle; | |
top: -0.075em; | |
filter: drop-shadow(0 1px .5px black); | |
} | |
.badge:last-of-type { | |
// margin-right: 0; | |
} | |
.message { | |
word-wrap: break-word; | |
width: 65%; | |
} | |
#log .emote { | |
background-repeat: no-repeat; | |
background-position: center; | |
background-size: contain; | |
padding: 0.4em 0.2em; | |
position: relative; | |
} | |
#log .emote img { | |
display: inline-block; | |
height: 1em; | |
opacity: 0; | |
} | |
/* | |
名前の色 | |
*/ | |
.meta .name { | |
color: hsl(22, 100%, 90%); | |
} | |
div[data-from='valtam1919'] .meta .name { | |
color: hsl(0, 100%, 60%); | |
} | |
div[data-from='eai_stream'] .meta .name { | |
color: hsl(44, 100%, 62%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment