Skip to content

Commit f1d0280

Browse files
committed
fix README
1 parent e563c4f commit f1d0280

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ Default: `{}`
7373

7474
Define custom functions that can be used in your CSS.
7575

76-
## Tips
76+
## Recipes
7777

7878
### Optional arguments with fallback
7979

8080
You can define custom functions with optional arguments and fallback values.
8181

8282
```js
83-
function shadow(shadowColor) {
84-
return `2px 2px ${shadowColor ? shadowColor : 'var(--shadow-color, black)'}`;
83+
function shadow(shadowColor = 'var(--shadow-color, black)') {
84+
return `2px 2px ${shadowColor}`;
8585
}
8686

8787
module.exports = {
@@ -144,7 +144,7 @@ module.exports = {
144144
plugins: {
145145
'@yuheiy/postcss-custom-functions': {
146146
functions: {
147-
'--negative': (value, ...rest) => negative,
147+
'--negative': negative,
148148
},
149149
},
150150
},
@@ -229,5 +229,6 @@ will be processed to:
229229
}
230230

231231
h1 {
232-
font-size: clamp(min(2rem, 4rem), calc(tan(atan2(4rem - 2rem, 1px)) / tan(atan2(var(--breakpoint-xl) - var(--breakpoint-sm), 1px))) * 100lvi + calc(tan(atan2(2rem, 1px)) - calc(tan(atan2(4rem - 2rem, 1px)) / tan(atan2(var(--breakpoint-xl) - var(--breakpoint-sm), 1px))) * tan(atan2(var(--breakpoint-sm), 1px))) / 16 * 1rem, max(2rem, 4rem));}
232+
font-size: clamp(min(2rem, 4rem), calc(tan(atan2(4rem - 2rem, 1px)) / tan(atan2(var(--breakpoint-xl) - var(--breakpoint-sm), 1px))) * 100lvi + calc(tan(atan2(2rem, 1px)) - calc(tan(atan2(4rem - 2rem, 1px)) / tan(atan2(var(--breakpoint-xl) - var(--breakpoint-sm), 1px))) * tan(atan2(var(--breakpoint-sm), 1px))) / 16 * 1rem, max(2rem, 4rem));
233+
}
233234
```

0 commit comments

Comments
 (0)