Skip to content

Commit 6ca4dd5

Browse files
committed
tweak
1 parent d4dfc55 commit 6ca4dd5

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/utils/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ export function getColumnWidthForMeasurement<R, SR>(
4242
maxWidth >= minWidth
4343
) {
4444
// TODO: how to handle minWidth? can we use `clamp` with grid columns?
45-
return width === 'max-content'
46-
? `fit-content(${maxWidth}px)` // fit-content = min(max-content, max(auto, maxWidth))
47-
: `minmax(${width}, ${maxWidth}px)`;
45+
if (width === 'max-content') {
46+
return `fit-content(${maxWidth}px)`; // fit-content = min(max-content, max(auto, maxWidth))
47+
}
48+
49+
if (!width.includes('minmax') && !width.includes('fit-content')) {
50+
return `minmax(${width}, ${maxWidth}px)`;
51+
}
4852
}
4953

5054
return width;

0 commit comments

Comments
 (0)