---
title: "Custom CSS and static files"
description: "Add your own styles with a custom.css file, and serve fonts and other static files from your docs folder."
---

Add a file named `custom.css` at the top of your docs folder, and Specly loads it on every page, after its own styles, so
your rules can override them.

```css custom.css
.ed-banner {
  letter-spacing: 0.02em;
}

.brand {
  font-family: "Brand Sans", system-ui, sans-serif;
}
```

Then use your own classes in a page:

```mdx
Welcome to <span className="brand">your product</span>.
```

> **Warning:** Set colours and fonts in [`theme.json`](/customize/theme), where Specly checks contrast and the build stops on a
> failure. `custom.css` isn't checked, so test the contrast of anything you change. The classes that start with `ed-`
> are Specly's own and can change between releases.

## Static files

Any image, font, PDF, audio or video file in your docs folder is served at its path, so a font can be loaded from
`custom.css`:

```css custom.css
@font-face {
  font-family: "Brand Sans";
  src: url("/fonts/brand-sans.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
```

That's the file `fonts/brand-sans.woff2` in your docs folder. Files in `public/` are served from the root of your site
too. For the types Specly serves, and for what it leaves out, see [Images and files](/write/images-and-files).

Pages, `docs.json` and code files are never served as static files.
