Skip to content

Commit fede396

Browse files
Merge pull request #343 from Larocceau/remove-tailwind
add recipe for removing tailwind
2 parents 2b3fcde + ca34613 commit fede396

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docs/recipes/ui/remove-tailwind.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
By default, a full SAFE-stack application uses Tailwind CSS for styling. You might not always want to manage your styling using Tailwind, for example because you want to use a CSS framework like [Bulma](https://bulma.io/). In this recipe we describe how to fully remove Tailwind
2+
3+
## 1. Remove Tailwind css classes
4+
5+
Tailwind uses classes to style UI elements. In `src/Client`, search for all occurrences of `prop.className` and `prop.classes` and remove them if they are used for Tailwind support. In a vanilla SAFE template installation, this means removing **all** occurrences of `prop.className`.
6+
7+
8+
## 2. Uninstall NPM packages
9+
10+
Remove NPM packages that were installed for Tailwind using
11+
12+
```
13+
npm uninstall tailwindcss postcss autoprefixer
14+
```
15+
16+
## 3. Remove configuration files
17+
18+
Remove the following files:
19+
20+
```
21+
src/Client/postcss.config.js
22+
src/Client/tailwind.config.js
23+
src/Client/index.css
24+
```
25+
26+
Your SAFE Stack app is now Tailwind-free.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ nav:
8484

8585
- UI:
8686
- Add Tailwind support: "recipes/ui/add-tailwind.md"
87+
- Remove Tailwind support: "recipes/ui/remove-tailwind.md"
8788
- Add daisyUI support: "recipes/ui/add-daisyui.md"
8889
- Add Stylesheet support: "recipes/ui/add-style.md"
8990
- Add Feliz support: "recipes/ui/add-feliz.md"

0 commit comments

Comments
 (0)