Skip to content

Commit

Permalink
docs(attributify): self-referencing
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 13, 2022
1 parent 44313e8 commit e7ad827
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion packages/preset-attributify/README.md
Expand Up @@ -47,7 +47,27 @@ With attributify mode, you can separate utilities into attributes:

For example, `text-sm text-white` could be grouped into `text="sm white"` without duplicating the same prefix.

###### Valueless Attributify
### Prefix Self-referencing

For utilities like `flex`, `grid`, `border`, that have the utilities same as the prefix, a special `~` value is provided.

For example:

```html
<button class="border border-red">
Button
</button>
```

Can be written as

```html
<button border="~ red">
Button
</button>
```

### Valueless Attributify

In addition to Windi CSS's Attributify Mode, this presets also supports valueless attributes.

Expand Down

0 comments on commit e7ad827

Please sign in to comment.