Skip to content

Conversation

yuxi-ovo
Copy link

fixes #4359

@yuxi-ovo
Copy link
Author

yuxi-ovo commented Dec 1, 2024

who can help me

@yuxi-ovo
Copy link
Author

yuxi-ovo commented Dec 4, 2024

@brc-dd

@yuxi-ovo
Copy link
Author

yuxi-ovo commented Jan 5, 2025

111

@yuyinws
Copy link
Contributor

yuyinws commented Jan 14, 2025

I think we should add the has-sidebar class to the top element, then get the left value by CSS selectors.

Example:

.VPContent.has-sidebar {
margin: var(--vp-layout-top-height, 0px) 0 0;
padding-left: var(--vp-sidebar-width);
}

@yuxi-ovo
Copy link
Author

@yuyinws ok Thank you for your help. Is that right for me?

@yuyinws
Copy link
Contributor

yuyinws commented Jan 17, 2025

Please fix the CI error.

@yuxi-ovo
Copy link
Author

ok

@yuxi-ovo
Copy link
Author

hello

@yuyinws
Copy link
Contributor

yuyinws commented Feb 12, 2025

Please fix the code review.

@yuxi-ovo
Copy link
Author

where

@@ -16,6 +17,7 @@ const open = ref(false)
const vh = ref(0)
const main = ref<HTMLDivElement>()
const items = ref<HTMLDivElement>()
const {hasSidebar} = useSidebar()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add blank space.

Suggested change
const { hasSidebar } = useSidebar()

@@ -165,6 +170,9 @@ function scrollToTop() {
left: calc(var(--vp-sidebar-width) + 32px);
width: 320px;
}
.VPLocalNavOutlineDropdown:not(.has-sidebar) .items{
left:32px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add blank space.

Suggested change
left:32px;
.VPLocalNavOutlineDropdown:not(.has-sidebar) .items {

@yuyinws
Copy link
Contributor

yuyinws commented Feb 13, 2025

Sorry my mistake, you can see it now.

@yuxi-ovo
Copy link
Author

is that so?

@yuxi-ovo yuxi-ovo requested a review from yuyinws February 13, 2025 08:23
@yuyinws
Copy link
Contributor

yuyinws commented Feb 14, 2025

image

@yuxi-ovo
Copy link
Author

OK!

@yuyinws
Copy link
Contributor

yuyinws commented Feb 14, 2025

LGTM
/cc @brc-dd

@github-actions github-actions bot added the stale label Mar 22, 2025
@yuxi-ovo
Copy link
Author

yuxi-ovo commented Jul 9, 2025

hello Did anyone notice this?

@brc-dd brc-dd force-pushed the main branch 2 times, most recently from c5a8428 to 8abbe29 Compare August 14, 2025 03:45
@brc-dd brc-dd force-pushed the main branch 2 times, most recently from 084cf43 to d3a1567 Compare August 20, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local navigation dropdown misplaced without sidebar
2 participants