# WUK newsletter stylesheet

This project builds the **stylesheet** for WUK newsletter emails. It no longer
builds the email HTML — that is assembled at request time by the TYPO3
`NewsletterRenderer` service (pure PHP, no Node) in the `bb_boilerplate`
extension. The old ZURB Foundation-for-Emails Gulp pipeline (Gulp 3, Babel 6,
node-sass, gulp-imagemin) has been replaced by a single Dart Sass step, because
node-sass/gulp-imagemin have no Apple-Silicon builds and running a Node build
inside every HTTP request was slow and fragile.

## Build

Requires **Node 22** (see `.nvmrc`).

```bash
nvm use            # -> Node 22
npm install        # installs sass (Dart Sass) + foundation-emails 2.2.1
npm run build      # compiles src/assets/scss/app.scss -> css/app.css
npm run watch      # rebuild on change
```

`foundation-emails` is pinned to **exactly 2.2.1** — the version the live
newsletters were built against. Do not bump it without re-validating the
rendered output, or the emails will change visually.

## ⚠️ The compiled CSS is committed to git — keep it in sync

`css/app.css` is a **committed build artefact**. The production server runs
plain Apache/PHP and has **no Node**, so it cannot compile SCSS. The
`NewsletterRenderer` reads `css/app.css` straight off disk and inlines it.

**If you edit anything under `src/assets/scss/`, you must run `npm run build`
and commit the regenerated `css/app.css` in the same commit.** Forgetting this
silently ships stale styles — the SCSS change will have no effect in production.

`css/app.css` is intentionally **not** in `.gitignore` (only `node_modules/`,
`dist/` and build scratch are ignored).

## What's here

- `src/assets/scss/` — the newsletter stylesheet source (settings, the
  foundation-emails import, and WUK template overrides). **Edit here.**
- `css/app.css` — compiled, committed output. **Do not edit by hand.**
- `src/pages/`, `src/layouts/`, `src/partials/` — legacy ZURB Inky/Panini
  template scaffolding, retained for reference. The live templates are the
  TYPO3 Fluid templates in `bb_boilerplate`; the Inky tags they emit are
  transformed to email tables by the PHP renderer.
