Skip to content

Commit

Permalink
improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sauercrowd committed Sep 14, 2024
1 parent 2aaa23a commit a08e80f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ A simple tailwind inspired syntax, letting you directly assign css variables to

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

Is an equivalent syntax to

```
```css
{
padding: var(--1);
padding-left: 8px;
Expand Down Expand Up @@ -68,7 +68,7 @@ They can map to either a string or an array. If it's an array, all properties wi
To disable the preset prefixes simply override the default configuration

Current defaults
```
```javascript
window.VARWIND_DEFAULT_PROPERTY_ALIASES = {
'p': 'padding',
'pl': 'padding-left',
Expand All @@ -95,7 +95,7 @@ Are defined on the object `window.VARWIND_DEFAULT_MEDIA_QUERIES` and can be exte
To disable the preset media queries simply override the default configuration.

Current defaults:
```
```javascript
window.VARWIND_DEFAULT_MEDIA_QUERIES = {
'sm': '(min-width: 640px)',
'md': '(min-width: 768px)',
Expand All @@ -111,7 +111,7 @@ Are defined on the object `window.VARWIND_DEFAULT_PREFIX_ALIASES` and can be ext
To disable the preset prefixes simply override the default configuration. Any element that doesnt match will be treated as a pseudo class (`hover` -> `:hover`).

Current defaults
```
```javascript
window.VARWIND_DEFAULT_PREFIX_ALIASES= {
'after': '::after',
'before': '::before',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "varwind",
"version": "1.0.0",
"version": "0.1.0",
"description": "Tailwind-style syntax for CSS variables",
"scripts": {
"test": "cd test && jest --forceExit --testTimeout=15000"
Expand Down

0 comments on commit a08e80f

Please sign in to comment.