This is the starter theme from Timber with Tailwind CSS added as well as some ultra minimal build tooling.
- Clone this theme into your wp-content/themes folder, using a folder name that makes sense to you
- Install Timber:
composer install --no-dev
- Build the theme:
npm install && npm run prod
- Activate the theme
npm run watch
- Add any tailwind classes that you ONLY use in the editor to
safelist.txt
npm run prod
- this will package css using Tailwind's CLI and js using rollup (see Scripts note below).
- Tailwind's Typography plugin is enabled and
prose prose-blue
classes added to the body, this give us most of the styling that we expect from the Gutenberg editor, together with the standard block-library includes. - Tailwind's Nesting plugin is included for sass-like declarations in our css.
base.css
contains a very few sanity tweaks.
Gutenberg's default editor has been set up with the -600 variants of a subset of Tailwind's default color palette.
Inevitably you are going to want some scripts to go with your theme. There is a starter js file in /js/app.js
. It doesn't do anything and if you don't want it, just disable enqueuing of the script in functions.php
.