Skip to content

Custom CSS

Horde can inject arbitrary CSS over the running UI, similar to Jellyfin’s custom CSS box. The editor is hidden until you turn on Enable custom CSS under Settings → Appearance → Custom CSS (?tab=appearance). Edits apply immediately, persist in the server ui blob as customCss / custom_css plus customCssEnabled / custom_css_enabled, and are included when you Save theme.

You do not have to write the CSS yourself: Ask writes it from a description.

Why not an HTML element wiki?

A page that lists every DOM node, Tailwind class, and React wrapper would rot on the next layout tweak. Class names like bg-ink-900 exist because Tailwind generated them for this build; they are not a public API.

Instead Horde documents a small stable surface:

Kind Examples
CSS variables --accent, --on-accent, --ink-950 … --ink-600, --danger, --warning, --success
Page hook html[data-page="watch"]
Theme hook html[data-theme="oled"]
Landmark hooks [data-horde="nav"], [data-horde="video-card"]
Semantic classes .ui-panel, .ui-card, .ui-interactive, .page-shell

For one-off targeting, inspect the running page (browser DevTools). That is always accurate; a scraped HTML catalog is not.

When enabled, Settings includes a collapsed Selector reference next to the CSS box so you do not have to leave the app for the common hooks.

How injection works

  1. Boot reads horde.settings. If custom CSS is enabled, it writes a <style id="horde-custom-css"> in <head> before first paint.
  2. Edits update that tag as you type (same 300 ms server debounce as other UI keys).
  3. Empty CSS, or Enable custom CSS off, removes the tag. The source stays saved when the toggle is off.
  4. The stylesheet comes after built-in theme CSS, so your rules win at equal specificity. Raise specificity or use !important only when a built-in rule already does.

Cap: 64 000 characters. </style sequences are neutralized so the payload cannot break out of the style tag.

You can hide the UI

Custom CSS runs in your own account. A rule like * { display: none } will hide Settings too. Open Horde in a browser tab with ?nocss on the address (the installed app has no address bar; for example http://horde:8080/settings?nocss): custom CSS stays off in that tab, a notice says so, and you can fix or clear the box, then Turn it back on.

Let the assistant write it

Not a CSS person? Describe the change to Ask ("rounder video cards", "hide the channel sidebar"). It writes CSS against the variables and hooks below, and Preview puts it on the page for 20 seconds: Keep adds it to your stylesheet, Revert, Escape or waiting removes it. Larger models write much better CSS; see which model it uses.

CSS variables

Colors are space-separated RGB (no commas) so Tailwind utilities can do rgb(var(--accent) / 0.5).

:root {
  --ink-950: 8 9 12;      /* page background */
  --ink-900: 13 15 20;    /* panels / cards */
  --ink-800: 20 23 31;
  --ink-700: 28 33 43;    /* borders */
  --ink-600: 42 49 63;
  --accent: 34 211 238;
  --accent-soft: 103 232 249;
  --accent-deep: 8 145 178;
  --on-accent: 8 9 12;    /* text on accent fills */
  --danger: 248 113 113;  /* failures, destructive actions */
  --warning: 251 191 36;  /* waiting, held, warnings */
  --success: 52 211 153;  /* done, connected */
  --font-sans: Inter, system-ui, sans-serif;
}

When panel transparency is above 0%, --ui-panel-alpha and --ui-panel-blur also apply. With panel tint enabled, --ui-panel-tint and --ui-panel-tint-mix mix a color into those fills.

data-page values

Set on <html> from the current route:

data-page Route
home /
watch /watch, /watch/:id
settings /settings
history /history
download /download
import /import (and legacy /review)
playlists /playlists (including ?open= and legacy /playlists/:id redirects)
other anything else

Example: hide the top bar only while watching:

html[data-page="watch"] [data-horde="nav"] {
  background: transparent;
}

Landmark data-horde attributes

Attribute Element
nav Top navigation <header>. With panel transparency on, its blur is on [data-horde="nav"]::before (set backdrop-filter there), not the header itself
main Centered page <main>
tab-bar Floating tab bar of the installed app on a phone (<nav>)
sidebar Library channel sidebar rail
channel-list Channel list inside the sidebar
background Background effect canvas or custom image
video-card Library video card
feed-card Channel-feed card
page-scroll Document overlay scroll thumb (hover/scroll, no native track)
custom-css The injected <style> tag itself

Semantic classes already used by motion/transparency: .ui-panel, .ui-panel-legible, .ui-card, .ui-interactive, .page-shell, .horde-scrollbar, .horde-meta-scrollbar, .horde-overlay-scroll-thumb.

Examples

Warm accent over any built-in palette:

:root {
  --accent: 255 120 40;
  --accent-soft: 255 170 110;
  --accent-deep: 200 80 20;
}

--on-accent is the text color on accent fills (primary buttons, count pills). Dark themes use the page background; light, frozen and mocha use a dark ink. If you set a much lighter or darker --accent, set --on-accent to whichever of a near-black or white reads on it.

--danger, --warning and --success are the status text colors (errors, queued or held states, success). Each theme tunes them to stay readable on its surfaces (light themes use deep red, brown and green); if you change the --ink-* surfaces a lot, check them too.

Rounder library cards:

[data-horde="video-card"],
[data-horde="feed-card"] {
  border-radius: 1.25rem;
}

Custom CSS cannot load anything from another site. When you save, Horde removes @import rules and replaces with none every url(), image-set(), image(), cross-fade() or src() that points elsewhere (a scheme such as https:, or a //host prefix), that is malformed, or that takes its address from var(), env() or attr(). data: URLs and same-origin paths such as an uploaded background (url(/api/backgrounds/...)) keep working. To use another typeface, add it under Appearance → Fonts instead of importing it.

Saved themes

Save theme snapshots customCss and customCssEnabled with colors, background, font, and chrome. Applying a preset restores that CSS and the enable flag. Snapshots saved before these fields existed have empty CSS (and will clear the box when applied); a snapshot with CSS but no enable flag is treated as enabled.

See also