Skip to content

Commit

Permalink
chore: allows NavTabs to overflow (#1632)
Browse files Browse the repository at this point in the history
* chore: allows NavTabs to overflow

Allows NavTabs to overflow using a scroll container.

Prevents NavTabs items from wrapping.

Signed-off-by: Philipp Rudloff <[email protected]>

* fix: response layout issue with .app-content-container

Allows .app-content-container items to shrink in smaller viewports.

Signed-off-by: Philipp Rudloff <[email protected]>

---------

Signed-off-by: Philipp Rudloff <[email protected]>
  • Loading branch information
Philipp Rudloff authored Oct 20, 2023
1 parent dd58880 commit 5785cec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ const isWizard = computed(() => route.meta.isWizard === true)
.app-content-container {
padding-top: var(--AppHeaderHeight, initial);
display: var(--AppDisplay);
grid-template-columns: var(--AppSidebarWidth) 1fr;
// Note: `minmax(0, 1fr)` is used because `1fr` implies `minmax(auto, 1fr)` which will allow grid items to grow beyond their container's size.
grid-template-columns: var(--AppSidebarWidth) minmax(0, 1fr);
}
.app-main-content {
Expand Down
17 changes: 17 additions & 0 deletions src/app/common/NavTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,20 @@ const currentTabHash = computed(() => {
margin-bottom: var(--AppGap);
}
</style>

<style lang="scss">
.nav-tabs {
overflow-x: auto;
width: 100%;
}
.nav-tabs .tab-item {
white-space: nowrap;
}
// TODO: Remove this once https://github.com/Kong/kongponents/pull/1774 is available.
// Prevents KTabs from trigger a vertical overflow of its container.
.nav-tabs .tab-item::after {
content: none !important;
}
</style>

0 comments on commit 5785cec

Please sign in to comment.