Skip to content

Commit

Permalink
add tailwind css
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-keri-betterhalf committed Apr 11, 2023
1 parent 516989b commit 8036072
Show file tree
Hide file tree
Showing 7 changed files with 401 additions and 133 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"@vitejs/plugin-react-swc": "^3.0.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.2.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
Expand All @@ -28,7 +29,9 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"postcss": "^8.4.21",
"prettier": "^2.8.7",
"tailwindcss": "^3.3.1",
"typescript": "^4.9.3",
"vite": "^4.2.0"
}
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
40 changes: 0 additions & 40 deletions src/App.css

This file was deleted.

25 changes: 12 additions & 13 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
import reactLogo from './assets/react.svg';
import viteLogo from './assets/vite.svg';
import './App.css';

function App() {
return (
<div className="App">
<div>
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://reactjs.org" target="_blank" rel="noreferrer">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
<div className="h-screen grid place-items-center bg-gradient-to-r from-green-300 via-blue-500 to-purple-600">
<div className="block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700">
<div className="flex justify-around ">
<img src={viteLogo} className="h-20" alt="Vite logo" />
<img src={reactLogo} className="h-20" alt="React logo" />
</div>
<h1 className="mt-10 font-bold text-center bg-gradient-to-r from-fuchsia-500 to-pink-500 bg-clip-text text-transparent">
Into the Vite Verse
</h1>
<p className="font-bold mt-5 bg-gradient-to-r from-cyan-400 to-slate-500 bg-clip-text text-transparent">
Minimal Starter Template for React ft. Vite
</p>
</div>
<h1>Into the Vite Verse</h1>
<p className="read-the-docs">
Minimal Starter Template for React ft. Vite
</p>
</div>
);
}
Expand Down
72 changes: 3 additions & 69 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,69 +1,3 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
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;
-webkit-text-size-adjust: 100%;
}

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;
}
}
@tailwind base;
@tailwind components;
@tailwind utilities;
8 changes: 8 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [],
};
Loading

0 comments on commit 8036072

Please sign in to comment.