Skip to content

Commit

Permalink
Fix header offset when no sticky header
Browse files Browse the repository at this point in the history
Fixes #6283
  • Loading branch information
distantnative committed Feb 25, 2024
1 parent b06df63 commit 1cb242f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions panel/src/components/Drawers/Drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default {
.k-drawer {
--header-sticky-offset: calc(var(--drawer-body-padding) * -1);
z-index: var(--z-toolbar);
display: flex;
flex-basis: var(--drawer-width);
Expand Down
5 changes: 4 additions & 1 deletion panel/src/components/Layout/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default {
:root {
--header-color-back: var(--color-light);
--header-padding-block: var(--spacing-4);
--header-sticky-offset: calc(var(--scroll-top) + 4rem);
--header-sticky-offset: var(--scroll-top);
}
.k-header {
Expand Down Expand Up @@ -165,4 +165,7 @@ export default {
top: var(--scroll-top);
z-index: var(--z-toolbar);
}
:root:has(.k-header[data-has-buttons="true"]) {
--header-sticky-offset: calc(var(--scroll-top) + 4rem);
}
</style>

0 comments on commit 1cb242f

Please sign in to comment.