Skip to content

Commit 7ea7e34

Browse files
waleedlatif1claude
andcommitted
fix(tables): tighten auto-resize padding to match Google Sheets
Reduce header padding from +48px to +36px (icon + cell padding) and cell padding from +20px to +17px (cell padding + border) for a snug fit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8fac875 commit 7ea7e34

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table/table.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -754,20 +754,19 @@ export function Table({
754754
let maxWidth = COL_WIDTH_MIN
755755

756756
const measure = document.createElement('span')
757-
measure.style.cssText =
758-
'position:absolute;visibility:hidden;white-space:nowrap;font:inherit;padding:0 8px'
757+
measure.style.cssText = 'position:absolute;visibility:hidden;white-space:nowrap;font:inherit'
759758
document.body.appendChild(measure)
760759

761760
measure.className = 'font-medium text-small'
762761
measure.textContent = columnName
763-
maxWidth = Math.max(maxWidth, measure.offsetWidth + 48)
762+
maxWidth = Math.max(maxWidth, measure.offsetWidth + 36)
764763

765764
measure.className = 'text-small'
766765
for (const row of currentRows) {
767766
const val = row.data[columnName]
768767
if (val == null) continue
769768
measure.textContent = String(val)
770-
maxWidth = Math.max(maxWidth, measure.offsetWidth + 20)
769+
maxWidth = Math.max(maxWidth, measure.offsetWidth + 17)
771770
}
772771

773772
document.body.removeChild(measure)

0 commit comments

Comments
 (0)