Is it possible to limit the width of a CSS grid column?
body {
margin: 0;
padding: 0;
}
.container {
display: grid;
grid-template-columns: minmax(17.5%, 250px) minmax(31.25%, 480px) auto;
grid-template-rows: 100vh;
grid-gap: 0;
}
.menu {
padding-top: 32px;
background: linear-gradient(135deg, #837DB5 0%, #364176 100%);
}
.list-view {
background-color: #F5F5FC;
}
<div class="container">
<div class="menu"></div>
<div class="list-view"></div>
<div class="details"></div>
</div>
In the example above it always uses 17.5% width for the menu because:
"If max is smaller than min, then max is ignored and the function is treated as min."
source: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns
What I want is a menu that is 17.5% width with a max of 250px. Is that possible?