I recently realized that you can use the CSS function clamp() in combination with width
to set a "max width" and "min width". I am wondering what the fundamental difference is when using width
+ clamp()
over min-width
, width
, max-width
.
In other words, how does this...
.item {
width: 100%;
max-width: 200px;
min-width: 100px;
}
...differ from this...
.item {
width: clamp(100px, 100%, 200px);
}