We use cookies to improve your experience and analyze site traffic. By clicking "Accept", you consent to our use of cookies. See our Privacy Policy for details.

Scheduled maintenance. Thursday 29 October, 1:00–1:15 AM ET. Brief downtime; published flipbooks unaffected.

Storefront Fonts and Custom CSS

Set your storefront's heading and body fonts, and restyle it with custom CSS that keeps working as ZenFlip updates.

Storefront Fonts and Custom CSS

Your storefront can carry your brand's typography and look without any code. When you want to go further, custom CSS lets you restyle almost anything. This article covers both, and explains how to write CSS that keeps working as we improve the storefront.

Plan requirement: The storefront, including these settings, is available on Business and Enterprise plans.

Fonts

  1. Go to Settings → Storefront

  2. Find the Typography section

  3. Choose a Heading font and a Body font

  4. Click Save

The body font applies to the whole storefront. The heading font applies to headings, section titles and the hero title; if you leave it on Same as body font, headings use the body font too. You can see both in the preview before saving.

To give navigation links a different font, use Navigation Style, just below Typography. A font set there takes priority over the body font for links in the header and footer.

Your brand colour is set once, under Settings → Branding → Brand Colors, and is used for buttons, links and highlights throughout the storefront.

Custom CSS

For anything the settings don't cover, add CSS in Settings → Storefront → Custom CSS.

Write against hooks and tokens, not class names

Every part of the storefront you are likely to restyle carries a named hook, a data-zf attribute, and a few theme values are exposed as CSS variables (tokens). These are the supported way to style your storefront. We keep them stable, and a change to one is treated as a breaking change.

Everything else on the page, such as class names like .bg-teal or .text-xs and the way elements are nested, is internal. It can change in any update, and CSS that relies on it may stop applying without warning.

`css / Supported: keeps working / [data-zf="hero-overlay"] { background-image: linear-gradient(145deg, #2a1f18, #1a1510); }

/ Not supported: may break in any update / section.relative > div.absolute { background-image: linear-gradient(145deg, #2a1f18, #1a1510); } `

Tokens

Set a token on [data-zf="store"] and the storefront uses your value everywhere it applies:

Token

What it controls

Default

--zf-accent

Buttons, links, badges and highlights

Your brand colour

--zf-accent-hover

The accent colour on hover

Same as --zf-accent

--zf-font-body

Text throughout the storefront

Your Body font

--zf-font-heading

Headings, section titles and the hero title

Your Heading font

--zf-font-nav

Header and footer navigation links

Navigation Style font

`css [data-zf="store"] { --zf-accent: #8a9683; --zf-font-heading: 'Playfair Display', Georgia, serif; } `

If you want a font that isn't in the Typography list, load it from Google Fonts with an @import at the very top of your CSS. Fonts from other sites are blocked by the storefront's security policy.

Hooks

Target a hook with an attribute selector, such as [data-zf="card-title"].

Hook

Element

store

The whole storefront. Set tokens here

header

The top bar

logo

Your logo and name in the top bar

nav

The navigation links group in the top bar

nav-link

Each navigation link, in the top bar and the mobile menu

account-menu

The menu that opens from a signed-in reader's name

hero

The banner at the top of the home page

hero-slide

Each banner slide's background

hero-overlay

The colour or shading laid over each slide

hero-title

The banner title

hero-subtitle

The banner subtitle

hero-cta

The banner's buttons

section-title

Section headings on the home page, such as "Quarterly Issues"

card

Each publication card

card-title

A publication card's title

price

The price badge on a publication card

add-to-cart

The cart button on a publication card

cart-button

The floating cart button

footer

The footer

footer-link

Each link in the footer

powered-by

The "Powered by ZenFlip" note in the footer

`css [data-zf="footer"] { background: #2a2320; } [data-zf="footer-link"] { color: #c4b5aa; letter-spacing: 0.06em; } [data-zf="card"]:hover { border-color: var(--zf-accent); } `

Tips

  • Start with the settings. A colour or font set in Branding or Typography reaches places your CSS may not, such as the mobile menu and new parts of the storefront as we add them.

  • Set tokens before writing rules. Changing --zf-accent recolours everything that uses the accent. A rule only changes what it selects.

  • Navigation Style takes priority. Its font, colour, case and weight apply to links in both the header and the footer, and they win over your CSS. To style nav-link or footer-link yourself, clear that setting, or add !important to your rule.

  • Check contrast. If you change colours, make sure text stays readable against its background, especially on buttons.