Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabsheet setPadding(false) is missing #4388

Closed
mrgreywater opened this issue Dec 16, 2022 · 1 comment · Fixed by #6493
Closed

Tabsheet setPadding(false) is missing #4388

mrgreywater opened this issue Dec 16, 2022 · 1 comment · Fixed by #6493
Assignees
Labels
enhancement New feature or request vaadin-tabs

Comments

@mrgreywater
Copy link

Describe your motivation

The content of Tabsheet always uses padding without any way to disable it (except providing your own css file).

Describe the solution you'd like

add a function tabsheet.setPadding(boolean) and maybe setMargin(boolean) similar to ThemableLayout.

Describe alternatives you've considered

Manually inserting a css to adjust the behaviour is cumbersome. Writing your own Tabsheet is simpler than that.

Additional context

No response

@web-padawan web-padawan added enhancement New feature or request vaadin-tabs labels Dec 16, 2022
@rolfsmeds
Copy link
Contributor

rolfsmeds commented Dec 22, 2022

The workaround is actually very simple. Just add this to you styles.css:
vaadin-tabsheet::part(content) { padding: 0; }

However, this should definitely have a dedicated API.
Proposal:

  • no-padding theme variant (cf. corresp. variant in Dialog)
  • TabSheetVariant.LUMO_NO_PADDING constant for applying with themeName API in Flow, and/or
  • setPadding(boolean padding) convenience API in Flow for improved DX, discoverability and consistency with layouts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vaadin-tabs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants