Spica Jekyll documentation

Colors, fonts and CSS

Change Spica's accent color, light and dark mode and fonts, add your own CSS, choose inline or file CSS, and reword or translate every word the theme prints.

The accent color

One setting changes the color of links, buttons, the current menu item and the soft highlights:

spica:
  accent: violet

The six presets are violet (the demo’s look), blue, teal, green, rose and orange. Each has its own light and dark values, chosen so text stays readable. On orange, buttons use dark text instead of white, because orange is too light to carry white.

For a color of your own, see “Your own CSS” below.

Light and dark mode

Two settings in _config.yml control how it behaves (see Settings):

  • color_scheme is auto (follow each visitor’s system setting, which is the default), light or dark.
  • theme_switch: true adds a light/dark button in the sidebar. A visitor’s choice is remembered in their browser, and color_scheme sets where they start. Without the button, color_scheme applies to everyone.

The phone’s address bar takes the color of the sidebar, in both modes.

Where the colors live

The colors the theme uses are named in _includes/css/theme.css, as plain CSS. Each one has a light and a dark value, written light-dark(light, dark):

--accent: light-dark(var(--violet-600), var(--violet-400));

The ones you’re most likely to change:

Name Used for
--page The page background
--sidebar The sidebar and the phone top bar
--surface Fields, and panels sitting on the page
--surface-2 Tags, code and empty picture frames
--ink Text
--ink-muted, --ink-subtle Excerpts and intros, then dates, labels and captions
--line Hairlines
--accent Fills such as buttons and the current page number
--accent-ink Accent links and text. Check it’s readable on every background.
--accent-soft The soft wash behind a highlighted box
--highlight The lime of marked text, the “Featured” label and the progress bar
--button The dark button. It’s the text color turned round.

You can use any color value. Check that text on it is still readable with a contrast checker such as WebAIM’s: 4.5 to 1 for normal text.

The raw color scales (stone, violet, blue and so on, from 50 to 950) are in _includes/css/colors.css. That file is generated for the theme, so leave it alone. Change the names in custom.css instead, as below.

Your own CSS

Put your own rules in _includes/css/custom.css. It’s loaded last, so anything you write there wins. Theme updates never change this file. For example:

:root {
  --accent: light-dark(#2f6fdd, #8ab4ff);
  --accent-hover: light-dark(#2459b5, #b3ceff);
  --accent-ink: light-dark(#2459b5, #8ab4ff);
}
h1 { font-size: 3rem; }

Keep light-dark(...) if you use dark mode, so each mode has its own value. A plain value such as --accent: #2f6fdd; applies to both. Your values win over the accent presets. If your accent color is light, also set --on-accent (the text on a filled button) to a dark color.

The /style-guide/ page in your copy shows every color, the six accents and every part of the theme side by side. It’s hidden from search engines and not linked from the menu.

Inline or file CSS

css under spica: decides how the styles reach the page:

  • inline (the default) puts one <style> block in each page, holding only the CSS that page uses. There’s no extra request, so the page paints at once. This is the setting behind the fast PageSpeed score.
  • file links one ordinary stylesheet, /assets/css/style.css, from every page. The browser keeps it between pages. It’s built from the same files, so the two always match.

Either way, your rules go in _includes/css/custom.css. Don’t edit assets/css/style.css: it’s built for you.

_data/css.yml lists the page CSS files that go into the single stylesheet in file mode:

pages: [home, newsletter, prose, post, project, projects, archive, search, page, contact]

If you add a CSS file of your own to _includes/css/, add its name (without .css) to that list, so file mode includes it. In inline mode, a page loads a file when its front matter names it, such as css: [prose, page, mine].

Fonts

Headings, the logo, card titles, buttons and labels use Schibsted Grotesk, self-hosted in assets/fonts/ as two variable files (upright and italic, weights 400 to 900, Latin letters). It’s licensed under the SIL Open Font License (assets/fonts/OFL.txt). Body text and code use the visitor’s own system fonts, which cost nothing to load.

The upright file is preloaded. The italic file is fetched only on a page that uses italic headings or labels. Spica also describes a fallback sans-serif scaled to match, so nothing jumps while the font loads.

The three font names are in _includes/css/scale.css: --font-display (headings and labels), --font-body (text) and --font-mono (code).

To use another font for headings:

  1. Put its .woff2 file in assets/fonts/.
  2. Update the @font-face rules in _includes/css/fonts.css, and remove the fallback rule if it no longer fits.
  3. Update the preload link in _includes/head.html.
  4. Change --font-display in your custom.css.

To use a different body font, set --font-body in custom.css. A different font changes how lines break, so check each page afterwards.

Sizes and spacing

Type sizes, spacing, corner radius, the page width (--wrap, 72rem), the width of reading columns (--wrap-narrow, 44rem; text lines are --measure, 68 characters) and the sidebar’s width (--sidebar-w, 19rem) are in _includes/css/scale.css. Type and space grow smoothly between phone and desktop, so one value works on every screen. Change them in custom.css.

Page fades and instant pages

Two small switches in the settings change how pages feel: page_transitions adds a soft fade between pages, and instant_pages lets the browser get the next page ready while the pointer rests on a link. Both only work in browsers that support them, and false turns each one off.

The theme’s words: _data/strings.yml

Nearly every word Spica prints by itself is in _data/strings.yml: “Skip to content”, “Subscribe”, “Read on”, “min read”, “Share”, “Show comments”, “Back to the home page” and more. Reword or translate any line and it changes everywhere.

newsletter_label: Abonnez-vous pour recevoir les nouveaux articles
min_read: min de lecture
subscribe: S'abonner
  • Delete a line and the English text built into the theme is used instead.
  • Set lang: in _config.yml to match (lang: fr), so browsers and screen readers use the right language.
  • Dates are written in English, like “May 21, 2026”. The format is part of the theme’s files, not of strings.yml.
  • The footer’s “Built with Jekyll” is built_with here. You can reword it.
  • The text of the 404 and thank-you pages is not_found_text and thank_you_text.

Your own content isn’t in this file. Menu labels, the tagline and the home greeting are in _config.yml. The text of the About, Contact and Projects pages is in about.md, contact.html and projects.html.