Skip to content

Commit

Permalink
force tailwind config
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Prince committed Sep 20, 2024
1 parent 81d0689 commit c7c9042
Show file tree
Hide file tree
Showing 8 changed files with 833 additions and 5 deletions.
7 changes: 5 additions & 2 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');

module.exports = {
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
tailwindcss('./tailwind.config.js'),
autoprefixer,
],
},
},
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"test": "craco test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
"deploy": "gh-pages -d build --dotfiles --debug",
"postinstall": "tailwindcss build -i ./src/index.css -o ./src/tailwind.output.css"
},
"eslintConfig": {
"extends": [
Expand Down
1 change: 1 addition & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import Home from './Home';
import './index.css';

function App() {
return (
Expand Down
19 changes: 18 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;

/* Force Tailwind to include all styles */
@layer utilities {
.all-classes {
@apply
p-4 m-4
text-sm text-lg text-xl text-2xl
font-bold font-semibold
bg-green-100 bg-green-200 bg-green-300 bg-green-400 bg-green-500 bg-green-600 bg-green-700 bg-green-800 bg-green-900
text-white text-black
rounded-lg shadow-lg
flex flex-col items-center justify-between
grid grid-cols-1 md:grid-cols-2
hover:bg-green-600 hover:text-white
transition duration-300;
}
}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import './tailwind.output.css';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
Expand Down
Loading

0 comments on commit c7c9042

Please sign in to comment.