Skip to content

Commit b95214e

Browse files
afzalsayed96Timer
andcommitted
feat(examples:tailwind): add postcss-preset-env (vercel#10160)
* feat(examples:tailwind): add postcss-preset-env * fix: prettier * Review changes * Update README.md Co-authored-by: Joe Haddad <timer150@gmail.com>
1 parent ea0d916 commit b95214e

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

examples/with-tailwindcss/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ now
4949

5050
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:
5151

52-
- [autoprefixer](https://github.com/postcss/autoprefixer) - Adds vendor prefixes to CSS rules in your stylesheet using values from [Can I Use](https://caniuse.com/)
52+
- [postcss-preset-env](https://preset-env.cssdb.org/) - Adds stage 2+ features and autoprefixes
5353
- [purgecss](https://github.com/FullHuman/purgecss) - Removes unused CSS
54-
- [cssnano](https://cssnano.co/) - Minifies CSS
55-
- [postcss-easy-import](https://github.com/TrySound/postcss-easy-import) - Allows importing one stylesheet into another
5654

5755
## Limitations
5856

examples/with-tailwindcss/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
},
1414
"devDependencies": {
1515
"@fullhuman/postcss-purgecss": "^1.3.0",
16-
"autoprefixer": "^9.7.4",
17-
"postcss-import": "^12.0.1",
16+
"postcss-preset-env": "^6.7.0",
1817
"tailwindcss": "^1.1.4"
1918
}
2019
}

examples/with-tailwindcss/postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ module.exports = {
1313
},
1414
]
1515
: undefined,
16-
'autoprefixer',
16+
'postcss-preset-env',
1717
],
1818
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.btn-blue {
2-
@apply .bg-blue-500 .text-white .font-bold .py-2 .px-4 .rounded;
2+
@apply bg-blue-500 text-white font-bold py-2 px-4 rounded;
33
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy