Question / Help How can I use CSS file to change Streamlabs Chat Box font in Browser Source?

vgr

New Member
So I have the obs-linuxbrowser plugin installed and the Streamlabs Chat Box overlay is working fine. I want to use a CSS file to change the font for the chat box, and I want it to be a font installed locally on my computer. I have zero knowledge of CSS, however. I have done Google searches, and I tried using @font-face to define the font and then the body{} stuff to set it, but I can't seem to get it to work.

The font is installed in my ~/.fonts directory, not system-wide, so I don't know if that affects it at all. But I'm just clueless.
 

viccallan

New Member
In your Streamlabs it's self you can define the fonts you want using CSS.
- on the chat box page in the streamlabs dashboard
- scroll to the bottom
-- CSS - Here is mine you can change it as you need. This is the easiest way. It will let you see the preview as you change it.

CSS:
@import url("https://fonts.googleapis.com/css?family=Nothing You Could Do");
@import url("https://fonts.googleapis.com/css?family=Average Sans");
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    text-shadow: 0 0 1px #000, 0 0 2px #000;
    background: {background_color};
    font-family: 'Average Sans';
    font-weight: 700;
    font-size: {font_size};
    line-height: 1.5em;
    color: {text_color};
}

#log>div {
    animation: fadeInRight .3s ease forwards, fadeOut 0.5s ease {message_hide_delay} forwards;
    -webkit-animation: fadeInRight .3s ease forwards, fadeOut 0.5s ease {message_hide_delay} forwards;
}

.colon {
    display: none;
}

#log {
    display: table;
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0 10px 10px;
    width: 100%;
    table-layout: fixed;
}

#log>div {
    display: table-row;
}

#log>div.deleted {
    visibility: hidden;
}

#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;
}

#log .message,#log .meta {
    vertical-align: top;
    display: table-cell;
    padding-bottom: 0.1em;
}

#log .meta {
    width: 35%;
    text-align: right;
    padding-right: 0.5em;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

#log .message {
    word-wrap: break-word;
    width: 65%;
}

.badge {
    display: inline-block;
    margin-right: 0.2em;
    position: relative;
    height: 1em;
    vertical-align: middle;
    top: -0.1em;
}

.name {
    font-family: "Nothing You Could Do";
    margin-left: 0.2em;
}

If I have any luck with the CSS inside OBS I will let you know.
HTH
 
Top