:root
inside a <style>
tag placed in the page <head>
or visible body area.clamp()
inside var()
, and validate all CSS for correct syntax and units.!important
if necessary.You're attempting to use the CSS clamp()
function via an HTML Embed in Webflow, but it’s not rendering as expected. This usually points to an issue with syntax, variable setup, or selector specificity.
:root
:root
selector in the <style>
tag within an HTML Embed component.<head>
or the body, not inside a component that's conditionally rendered or hidden.clamp()
and var()
incorrectly, like clamp(var(--fs-base))
(invalid if --fs-base
already contains a clamp()
).<style>
tag can cause the entire block to be ignored.clamp()
statement. Correct syntax is:clamp(MIN, PREFERRED, MAX)
— all values must be in compatible units (e.g., all using rem
or px
/vw
).font-size
or other styles via the Webflow Designer AND custom CSS, the Webflow styles may override your custom styles.!important
as a last resort. Example:clamp()
value is computed or overridden.<style>
embed is placed in a visible and loaded part of the page:Ensure your clamp()
function is defined correctly within a :root
selector, you're using valid CSS syntax, and you're not getting overridden by Webflow’s Designer styles. Use browser DevTools to confirm variable application and debug rendering issues.