docs: update active link page to clarify twindv1 plugin usage (#2004)
This commit is contained in:
@@ -29,7 +29,7 @@ a[data-ancestor] {
|
|||||||
|
|
||||||
## Tailwind / Twind
|
## Tailwind / Twind
|
||||||
|
|
||||||
In tailwind or tailwind like styling solutions you can style `data-*`-attributes
|
In tailwind or tailwind-like styling solutions you can style `data-*`-attributes
|
||||||
by prepending the classes with `[data-current]:`
|
by prepending the classes with `[data-current]:`
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
@@ -41,3 +41,21 @@ function Menu() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Twind Plugin
|
||||||
|
|
||||||
|
The original twind plugin (`import twindPlugin from "$fresh/plugins/twind.ts";`)
|
||||||
|
supports the above style:
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
class="[data-current]:text-green-600"
|
||||||
|
```
|
||||||
|
|
||||||
|
### TwindV1 Plugin
|
||||||
|
|
||||||
|
The new twind plugin (`import twindPlugin from "$fresh/plugins/twindv1.ts";`)
|
||||||
|
requires a slightly different syntax (note the position of the left bracket):
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
class="data-[current]:text-green-600"
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user