Skip to content

Commit

Permalink
fix(VerticalNavigation): improve stacking context
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed May 5, 2023
1 parent 4665563 commit 28ee917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/runtime/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,12 @@ const container = {
// Navigation

const verticalNavigation = {
wrapper: 'relative z-0',
base: 'group flex items-center gap-2 text-sm font-medium rounded-md w-full relative focus:outline-none after:absolute after:inset-px after:z-[-1] after:rounded-md disabled:cursor-not-allowed disabled:opacity-75',
wrapper: 'relative',
base: 'group flex items-center gap-2 text-sm font-medium rounded-md w-full relative focus:outline-none before:absolute before:inset-px before:rounded-md disabled:cursor-not-allowed disabled:opacity-75',
spacing: 'px-3 py-1.5',
active: 'u-text-gray-900 after:bg-gray-100 dark:after:bg-gray-800',
inactive: 'u-text-gray-500 hover:u-text-gray-900 hover:after:bg-gray-50 dark:hover:after:bg-gray-800/50 focus-visible:after:bg-gray-50 dark:focus-visible:after:bg-gray-800/50',
active: 'u-text-gray-900 before:bg-gray-100 dark:before:bg-gray-800',
inactive: 'u-text-gray-500 hover:u-text-gray-900 hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50 focus-visible:before:bg-gray-50 dark:focus-visible:before:bg-gray-800/50',
label: 'truncate z-0',
icon: {
base: 'flex-shrink-0 w-4 h-4',
active: 'u-text-gray-700',
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/navigation/VerticalNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/>
</slot>
<slot :link="link">
<span v-if="link.label" class="truncate">{{ link.label }}</span>
<span v-if="link.label" :class="ui.label">{{ link.label }}</span>
</slot>
<slot name="badge" :link="link" :is-active="isActive">
<span v-if="link.badge" :class="[ui.badge.baseClass, isActive ? ui.badge.active : ui.badge.inactive]">
Expand Down

0 comments on commit 28ee917

Please sign in to comment.