Skip to content

Commit d835a64

Browse files
committed
add offsets for breadcrumb anchors
1 parent a64c710 commit d835a64

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/.vuepress/theme/components/Breadcrumbs.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ export default {
4242
}
4343
</script>
4444

45+
<style lang="stylus">
46+
// offset hash position for breadcrumb bar
47+
h1, h2, h3, h4, h5, h6
48+
{$contentClass}:not(.custom) > &
49+
margin-top (0.5rem - ($navbarHeight + $breadcrumbsHeight)) !important
50+
padding-top $navbarHeight + $breadcrumbsHeight + 1rem !important
51+
52+
.breadcrumbs.fixed + {$contentClass} {
53+
padding-top: $breadcrumbsHeight - 0.5rem;
54+
}
55+
</style>
56+
4557
<style lang="stylus" scoped>
4658
nav
4759
border-bottom 1px solid #eaecef

0 commit comments

Comments
 (0)