Skip to content

Commit

Permalink
Merge pull request #854 from 3YOURMIND/fix-navbar-style-issues
Browse files Browse the repository at this point in the history
fix: resolve several visual bugs for narrow nav bar
  • Loading branch information
Isokaeder authored Dec 22, 2023
2 parents a1a1e76 + 8d27684 commit 6584a2a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 25 deletions.
3 changes: 2 additions & 1 deletion packages/kotti-ui/source/kotti-navbar/KtNavbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
@click="hideMobileMenu"
>
<NavbarMenu
:isNarrow="isNarrow"
:sections="sections"
@menuLinkClick="$emit('linkClick', $event)"
/>
Expand Down Expand Up @@ -265,6 +264,8 @@ $narrow-navbar-width: 3.4rem;
}
&--narrow {
// Needed to make the expanded user menu fully visible
z-index: 5;
flex: 0 0 $narrow-navbar-width;
.kt-navbar-wrapper {
Expand Down
52 changes: 28 additions & 24 deletions packages/kotti-ui/source/kotti-navbar/components/NavbarTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default defineComponent({
content: contentRef.value ?? undefined,
offset: [0, TIPPY_LIGHT_BORDER_ARROW_HEIGHT],
placement: 'right',
theme: 'kt-navbar-tooltip',
theme: 'kt-tooltip-navbar',
})),
)
Expand All @@ -48,6 +48,10 @@ export default defineComponent({
display: flex;
align-items: center;
justify-content: center;
.yoco {
font-size: 1rem;
}
}
</style>

Expand All @@ -59,128 +63,128 @@ $fill: var(--gray-90);
$text: var(--gray-10);
$shadow: var(--gray-100);
.tippy-box[data-theme~='kt-navbar-tooltip'] {
.tippy-box[data-theme~='kt-tooltip-navbar'] {
color: $text;
background-color: $fill;
border: 1px solid $border;
box-shadow: 0 4px 14px -2px $shadow;
}
.tippy-box[data-theme~='kt-navbar-tooltip'] > .tippy-backdrop {
.tippy-box[data-theme~='kt-tooltip-navbar'] > .tippy-backdrop {
background-color: $fill;
}
.tippy-box[data-theme~='kt-navbar-tooltip'] > .tippy-arrow::after,
.tippy-box[data-theme~='kt-navbar-tooltip'] > .tippy-svg-arrow::after {
.tippy-box[data-theme~='kt-tooltip-navbar'] > .tippy-arrow::after,
.tippy-box[data-theme~='kt-tooltip-navbar'] > .tippy-svg-arrow::after {
position: absolute;
z-index: -1;
content: '';
}
.tippy-box[data-theme~='kt-navbar-tooltip'] > .tippy-arrow::after {
.tippy-box[data-theme~='kt-tooltip-navbar'] > .tippy-arrow::after {
border-color: transparent;
border-style: solid;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='top']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='top']
> .tippy-arrow::before {
border-top-color: $border;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='top']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='top']
> .tippy-arrow::after {
top: 17px;
left: 1px;
border-width: 7px 7px 0;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='top']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='top']
> .tippy-svg-arrow
> svg {
top: 16px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='top']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='top']
> .tippy-svg-arrow::after {
top: 17px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='bottom']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='bottom']
> .tippy-arrow::before {
bottom: 16px;
border-bottom-color: $border;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='bottom']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='bottom']
> .tippy-arrow::after {
bottom: 17px;
left: 1px;
border-width: 0 7px 7px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='bottom']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='bottom']
> .tippy-svg-arrow
> svg {
bottom: 16px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='bottom']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='bottom']
> .tippy-svg-arrow::after {
bottom: 17px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='left']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='left']
> .tippy-arrow::before {
border-left-color: $border;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='left']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='left']
> .tippy-arrow::after {
top: 1px;
left: 17px;
border-width: 7px 0 7px 7px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='left']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='left']
> .tippy-svg-arrow
> svg {
left: 11px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='left']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='left']
> .tippy-svg-arrow::after {
left: 12px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='right']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='right']
> .tippy-arrow::before {
right: 16px;
border-right-color: $border;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='right']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='right']
> .tippy-arrow::after {
top: 1px;
right: 17px;
border-width: 7px 7px 7px 0;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='right']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='right']
> .tippy-svg-arrow
> svg {
right: 11px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'][data-placement^='right']
.tippy-box[data-theme~='kt-tooltip-navbar'][data-placement^='right']
> .tippy-svg-arrow::after {
right: 12px;
}
.tippy-box[data-theme~='kt-navbar-tooltip'] > .tippy-svg-arrow {
.tippy-box[data-theme~='kt-tooltip-navbar'] > .tippy-svg-arrow {
fill: $fill;
}
.tippy-box[data-theme~='kt-navbar-tooltip'] > .tippy-svg-arrow::after {
.tippy-box[data-theme~='kt-tooltip-navbar'] > .tippy-svg-arrow::after {
width: 16px;
height: 6px;
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=');
Expand Down

0 comments on commit 6584a2a

Please sign in to comment.