clamp() function inside a <style> tag in the Head section via Page or Site Settings.clamp() syntax and define any CSS variables at :root; publish your site to see effects live.You're trying to use the CSS clamp() function in Webflow via a custom HTML Embed, but it's not applying as expected. Here's how to properly implement clamp() in Webflow and troubleshoot issues.
<head> tag or Site Settings → Custom Code → Head section.clamp() function to the Head section.
clamp() syntax is valid. It follows this format: clamp(min, preferred, max)
font-size: clamp(1rem, 2vw, 2rem);
:root
clamp(), verify they’re properly declared:```css
:root {
--min-font: 1rem;
--preferred-font: 2vw;
--max-font: 2rem;
}
```
Then use:
font-size: clamp(var(--min-font), var(--preferred-font), var(--max-font));
<style> tag in the Head section.
```html
<style>
:root {
--min-font: 1rem;
--preferred-font: 2vw;
--max-font: 2rem;
}
.my-heading {
font-size: clamp(var(--min-font), var(--preferred-font), var(--max-font));
}
</style>
```
clamp() function is working properly on the live version.
To use the clamp() function in Webflow, move your custom CSS to the Head section, ensure the syntax is correct, and verify that your CSS variables are defined at the :root level. Publish your site to test the final effect.