Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: Improve manual install guide of @astrojs/tailwind integration #8619

Merged
merged 4 commits into from
Sep 22, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/integrations/tailwind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,26 @@ export default defineConfig({
});
```

Then, create a `tailwind.config.cjs` file in your project's root directory. You can use the following command to generate a basic configuration file for you:

```sh
npx tailwindcss init
```

Finally, add this basic configuration to your `tailwind.config.cjs` file:

```js ins={4} "content: ['./src/**/*.{astro,js,ts,tsx,md,mdx}']"
dreyfus92 marked this conversation as resolved.
Show resolved Hide resolved
// tailwind.config.cjs
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
plugins: [],
}
```

## Usage

When you install the integration, Tailwind's utility classes should be ready to go right away. Head to the [Tailwind docs](https://tailwindcss.com/docs/utility-first) to learn how to use Tailwind, and if you see a utility class you want to try, add it to any HTML element to your project!
Expand Down