Skip to content

Commit

Permalink
Merge pull request #343 from Larocceau/remove-tailwind
Browse files Browse the repository at this point in the history
add recipe for removing tailwind
  • Loading branch information
mattgallagher92 authored Jan 2, 2024
2 parents 2b3fcde + ca34613 commit fede396
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/recipes/ui/remove-tailwind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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

## 1. Remove Tailwind css classes

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`.


## 2. Uninstall NPM packages

Remove NPM packages that were installed for Tailwind using

```
npm uninstall tailwindcss postcss autoprefixer
```

## 3. Remove configuration files

Remove the following files:

```
src/Client/postcss.config.js
src/Client/tailwind.config.js
src/Client/index.css
```

Your SAFE Stack app is now Tailwind-free.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ nav:

- UI:
- Add Tailwind support: "recipes/ui/add-tailwind.md"
- Remove Tailwind support: "recipes/ui/remove-tailwind.md"
- Add daisyUI support: "recipes/ui/add-daisyui.md"
- Add Stylesheet support: "recipes/ui/add-style.md"
- Add Feliz support: "recipes/ui/add-feliz.md"
Expand Down

0 comments on commit fede396

Please sign in to comment.