Skip to content

limel-table: no way to make a small table fit its content height (hardcoded 5rem bottom padding) #4124

Description

@viktorSoftDev

New feature motivation

limel-table currently assumes it lives in a full-height view where it owns the scrolling. When a small table (a handful of rows, no pagination) is rendered inside a limel-dialog or any other fit-content context, every table carries a large band of dead space below the last row:

  • .tabulator .tabulator-tableholder has a hardcoded padding-bottom: 5rem inside the shadow DOM, which cannot be overridden by consumers.
  • The single-page paginator renders as empty space by default (there is an escape hatch via --limel-table-single-page-paginator-display, but the default adds height for tables that will never paginate).

In lime-crm-components we currently have to resort to a fragile negative-margin hack from outside the shadow DOM to compensate (see https://github.com/Lundalogik/lime-crm-components/pull/4421, where a dialog renders two small movable-rows tables). The hack couples the consumer to the literal 5rem value in lime-elements styles and will silently break if that value changes.

New feature description

Make it possible for a limel-table to size itself to its content, e.g.:

  • expose the tableholder bottom padding as a CSS custom property (--limel-table-tableholder-padding-bottom or similar) so consumers can remove it, or
  • a dedicated fit-content mode/prop where the table renders only the height its rows need, with no reserved scroll/paginator space.

New feature implementation

The minimal change is replacing the hardcoded padding-bottom: 5rem with var(--limel-table-..., 5rem) so existing consumers are unaffected. Optionally, hiding the paginator automatically when there is only a single page would remove the need for --limel-table-single-page-paginator-display as an opt-out.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions