Merge pull request #4 from Pup-Ion-Dev/3-add-tailwind-css

Switch to TailwindCSS and remove global CSS file
This commit is contained in:
Drew Rautenberg
2025-01-12 15:39:00 -06:00
committed by GitHub
9 changed files with 1073 additions and 117 deletions
+1043
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -20,10 +20,13 @@
"@types/react": "^18.3.18", "@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5", "@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4", "@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"eslint": "^9.17.0", "eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.16", "eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.14.0", "globals": "^15.14.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.17",
"typescript": "~5.6.2", "typescript": "~5.6.2",
"typescript-eslint": "^8.18.2", "typescript-eslint": "^8.18.2",
"vite": "^6.0.5" "vite": "^6.0.5"
+6
View File
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
-42
View File
@@ -1,42 +0,0 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}
@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}
.card {
padding: 2em;
}
.read-the-docs {
color: #888;
}
-1
View File
@@ -1,4 +1,3 @@
import './App.css'
import { Routes, Route} from 'react-router'; import { Routes, Route} from 'react-router';
import Home from './pages/home.tsx'; import Home from './pages/home.tsx';
import Inventory from "./pages/inventory.tsx"; import Inventory from "./pages/inventory.tsx";
+3 -68
View File
@@ -1,68 +1,3 @@
:root { @tailwind base;
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; @tailwind components;
line-height: 1.5; @tailwind utilities;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}
+2 -3
View File
@@ -1,4 +1,3 @@
import '../App.css'
import {Link} from "react-router"; import {Link} from "react-router";
@@ -8,13 +7,13 @@ function Home() {
return ( return (
<> <>
<div> <div>
<h1>Home</h1> <h1 className={"text-brand"}>Home</h1>
</div> </div>
<p> <p>
ARFF ARFF BARK BARK ARFF ARFF BARK BARK
</p> </p>
<Link to="/inventory"> <Link to="/inventory">
<button>Inventory</button> <button className="bg-brand rounded text-white font-bold px-4 py-2">Inventory</button>
</Link> </Link>
</> </>
+3 -3
View File
@@ -1,4 +1,4 @@
import '../App.css'
import {Link} from "react-router"; import {Link} from "react-router";
function Inventory() { function Inventory() {
@@ -7,13 +7,13 @@ function Inventory() {
return ( return (
<> <>
<div> <div>
<h1>Inventory</h1> <h1 className={"text-brand"}>Inventory</h1>
</div> </div>
<p> <p>
ARFF ARFF BARK BARK ARFF ARFF BARK BARK
</p> </p>
<Link to="/"> <Link to="/">
<button>Home</button> <button className="bg-brand rounded text-white font-bold px-4 py-2">Home</button>
</Link> </Link>
</> </>
+13
View File
@@ -0,0 +1,13 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {
colors: {
brand: "#D40404",
},
},
},
plugins: [],
}