Skip to content

Instantly share code, notes, and snippets.

@alexharris
Created January 10, 2020 22:49
Show Gist options
  • Select an option

  • Save alexharris/2b838aac7a27bd8234c02eb209b95750 to your computer and use it in GitHub Desktop.

Select an option

Save alexharris/2b838aac7a27bd8234c02eb209b95750 to your computer and use it in GitHub Desktop.
Notes on how to make a Wordpress theme with Tailwind CSS
1. First, download a theme from https://underscores.me/
2. Follow this tutorial: https://paulund.co.uk/using-tailwind-css-in-your-wordpress-theme
3. Replace the contents of webpack.mix.js with the following:
```
const mix = require('laravel-mix');
const tailwindcss = require('tailwindcss');
mix.postCss('./theme-style.css', './style.css',
tailwindcss('./tailwind.config.js')
).options({ // this disables the feature of moving assets to images
processCssUrls: false
});
mix.browserSync('http://localhost/~alexharris/whatever/');
```
4. Run `npm run watch` (it might need to be run twice)
@borma425
Copy link

borma425 commented Jun 7, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment