Skip to content

Commit f730c22

Browse files
committed
fix: enhance tab visibility and layout management in DocksTabs component
1 parent d304cf2 commit f730c22

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

packages/core/src/parts/tabs.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,26 @@ export class DocksTabs extends DocksContainer {
449449
display: none !important;
450450
}
451451
452+
/* Tab strip (wa-tab-group part tabs, inside shadow .nav); hiding only wa-tab leaves an empty nav row. */
453+
:host([hide-tabs]) wa-tab-group::part(tabs) {
454+
display: none;
455+
}
456+
452457
:host([hide-tabs]:not([with-toolbar])) wa-tab-group::part(nav) {
453458
display: none;
454459
}
455460
461+
/* Single grid row so the body uses 1fr instead of the auto nav row when tabs are hidden. */
462+
:host([hide-tabs]:is([placement="top"], [placement="bottom"])) wa-tab-group::part(base) {
463+
grid-template-rows: minmax(0, 1fr);
464+
}
465+
466+
:host([hide-tabs]) wa-tab-group::part(body) {
467+
min-height: 0;
468+
height: 100%;
469+
overflow: hidden;
470+
}
471+
456472
:host(:is([placement="top"], [placement="bottom"])) wa-tab-group::part(base) {
457473
display: grid;
458474
grid-template-rows: auto minmax(0, 1fr);

0 commit comments

Comments
 (0)