Skip to content

Commit

Permalink
Update: Breaking changes: Added Tailwind CSS V4
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-andreuzza committed Sep 7, 2024
1 parent 623f8d4 commit 216be07
Show file tree
Hide file tree
Showing 10 changed files with 1,523 additions and 3,303 deletions.
5 changes: 5 additions & 0 deletions .astro/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1725749060265
}
}
1 change: 1 addition & 0 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"window.title": "${activeEditorShort}${separator}${rootName} ${separator} [Branch: master]${separator}[Branch: main]"
"window.title": "${activeEditorShort}${separator}${rootName} ${separator} [Branch: master]${separator}[Branch: master]"
}
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
# Astro & Tailwind CSS Starter Kit
## Template Integrations
- @astrojs/tailwind - https://docs.astro.build/en/guides/integrations-guide/tailwind/
- @astrojs/sitemap - https://docs.astro.build/en/guides/integrations-guide/sitemap/

- ## License
by https://lexingtonthemes.com

## License

This template is open-source software licensed under the [GPL-3.0 license](https://opensource.org/licenses/GPL-3.0). Feel free to fork, modify, and use it in your projects.
## Need an attribution-free version?

Checkout [Lexington Themes](https://lexingtonthemes.com/) for free and premium multipage themes & UI Kits
For freelancers, developers, businesses, and personal use.
Beautifully crafted with Astro.js, and Tailwind CSS — Simple & easy to customise.

## This template is using Tailwind CSS V4

Now we are using only a CSS file. It's called `global.css` and it's located in the src/styles folder. Now we are eimporting Tailwind CSS on the same file instead of using the `tailwind.config.cjs` file. Like this:

```css
// Importing Tailwind CSS
@import "tailwindcss";
// Importing Tailwind plugins
@plugin "@tailwindcss/typography";
@plugin "@tailwindcss/forms";
```

Then to add your styles you will use the @theme directive. Like this:

```css
@theme {
/* Your CSS goes here, see how styles are written on the global.css file */
}
```

Remember this is just in Alpha version, so you can use it as you want. Just keep an eye on the changes that Tailwind CSS is going to make.


## Template Structure
Inside of your Astro project, you'll see the following folders and files:
Expand Down
9 changes: 7 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { defineConfig } from 'astro/config';
import tailwind from "@astrojs/tailwind";
import tailwindcss from '@tailwindcss/vite';

import sitemap from "@astrojs/sitemap";
export default defineConfig({
vite: {
plugins: [tailwindcss()],
},
// Add your domain here
site: 'https://lexingtonthemes.com',
integrations: [tailwind(), sitemap()]
integrations: [ sitemap()]
});
Loading

0 comments on commit 216be07

Please sign in to comment.