Skip to content

Commit 2347e62

Browse files
committed
fix css unit in fluid typography
1 parent 6bba6fd commit 2347e62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function fluid(
184184

185185
return `clamp(${[
186186
`min(${minSize}, ${maxSize})`,
187-
`${slope} * 100lvi + ${intercept} / 16 * 1rem`,
187+
`${slope} * 100svw + ${intercept} / 16 * 1rem`,
188188
`max(${minSize}, ${maxSize})`,
189189
].join(', ')})`;
190190
}
@@ -229,6 +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))) * 100svw + 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));
233233
}
234234
```

0 commit comments

Comments
 (0)