Skip to content

Commit a1d85da

Browse files
pacyfistclaude
andcommitted
docs(posts): point angular 19 tailwind guide at the angular 22 one
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent f6481ac commit a1d85da

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

_posts/2025-02-09-angular-19-tailwind-4-and-scss-a-modern-step-by-step-setup-guide.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ image:
77
alt: Crafting Cosmic Web Designs!
88
---
99

10-
11-
10+
> **Heads up: this guide targets Angular 19.**
11+
>
12+
> Since Angular 21 the CLI does the setup for you `ng new --style tailwind` replaces most of the steps below.
13+
>
14+
> If you are starting a new project, read [Angular 22 + Tailwind 4 + daisyUI Setup: Two Commands](https://www.pacyfist.dev/posts/angular-22-tailwind-4-daisyui-setup/) instead.
15+
> {: .prompt-warning }
1216
1317
There are already several guides on setting up Angular 19 with Tailwind 4, so why another one? Because I despise CSS and always configure Angular with SCSS instead. That small change allows for much cleaner and more readable styles. Unfortunately, every guide I could find used plain old CSS. It makes sense, since the whole idea of Tailwind is to minimize writing CSS, but I still want SCSS, and that's final!
1418

@@ -77,11 +81,12 @@ Time to [configure](https://github.com/postcss/postcss-load-config) PostCSS. In
7781

7882
```json
7983
{
80-
"plugins": {
81-
"@tailwindcss/postcss": {}
82-
}
84+
"plugins": {
85+
"@tailwindcss/postcss": {}
86+
}
8387
}
8488
```
89+
8590
## Import Tailwind CSS Styles
8691

8792
### Import Tailwind Directives in styles.scss
@@ -90,7 +95,6 @@ Here, we must do something slightly different because we've chosen SCSS. Other t
9095

9196
Open the `src/styles.scss` file in your project (this is your global stylesheet) and add the following line:
9297

93-
9498
```css
9599
@use "tailwindcss";
96100
```
@@ -118,15 +122,16 @@ Update your `src/styles.scss` file to include the DaisyUI plugin:
118122

119123
Now, unfortunately, things get a little quirky. My VS Code keeps showing me a warning: `Unknown at rule @pluginscss(unknownAtRules)`, but that's it. Styles from DaisyUI work fine, so, for the moment, I'm comfortable ignoring this warning.
120124

121-
122125
## Testing configuration
123126

124127
If we modify the `src/app/app.component.html` file like this:
125128

126129
```html
127130
<main class="main">
128131
<div class="flex flex-col justify-center items-center p-16">
129-
<h1 class="text-3xl underline text-amber-700 mt-10">Hello world from Tailwind</h1>
132+
<h1 class="text-3xl underline text-amber-700 mt-10">
133+
Hello world from Tailwind
134+
</h1>
130135
<div class="btn btn-primary mt-5">Hello world from DaisyUI</div>
131136
</div>
132137
</main>
@@ -140,4 +145,3 @@ ng serve
140145
```
141146

142147
We should see a correctly styled page.
143-

0 commit comments

Comments
 (0)