This page describes the Outpost-hosted Typesense search popup. For turning search on, building collections, and configuring result labels, see Typesense Integration.
How the popup gets its styles
Outpost injects a<style> block into the page at runtime and sets every value through a --ts-* custom property on the popup’s root element:
--ts-highlight and --ts-tab-active-bg are both set to your Ghost accent color, and --ts-font is your Ghost theme font. Changing your accent color in Ghost changes the search popup with it.
If you ever see a #0040ff blue or Inter where you expected your own brand, Outpost could not read your Ghost settings and fell back to its defaults. That is a connection problem, not a styling one.
The specificity rule
Outpost appends its<style> block to <head> at runtime, after your theme’s stylesheets are already parsed. Position in the document decides ties, not load time, so a slow theme stylesheet still wins nothing. A rule with the same specificity as Outpost’s will lose.
.outpost-typesense-popup:
CSS variables
Set on.outpost-typesense-popup. The “Set by” column shows where the default comes from.
“Color mode” means the value comes from the light or dark palette, chosen by the Color mode setting on the Default display tab. Auto reads your Ghost theme’s background color, and falls back to the light palette whenever Ghost does not report one, which is the common case. Set Color mode to Light or Dark explicitly if you want a predictable starting point to override.
Class hooks
Popup structure
Both close buttons are empty in the markup and draw their glyph with
content: "\2715" on a ::before pseudo-element. To change the icon, override the pseudo-element rather than the button.
A single result
Result titles are
<h1> elements. Your theme’s own h1 rules will apply for every property Outpost does not set, including font-weight, line-height, margin-top, and letter-spacing. This is the most common reason results look wrong in one theme and fine in another.data-type is post, page, author, or tag. Outpost already renders the author and tag badges in the muted metadata color; only post and page badges use the accent. data-name lets you style one tag differently:
Classes from InstantSearch
The popup is built on InstantSearch, which supplies.ais-SearchBox-input, .ais-Hits-item, .ais-Pagination-*, .ais-Highlight-highlighted, and .ais-Snippet-highlighted. Its stylesheet is loaded from a public CDN before Outpost’s own block, which is worth knowing if you run a strict content security policy. These classes work, but they belong to that library rather than to Outpost and can change when it is upgraded. Prefer the --ts-* variables and .typesense-* classes where both are available.
Five things that will catch you out
1. The tab list is moved out of the panel
.tabs starts inside .typesense-search-panel, and Outpost then moves it into .outpost-typesense-tabs-nav-slot so it can stay fixed above the scrolling results. This happens in both popup and embed mode. By the time your CSS applies, the tab list is no longer a descendant of the panel, and a selector rooted there silently matches nothing:
2. Setting a color on a parent does not recolor the badges
.typesense-hit-type, .typesense-hit-tag-primary, .typesense-hit-date, and .typesense-hit-excerpt each set their own color. An element’s own color always beats a color inherited from an ancestor, no matter how specific that ancestor’s rule is.
3. Some values are inline styles, so only !important beats them
The result template writes a few styles directly onto elements. Inline styles outrank any stylesheet rule, so these need !important:
font-size: 20pxon.typesense-hit-titledisplay: flex; flex-direction: row; gap: 1emon the row holding the thumbnail and textmax-width: 90pxon the thumbnail wrapper, which is an unclasseddivyou can only reach structurally, as in.typesense-hit div > a > img
display, so giving the active panel display: grid needs !important too.
4. A single-collection site hides every .tabs element on the page
When a site has only one collection there are no tabs to show, and Outpost ships a rule to hide them:
.tabs for a component of its own, that component will disappear on every page once search loads. Rename your class, or scope your own rule more specifically and mark it !important.
5. Embed mode has none of these variables
If search is configured to render inline on a page rather than as a popup, Outpost moves.outpost-typesense-content into your container. It is then no longer inside .outpost-typesense-popup, which is the only element the --ts-* variables are declared on. Every variable becomes undefined, and every rule Outpost scopes to .outpost-typesense-popup, including the whole mobile layout, stops matching.
For embed mode, declare the variables on your own container:
Check your contrast
The accent fails in both directions: it is used as text on the badges and tags, and as the fill behind the selected tab’s fixed white label. If your accent color is light, darken--ts-highlight so badges and tags stay readable, and set --ts-tab-active-text to a dark color so it holds up against the still-light tab fill:
--ts-text.
If your popup can render in dark mode, check your replacement against both backgrounds. The dark palette’s background is
#1a1f2e, where #567f18 drops to about 3:1. Either pick a value that clears 4.5:1 on both, or scope separate overrides to each color mode.Where to put the CSS
- Your theme stylesheet, if you build the theme yourself. Keep the rules in one clearly named block so they survive future theme updates.
- Ghost code injection, under Settings → Code injection → Site header in Ghost admin, wrapped in a
<style>tag. Use this when you do not control the theme source.
FAQ
Why is my CSS being ignored?
Why is my CSS being ignored?
Outpost’s styles load after your theme’s, so a rule with the same specificity loses the tie. Add a parent element to your selector, for example
.typesense-hit .typesense-hit-type instead of .typesense-hit-type. Overriding the --ts-* variables on #typesense-search-popup.outpost-typesense-popup avoids the problem. If the value you are fighting is an inline style, such as the result title’s font size, you need !important.Can I change the search colors in Outpost instead of in CSS?
Can I change the search colors in Outpost instead of in CSS?
Not yet, beyond choosing Light, Dark, or Auto under Default display. The accent color comes from your Ghost accent color, and the remaining colors come from the fixed light and dark palettes. Theme CSS is the way to change them today.
Why are my search result badges hard to read?
Why are my search result badges hard to read?
Post and page badges use your Ghost accent color. If that color is light, it will not have enough contrast on a white background. Either darken your Ghost accent color, which changes your whole site, or override
--ts-highlight for the popup only. Author and tag badges are unaffected, as they already use the muted metadata color.Why did my tab styling stop working?
Why did my tab styling stop working?
Outpost moves the tab list into
.outpost-typesense-tabs-nav-slot so it can stay fixed above the results. If your selector expects .tabs to sit inside .typesense-search-panel, it no longer matches. Target the slot, or override --ts-tab-active-bg and --ts-tab-active-text instead.A component in my theme disappeared after search loaded. Why?
A component in my theme disappeared after search loaded. Why?
If your site runs a single collection, Outpost hides the tab bar with an unscoped
.tabs { display: none !important } rule, which also hides any element of your own that uses the tabs class. Rename your class, or scope your own rule more specifically and mark it !important.Do these class names change between releases?
Do these class names change between releases?
The
--ts-* variables and the .outpost-typesense-* and .typesense-* classes are the intended styling surface and are kept stable. The .tabs, .tab, and .sel classes come from the tab library Outpost bundles, and the .ais-* classes from InstantSearch. Both can change when those libraries are upgraded.Related resources
Typesense Integration
Turn on search, build collections, and configure result labels.
Ghost Theme Integration
Add the Outpost script and integration partials to your theme.
Contact Support
Contact the Outpost team for help with search styling.

