flynn0087/BWCC_Teetime

Install Tailwinds CSS

Closed this issue · 2 comments

Kay0s commented
Install Tailwinds CSS

Please see this documentation to install what you need for tailwinds locally on your machine. All necessary code is in the documentation! This documentation is specifically for React apps.

https://tailwindcss.com/docs/guides/create-react-app

Kay0s commented

npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat @tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
13:36
npm install @craco/craco
13:37
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject"
},
13:42
// craco.config.js
module.exports = {
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
}
craco.config.js at the root of the project.
13:43
npx tailwindcss init
13:45
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
New
13:47
@tailwind base;
@tailwind components;
@tailwind utilities;
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}