I'm having trouble getting my React app to properly style divs using Tailwind CSS. The intellisense feature doesn't suggest any styling options for me either.
import './App.css';
function App() {
return (
<div className="text-red-400">Hello World</div>
);
}
export default App;
tailwind.config.js
module.exports = {
mode: 'jit',
purge: [],
darkMode: 'media', // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
craco.config
module.exports = {
style: {
postcssOptions: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
}
Even though I've set the text color to red, it remains white on the screen. I've tried installing Intellisense for CSS in addition to Tailwind CSS IntelliSense, but without success.