From c446a551a81d928147919dbaf3656c301d19d7ad Mon Sep 17 00:00:00 2001 From: ankitkr104 Date: Sun, 12 Apr 2026 11:35:44 +0530 Subject: [PATCH 1/2] Lock navbar and add border/shadow styling --- assets/css/custom.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/css/custom.scss b/assets/css/custom.scss index c37cc9534d7..d0e78165dc7 100644 --- a/assets/css/custom.scss +++ b/assets/css/custom.scss @@ -74,6 +74,15 @@ blockquote { padding-top: 5px; } +.main-nav { + position: sticky; + top: 0; + z-index: 1000; + background: $bg-white; + border-bottom: 1px solid $border-color; + box-shadow: 0 6px 18px rgba(27, 31, 35, 0.08); +} + .breadcrumb { background: #F3F3F3; From 4045e7c61d796a838730fa9c52c80adf3d44fcaa Mon Sep 17 00:00:00 2001 From: ankitkr104 Date: Sun, 12 Apr 2026 11:47:42 +0530 Subject: [PATCH 2/2] Fix anchor link visibility under sticky navbar - Add scroll-padding-top to html to offset navbar height - Add scroll-margin-top to article headings for smoother anchor scrolling - Prevents headings from being hidden under sticky navbar when navigating via TOC or hash links --- assets/css/custom.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/css/custom.scss b/assets/css/custom.scss index d0e78165dc7..27616af2592 100644 --- a/assets/css/custom.scss +++ b/assets/css/custom.scss @@ -1,3 +1,8 @@ +// Ensure anchor-linked headings remain visible under sticky navbar +html { + scroll-padding-top: 80px; +} + a, .btn { transition: all 0.2s ease-in-out; } @@ -116,7 +121,8 @@ blockquote { h5, h6 { -webkit-font-smoothing: antialiased; - font-family: $font-mktg + font-family: $font-mktg; + scroll-margin-top: 80px; } h1 { @include h0-mktg }