Skip to content

Commit 48a1157

Browse files
committed
fix(docs): bundled strategies visualized
1 parent 0b933f9 commit 48a1157

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

README.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Tailwind CSS + UI libraries = no conflicts 🚀
1+
# <center>Tailwind CSS + UI libraries = no conflicts 🚀</center>
22

33
### What
44

@@ -27,13 +27,11 @@ Starting from version 3 it provides a powerful configuration to (optionally):
2727

2828
For ease of use, there are 3 pre-bundled isolation strategies available (as named exports) that cover 99% cases:
2929

30-
- `isolateInsideOfContainer` - everything is protected from the preflight styles, except specified Tailwind root(s).
31-
Use it when you have all the tailwind-powered stuff **isolated under some root container**.
32-
- `isolateOutsideOfContainer` - protects specific root(s) from the preflight styles - Tailwind is everywhere outside.
33-
Use it when you have Tailwind powered stuff everywhere as usual, but you want to **exclude some part of the DOM** from being affected by the preflight styles.
34-
- `isolateForComponents` - everything is protected from the preflight styles, except components marked with the selector of your choice.
35-
Use it when you want the preflight styles to be applied only to particular elements **immediately** (without extra roots or wrappers).
36-
Good for components - just specify some unique css class for all your components and use them anywhere.
30+
| Strategy exported name | Visualization | Description |
31+
|-----------------------------|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
32+
| `isolateInsideOfContainer` | <img src="docs/inside.png" alt="inside" width="200"/> | Everything is protected from the preflight styles, except specified Tailwind root(s).<br/>Use it when you have all the tailwind-powered stuff **isolated under some root container**. |
33+
| `isolateOutsideOfContainer` | <img src="docs/outside.png" alt="outside" width="200"/> | Protects specific root(s) from the preflight styles - Tailwind is everywhere outside.<br/>Use it when you have Tailwind powered stuff everywhere as usual, but you want to **exclude some part of the DOM** from being affected by the preflight styles. |
34+
| `isolateForComponents` | <img src="docs/components.png" alt="components" width="200"/> | Everything is protected from the preflight styles, except components marked with the selector of your choice.<br/>Use it when you want the preflight styles to be applied only to particular elements **immediately** (without extra roots or wrappers).<br/>Good for components - just specify some unique css class for all your components and use them anywhere. |
3735

3836
🔨 If none of these strategies work for your case, or something isn't perfect - you can [create your own strategy](#your-owncustom-isolation-strategy).
3937

docs/components.png

34.7 KB
Loading

docs/inside.png

27 KB
Loading

docs/outside.png

31.2 KB
Loading

0 commit comments

Comments
 (0)