Custom CSS for overlays
Restyle any overlay widget, Goose Quest cards first, with your own CSS. How it is scoped, what is refused and the class names you can use.
Live and chatLast updated
Every widget in an Overlay studio scene can carry its own CSS. Use it for what the Style tab does not offer: a neon edge on Goose Quest cards, a bigger title, a font from your brand, a hidden goose. The CSS reaches only the widget it belongs to, and the studio stage draws it exactly as OBS does.
Add CSS to a widget#
- In Overlay studio, select the widget and open Style.
- Type or paste into Custom CSS. Anything that would be refused is listed under the box as you type, with the reason.
- Choose Apply, or press Ctrl and Enter (Cmd and Enter on a Mac). The stage changes at once, and the studio saves it with the rest of the scene, so your OBS source follows a moment later.
- To go back to the built in look, choose Reset to default.
Each Apply and each reset is one step that undo (Cmd or Ctrl and Z) can take back. A widget's CSS goes with it into every scene that uses it, and into a widget or scene file you export (alerts and Goose Quest are linked in those files, so their CSS stays with your account). Sound alerts draw nothing, so they have no Custom CSS box.
Keep CSS in a saved look#
When you save a look from the Style tab, tick Keep this widget's custom CSS in the look to take the CSS with it. Using that look on another widget from the Style tab applies the CSS too, as one undo step. Its tile shows CSS. A look can hold a widget's full 10,000 characters of CSS. In the rare case that CSS has so many quotes, backslashes or line breaks that it passes the look size limit once saved, it stays on the widget. CSS written for one kind's classes, such as .bs-timer-clock, does nothing on another kind, so Bearsong warns you when you apply it to a different kind. Applying a look or theme pack to a whole scene leaves every widget's CSS as it is.
How scoping works#
Bearsong rewrites every selector so it starts at the widget's root element. You write .gq-card, and the overlay uses [data-bs-widget="your widget id"] .gq-card. So:
- A rule can never reach another widget in the scene, the page around it, or OBS itself.
:root,:host,html,bodyand a leading&all mean the widget root, so:root { --gq-accent: gold; }sets a property for the whole widget.- A selector that would reach past the root is left out: one that starts at the root and then picks its siblings (
:root ~ *,:root + *), or a list hidden in:host(.a, .b). Siblings inside the widget, such as.gq-slot + .gq-slot, are fine. - Inside
:is(),:where()and:not(), describe the element itself (.gq-card:not(.gq-card--empty, :hover)), not where it sits: an argument with a space or>,~or+in it, such as:is(.page *), would look at the page around the widget, so the rule is left out.:has()may look down the widget (:has(.gq-art img),:has(> .gq-badge)) but not at its siblings (:has(~ *)), and:nth-child()takes a number pattern such as2n + 1, notof. view-transition-nameandview-transition-classare left out, because those names are shared by the whole page.- Nested rules are written out flat, so they work in the older browser inside OBS too. In a nested rule,
&is allowed only at the start (&:hover,& > .gq-art); a rule with&anywhere else, such as:not(&), is left out. @media,@supports,@containerand@layerblocks are kept, with the rules inside them scoped the same way.@font-faceis kept, and its family is given a name of the widget's own, the same way as keyframes. Write the family as usual infont-family,fontor a custom property such as--gq-font, and it is renamed to match, so a face can never replace a font the page around the widget uses. Font files must come from anhttps://link.@keyframesnames are made unique to the widget, and youranimationandanimation-namevalues are renamed to match. Names you did not define, such as the cards' owngq-in, are left alone, so you can reuse them.- Other at rules (
@charset,@namespace,@page,@property) are left out.
Your CSS is added after the widget's own styles, so a rule with the same selector wins. Some built in settings, such as Style tab colours and sizes, are drawn on the element itself; add !important to override those. The same goes for clipping: most widgets cut off anything that reaches past their box, so a decoration drawn outside it, such as tape across the top edge, needs overflow: visible !important on the widget's box (for example .bs-timer). The scene's own edges still clip, so leave room between the widget and the edge of the scene. The widget's position and size come from the scene, so change them in the studio, not in CSS.
What is refused and why#
A save is refused, with a message saying which rule it broke, when the CSS:
| Contains | Why |
|---|---|
| More than 10,000 characters | Keeps overlays quick to load in OBS. |
@import | It would load a style sheet from somewhere else. Paste the rules in instead. |
</ | It could end the style early and add something that is not CSS. |
javascript: | A script link has no place in a style. |
expression( | An old Internet Explorer feature that runs script. |
behavior: or -moz-binding | Old features that attach script to a page. |
url( with anything but an https: link or a data:image/ picture | Plain http links, links without a scheme and other data types are not loaded. |
image-set( or src( | They take a link as a plain string, which the url( rule cannot check. Use url( with an https: link. |
The checks read the CSS the way a browser does: comments are ignored and escapes such as \40 are decoded first, so a word cannot be hidden by splitting or escaping it. A refused save is never drawn, in the studio or in OBS.
Goose Quest hooks#
The Goose Quest cards keep these class names and attributes stable, so CSS written against them keeps working.
| Hook | What it is |
|---|---|
.gq | The whole overlay. Carries data-theme (dark or light) and data-facing (left or right, the way the goose faces). |
.gq-stack | The column of cards. Carries data-position (top-left, top-right, bottom-left, bottom-right). |
.gq-slot | One place in the stack. Has data-leaving while its card leaves. |
.gq-card | One card. data-gq says which: spawn, result, boss, hot-streak or tier-up. A catch also carries data-rarity, and data-art is on or off. |
.gq-card::before | The accent rail on the left edge. |
.gq-art | The goose picture tile. |
.gq-body | The words beside the goose. |
.gq-eyebrow | The small line above the title, such as "Boss fight". |
.gq-title | The big line. |
.gq-line | The details under the title. |
.gq-pill | The rarity badge on a catch. |
.gq-timer | A countdown (spawn and boss). |
.gq-track and .gq-fill | The boss health bar and its fill. |
.gq-tier-ups | The group that holds tier up cards, also [data-gq="tier-ups"]. Set gap to change the space between them. |
Custom properties#
Set these on :root (the widget) to change every card, or on one card type, such as [data-gq="boss"]. None has a default of its own, so whichever you set wins over the light or dark card theme.
| Property | Changes |
|---|---|
--gq-accent | The rail and rarity badge colour (otherwise it follows the moment, rarity or boss health). |
--gq-card-bg | The card background. |
--gq-text | The title and main text colour. |
--gq-muted | The eyebrow and detail colour. |
--gq-edge | The card border colour. |
--gq-art-bg | The goose tile background. |
--gq-radius | The card corner radius. |
--gq-font | The font family. |
--gq-title-size | The title size. |
Examples#
A rounded neon card:
:root {
--gq-accent: #ff4fd8;
--gq-card-bg: rgba(10, 4, 30, 0.92);
--gq-edge: #ff4fd8;
--gq-radius: 28px;
}
.gq-card {
box-shadow: 0 0 24px #ff4fd8, inset 0 0 12px rgba(255, 79, 216, 0.35);
}
Hide the goose art and let the words fill the card:
.gq-art {
display: none;
}
.gq-card {
grid-template-columns: minmax(0, 1fr);
}
Turn the goose to face right on boss fights only (the Goose faces setting turns it on every card):
[data-gq="boss"] .gq-art img {
transform: scaleX(-1);
}
A bigger title on boss fights only, in your own font:
@font-face {
font-family: "Stream Display";
src: url("https://example.com/fonts/stream-display.woff2") format("woff2");
}
[data-gq="boss"] {
--gq-title-size: 56px;
--gq-font: "Stream Display", Inter, sans-serif;
}
Hooks on every widget#
Every widget root has the class bs-widget and two attributes: data-bs-widget (its id) and data-bs-widget-type (its kind, such as timer, goal, tally, chat_box or stream_alerts). Write :root for the root in your own widget's CSS. Inside, these widgets have class names you can use:
| Widget | Classes |
|---|---|
| Timer | .bs-timer, .bs-timer-label, .bs-timer-clock, .bs-timer-elapsed (the stream clock), .bs-timer-change-message (who added time), .bs-timer-caption |
| Goal bar | .bs-goal, .bs-goal-head, .bs-goal-title, .bs-goal-track, .bs-goal-fill, .bs-goal-count |
| Counter display | .bs-tally, .bs-tally-label, .bs-tally-value |
| Chat box | .bs-chat-message (with data-chat-id), .bs-chat-name |
| Alerts | .bs-alert (with data-alert-kind, such as follow), .bs-alert-image, .bs-alert-icon, .bs-alert-text |
For example, a timer with spaced out digits and a glow:
.bs-timer-clock {
letter-spacing: 0.08em;
text-shadow: 0 0 18px rgba(94, 227, 207, 0.8);
}
When time is added to or removed from a timer, .bs-timer-clock carries data-change="up" or data-change="down" for 0.7 seconds, as well as playing any animation picked on the Motion tab (Time added and Time removed). For example, a green flash when time is added:
.bs-timer-clock[data-change='up'] {
color: #4ade80 !important;
}
Other widgets can still be styled through :root and element selectors such as :root img. See Overlay widgets and theme packs for what each widget does.