Skip to content

Commit

Permalink
Add clamp function handling to rem/em
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Dec 4, 2023
1 parent efa5d36 commit d4db5e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function createConverter(units: string, { shouldScale = false } = {}) {
}

if (typeof value === 'string') {
if (value.startsWith('calc(') || value.startsWith('var(')) {
if (value.startsWith('calc(') || value.startsWith('var(') || value.startsWith('clamp(')) {
return value;
}

Expand Down

0 comments on commit d4db5e8

Please sign in to comment.