# Custom CSS

> Fine-tune any detail of your resume with your own CSS — safely scoped to that resume.

Source: https://folio.hippodev.app/docs/custom-css

The **Custom CSS** box at the bottom of the **Design** tab lets you restyle anything the settings don't cover. Your CSS applies only to this resume — in the editor, on your public page, and in every export.

```css
.folio-section-title {
  letter-spacing: 0.2em;
  border-bottom-width: 2px;
}

.folio-entry-dates {
  font-style: italic;
}
```

Changes apply as you type. Problems are listed under the box with their line numbers, and selectors that match nothing on the page are flagged — handy for catching typos.

## How your CSS is applied

* **Scoped to your resume.** Every rule is limited to this resume, so it can never affect the Folio app or other resumes.
* **`html`, `body`, `:root`, and `.folio-resume` mean the resume page itself.** For example `:root { --folio-accent: teal }` recolors the whole resume.
* **Your rules win over the template's.** No `!important` needed.
* **It's part of the resume.** Collaborators see it live, <kbd>⌘</kbd> <kbd>Z</kbd> undoes it, and it's saved with [your templates](https://folio.hippodev.app/docs/templates#your-templates).

## What isn't allowed

For safety, these are removed (the rest of your CSS still applies):

| Not allowed                                             | Why                                             | Instead                                                       |
| ------------------------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------- |
| `url()`, `image-set()`, `@import`, `@font-face`         | No outside files can load into your resume      | Use a Photo block for images and pick from the built-in fonts |
| `position: fixed`                                       | Could cover the page or the site's own controls | Use `position: absolute` inside the resume                    |
| Backslash escapes (`\`)                                 | Could hide the above                            | Write values out plainly                                      |
| At-rules other than `@media`, `@supports`, `@container` | Not needed for styling a page                   | `@media print { … }` works for print-only tweaks              |

Custom CSS can be up to 20,000 characters.

## Class reference

These class names and attributes are stable — templates are built on them, so your CSS keeps working across template updates.

| Selector                                                                       | What it is                                                                                                                                                    |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.folio-resume`                                                                | The page                                                                                                                                                      |
| `.folio-columns`, `.folio-side`, `.folio-main`                                 | The two-column grid, the sidebar, and the main column                                                                                                         |
| `.folio-section`, `.folio-section-title`                                       | A section and its heading                                                                                                                                     |
| `.folio-block[data-block="entry"]`                                             | Any block, by type: `heading`, `text`, `list`, `image`, `contact`, `entry`, `skills`, `languages`, `references`, `timeline`, `interests`, `divider`, `spacer` |
| `.folio-heading-1 h1`, `.folio-subtitle`                                       | Your name and headline                                                                                                                                        |
| `.folio-entry`, `.folio-entry-title`, `.folio-entry-org`, `.folio-entry-dates` | An entry (job, degree, …) and its parts                                                                                                                       |
| `.folio-rich p`, `.folio-rich li`                                              | Paragraphs and bullets in text                                                                                                                                |
| `.folio-tags li`                                                               | Skill tags                                                                                                                                                    |
| `.folio-contact li`, `.folio-icon`                                             | Contact items and their icons                                                                                                                                 |
| `.folio-image`                                                                 | A photo frame                                                                                                                                                 |
| `.folio-timeline`, `.folio-references`                                         | Timeline and references blocks                                                                                                                                |
| `.folio-divider`                                                               | A divider                                                                                                                                                     |

The page also has attributes you can target: `[data-template="executive"]`, `[data-columns="2"]`, `[dir="rtl"]`, and `[lang="zh-TW"]`.

## Theme variables

The theme settings are available as CSS variables, so you can reuse them:

| Variable                                    | Setting                                     |
| ------------------------------------------- | ------------------------------------------- |
| `--folio-accent`                            | Accent color                                |
| `--folio-fg`, `--folio-muted`, `--folio-bg` | Text, secondary text, and background colors |
| `--folio-heading-font`, `--folio-body-font` | Heading and body fonts                      |
| `--folio-scale`, `--folio-space`            | Text size and spacing multipliers           |
| `--folio-side-width`                        | Sidebar width (when you've set one)         |

```css
.folio-entry-title {
  color: var(--folio-accent);
}

/* Only in two-column layouts */
[data-columns="2"] .folio-side .folio-section-title {
  font-size: 0.9em;
}
```
