79138296

Date: 2024-10-29 17:21:15
Score: 2
Natty:
Report link

Looks to me like minmax(min-content, 1fr) or fit-content(1fr) are actually not supported.

Does this approach fit your use case?

.my-grid {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    column-gap: 1rem;
    row-gap: 1rem;
}

.my-item {
    min-width: min-content;
    white-space: nowrap;
}
<div class="my-grid">
  <div class="my-item">Some potentially pretty long text...</div>
  <div class="my-item">Some other text</div>
</div>

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: quentinkrammer