master-co / css

The CSS Language and Framework
https://css.master.co
MIT License
1.82k stars 41 forks source link

🐞 clamp() function does not work correctly #358

Open takamoso opened 5 months ago

takamoso commented 5 months ago

Description

If specified normally, an empty style is generated.

<p class="font-size:clamp(1.5rem,2vw+1rem,2.25rem)">...</p>
.font-size\:clamp\(1\.5rem\,2vw\+1rem\,2\.25rem\) {}

When I wrap it with the calc() function, it works fine.

<p class="font-size:clamp(1.5rem,calc(2vw+1rem),2.25rem)">...</p>
.font-size\:clamp\(1\.5rem\,calc\(2vw\+1rem\)\,2\.25rem\) {
  font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
}

Reproduction

No response

System Informations

No response

1aron commented 5 months ago

@takamoso Confirmed it was a bug.

We have to normalize font:clamp(1.5rem,2vw+1rem,2.25rem) into a valid format font:clamp(1.5rem,2vw + 1rem,2.25rem) for CSS.

Will fix it later, thanks.