Skip to content

Commit 85e690c

Browse files
author
Alejandro Flores
committed
feat: tailwindcss v4
1 parent 26a9106 commit 85e690c

File tree

10 files changed

+1149
-1058
lines changed

10 files changed

+1149
-1058
lines changed

.vscode/extensions.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"tailwindCSS.experimental.configFile": "src/styles/global.css"
3+
}

astro.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
3+
import tailwindcss from '@tailwindcss/vite';
34

45
// https://astro.build/config
5-
export default defineConfig({});
6+
export default defineConfig({
7+
vite: {
8+
plugins: [tailwindcss()],
9+
}
10+
});

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"astro": "astro"
1010
},
1111
"dependencies": {
12-
"astro": "^5.2.3"
13-
},
14-
"packageManager": "[email protected]+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
12+
"@tailwindcss/vite": "^4.1.8",
13+
"astro": "^5.8.1",
14+
"tailwindcss": "^4.1.8"
15+
}
1516
}

pnpm-lock.yaml

Lines changed: 1123 additions & 815 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Welcome.astro

Lines changed: 0 additions & 209 deletions
This file was deleted.

src/layouts/Layout.astro

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,9 @@
55
<meta name="viewport" content="width=device-width" />
66
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
77
<meta name="generator" content={Astro.generator} />
8-
<title>Astro Basics</title>
8+
<title>Alejandro Flores</title>
99
</head>
1010
<body>
1111
<slot />
1212
</body>
1313
</html>
14-
15-
<style>
16-
html,
17-
body {
18-
margin: 0;
19-
width: 100%;
20-
height: 100%;
21-
}
22-
</style>

src/pages/index.astro

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
---
2-
import Welcome from '../components/Welcome.astro';
32
import Layout from '../layouts/Layout.astro';
4-
5-
// Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build
6-
// Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh.
3+
import '../styles/global.css'
74
---
85

96
<Layout>
10-
<Welcome />
7+
<h1 class="text-3xl">Hello from astro</h1>
118
</Layout>

src/styles/global.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");
2+
@import "tailwindcss";
3+
4+
@theme {
5+
--font-roboto: "Roboto", sans-serif;
6+
}
7+
8+
body {
9+
@apply font-roboto;
10+
}

0 commit comments

Comments
 (0)