diff --git a/examples/with-tailwindcss/README.md b/examples/with-tailwindcss/README.md index f5fb1fc7e791c45..557e99494b074e5 100644 --- a/examples/with-tailwindcss/README.md +++ b/examples/with-tailwindcss/README.md @@ -49,10 +49,8 @@ now This setup is a basic starting point for using [Tailwind CSS](https://tailwindcss.com) with Next.js. This example also includes the following [PostCSS](https://github.com/postcss/postcss) plugins: -- [autoprefixer](https://github.com/postcss/autoprefixer) - Adds vendor prefixes to CSS rules in your stylesheet using values from [Can I Use](https://caniuse.com/) +- [postcss-preset-env](https://preset-env.cssdb.org/) - Adds stage 2+ features and autoprefixes - [purgecss](https://github.com/FullHuman/purgecss) - Removes unused CSS -- [cssnano](https://cssnano.co/) - Minifies CSS -- [postcss-easy-import](https://github.com/TrySound/postcss-easy-import) - Allows importing one stylesheet into another ## Limitations diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 12df82de292e1be..1b31e147fb49868 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -13,8 +13,7 @@ }, "devDependencies": { "@fullhuman/postcss-purgecss": "^1.3.0", - "autoprefixer": "^9.7.4", - "postcss-import": "^12.0.1", + "postcss-preset-env": "^6.7.0", "tailwindcss": "^1.1.4" } } diff --git a/examples/with-tailwindcss/postcss.config.js b/examples/with-tailwindcss/postcss.config.js index cf3158c4b64da02..0daed9b0738d9a2 100644 --- a/examples/with-tailwindcss/postcss.config.js +++ b/examples/with-tailwindcss/postcss.config.js @@ -13,6 +13,6 @@ module.exports = { }, ] : undefined, - 'autoprefixer', + 'postcss-preset-env', ], } diff --git a/examples/with-tailwindcss/styles/button.css b/examples/with-tailwindcss/styles/button.css index 5a2ab8e1c184ada..bdf18229e839575 100644 --- a/examples/with-tailwindcss/styles/button.css +++ b/examples/with-tailwindcss/styles/button.css @@ -1,3 +1,3 @@ .btn-blue { - @apply .bg-blue-500 .text-white .font-bold .py-2 .px-4 .rounded; + @apply bg-blue-500 text-white font-bold py-2 px-4 rounded; }