Code injection
Restyle any part of Ventura with a few lines of CSS in Ghost's Code injection: the stable handles, the theme's own colour variables, rules for one colour scheme or one kind of page, and what to leave alone.
Ventura labels the parts of every page with stable names, so you can restyle it from Ghost Admin without editing the theme, and without your changes breaking at the next update.
You need a little CSS. If you have never written any, the copy-paste rules on the snippets page are the place to start.
Custom fonts
Pick any font and copy the code. Nothing to edit.
Hook reference
Every handle Ventura ships, in lookup tables.
Common snippets
Ready-made CSS for the things people ask for most.
Where to paste it
Go to Settings → Code injection.
Put CSS in Site header, wrapped in a <style> tag.
Save, then reload your site with Cmd/Ctrl + Shift + R.
<style>
[data-region="masthead"] [data-part="logo"] { height: 56px; }
</style>In Ghost Admin

On your site: the logo at 56px

Site header is for CSS
A <style> tag belongs in Site header. Ventura never asks you to paste HTML: everything it builds from your own content (the newsletter hero's copy, the Topics section, the membership band's proof row, the join page's questions) comes from pages you publish, so the Site footer box stays free for analytics and the like.
The naming convention
Four attributes, and you can usually guess a handle rather than look it up.
| Attribute | Means | How many per page | Examples |
|---|---|---|---|
data-region | A large area | About one each | site-header, home-feed, post-body, site-footer |
data-component | A repeating unit | Many | post-card, tag-tile, pagination, membership-band |
data-variant | A flavour of the unit it sits on | Follows its host | grid, list, immersive, prev, next |
data-part | A piece inside | Many | title, kicker, excerpt, image, logo |
They compose from the outside in:
[data-region="home-feed"] [data-component="post-card"][data-variant="grid"] [data-part="title"] { … }Using the theme's own colours
Ventura's colours are variables with a light and a dark value each, so a rule that uses them follows your accent colour and the reader's colour scheme.
| Variable | What it is |
|---|---|
--vt-canvas | The page ground, a soft grey |
--vt-surface | Cards, panels and the header, white |
--vt-subtle | Tinted panels: the Topics band, chips, the picks box |
--vt-line, --vt-line-strong | Hairlines and card edges; the darker border on controls |
--vt-ink | The main text colour |
--vt-muted | Quieter text |
--vt-accent | Your accent colour, as a fill (set under Design & branding) |
--vt-accent-ink | The accent adjusted to read as text on the page |
--vt-on-accent, --vt-on-accent-muted | Text on top of the accent: buttons, the membership band |
--vt-danger | Error text |
<style>
[data-component="tag-tile"] [data-part="title"] { color: var(--vt-accent-ink); }
</style>The same colours exist under Tailwind's names (--color-accent, --color-ink and so on) for the theme's own use; the --vt- names are the ones we promise to keep.
To change one of them, set it on html:not(.dark) for light mode and on .dark for dark mode. A value set on a bare :root applies in both schemes, which is rarely what a light grey wants.
Targeting one colour scheme
Dark mode is a dark class on the page, so:
<style>
/* dark mode only */
.dark [data-region="site-footer"] { background: var(--vt-surface); }
/* light mode only */
html:not(.dark) [data-region="site-footer"] { background: var(--vt-canvas); }
</style>When Color scheme is set to Light or Dark, the class is fixed and the rule for the other scheme never applies.
Targeting one kind of page
Ghost puts its own classes on the <body>, which is the tidiest way to scope a rule:
body.home-template [data-region="site-header"] { … } /* the homepage only */
body.post-template [data-region="post-body"] { … } /* posts only */
body.page-template [data-region="page-header"] { … } /* pages only */
body.tag-template [data-region="archive-header"] { … } /* topic pages */
body.author-template [data-region="archive-header"] { … } /* author pages */
body.paged [data-region="post-feed"] { … } /* page 2 onwards */Each post and page also carries its slug (page-about) and each tag on a post its slug (tag-money). The two routed pages, /tags/ and /bookmarks/, carry no body class at all: scope those rules with [data-region="topics"] and [data-region="bookmarks"] instead.
What not to target
Three things to leave alone.
- Anything a script is managing. The menu list the header rebuilds, the More pill's panel, the phone menu's dialog, the picks carousel's track, the video box, the feed view and the two table-of-contents mounts are measured and rewritten as the page runs, so a rule that changes their size, overflow or position fights the script and usually loses. Style a wrapper around them instead: the reference marks which handles those are.
- Utility classes. Names like
mt-8,text-lgandlg:grid-cols-4come from the theme's build and are not a promise: a release can change them. Handles are the promise. - Ghost's own names, and Ventura's machinery. Anything starting
data-portal,data-members-ordata-ghost-belongs to Ghost; anything startingdata-nav-,data-bookmark,data-toc,data-feed,data-picks,data-video-,data-share-ordata-reading-is Ventura's own wiring. Select them if it helps, but never remove or rename them.
When a rule does not apply
- Reload properly.
Cmd/Ctrl + Shift + R. Ghost injects your CSS into every page, but your browser may still be holding the old one. - Check the handle exists on that page. Most handles only appear on the page that has that thing on it.
- Specificity before
!important. Ventura's own styles sit in cascade layers, so a plain rule from Code injection wins over them without!important. The article body and the editor's cards are the exception, styled outside the layers: there a longer selector ([data-region="post-body"] p) usually wins on its own, and!importantis the honest tool when it does not. - Test in both colour schemes. A colour that reads beautifully in light mode can disappear in dark mode. Using the variables above avoids most of it.
These handles are a promise
Every handle in the reference is a documented, stable name. Renaming or removing one counts as a breaking change and is called out in the release notes, so a rule you write today keeps working through theme updates.
Publication language
Ventura ships in 62 languages. Set Ghost's Publication language and every label the theme adds follows, dates with it; Arabic, Hebrew, Persian and Urdu turn the whole layout right-to-left.
Custom fonts
Pick any font from Bunny Fonts or Google Fonts, copy the code the page builds for you, and paste it into Ghost. Nothing to edit.