Closed fcisio closed 3 years ago
Hi, @fcisio, and thank you for the suggestion. Right now we still support IE11 which doesn't support clamp
. Definitely something we will revisit as our browser support evolves, but right now we need to stick with the media query-based solution.
Summary
Hi! Working with styles objects, I use
between()
most ofter, sincefluidRange()
outputs media queries and it creates collisions in the object.Both functions do the same thing, but
fluidRange()
actually locks the min and max values.Wanting to lock these values without outputting media queries, I've made my own version, leveraging CSS
clamp()
.Basic Example
Outputs
[clamp() CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/clamp())
Reasoning
This change doesn't alter the current behavior of
fluidRange()
, and it's way lighter.