Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
sauercrowd committed Sep 14, 2024
1 parent a08e80f commit 7785701
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,19 @@ A simple tailwind inspired syntax, letting you directly assign css variables to

## Example
```html
<div x-css-vars="p--1 hover:bg--gray-500 margin-right--4">...</div>
<div x-css-vars="p--1 pl-[8px] hover:bg--gray-500 margin-right--4">...</div>
```

Is an equivalent syntax to

```css
{
padding: var(--1);
padding-left: 8px;
}
padding: var(--1);
padding-left: 8px;
margin-right: var(--4);

:hover {
background: var(--gray-500);
}

@media (min-width: 360px) {
padding-right: var(--8);
}
```

(We used a few shorthands here such as `p` - these are aliases that can be configured, we could have used any css property directly as well like `margin-right--8`)
Expand Down

0 comments on commit 7785701

Please sign in to comment.