:root {}
with proper syntax.var(--variable-name)
in matching class selectors and avoid conflicts with Webflow’s built-in styles.<style>
in head or Embed component) and publish the site to test functionality.If your clamp()
function isn't working in Webflow, even after using an HTML Embed for custom styling and defining root variables, it's likely due to incorrect syntax, variable scopes, or how/where the custom CSS is applied.
:root {}
like so:<style>
tag:<style>
block in::root
.clamp()
, reference the custom property like this:font-size: var(--fluid-font-size);
font-size
or similar property, it may override your custom style..page-wrapper .responsive-text
).<style>
tags will not render correctly in Webflow Designer preview.clamp()
function are working correctly in the browser.To fix the clamp()
function in Webflow, ensure your custom property is defined in :root
with correct syntax, referenced properly using var()
, and applied via a matching, non-conflicting class. Also, publish the site to test the custom CSS, as it won’t work in the Designer preview.