Clamps a value between an upper and lower bound anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is required. It takes 3 parameters: a minimum value, a preferred value, and a maximum value.
Syntax | |
---|---|
CSS | clamp( <calc-sum>#{3} ), where <calc-sum> = "<calc-product> [ [ '+' | '-' ] <calc-product> ]*", <calc-product> = "<calc-value> [ '*' <calc-value> | '/' <calc-number-value> ]*", and <calc-value> = "<number> | <dimension> | <percentage> | ( <calc-sum> )" |