Skip to content

Commit 8fa43dd

Browse files
fix: scrolling of anchor link
Signed-off-by: saurabhraghuvanshii <saurabhsraghuvanshi@gmail.com>
1 parent 7cd0a67 commit 8fa43dd

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

assets/scss/_styles_project.scss

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ a:not([href]):not([class]):hover {
408408
display: flex;
409409
align-items: center;
410410
color: $casper;
411+
411412
&:hover {
412413
background-color: rgba($primary, 0.3)
413414
}
@@ -481,15 +482,15 @@ a:not([href]):not([class]):hover {
481482
align-items: center;
482483
}
483484

484-
.td-content figure > img {
485+
.td-content figure>img {
485486
width: auto;
486487
max-width: 100%;
487488
border-radius: .5rem .5rem 0 0;
488489
box-shadow: 0 0 0.5rem rgba(0, 179, 159, 0.4);
489490
transition: box-shadow 0.2s;
490491
}
491492

492-
.td-content figure > figcaption {
493+
.td-content figure>figcaption {
493494
width: 100%;
494495
text-align: center;
495496
padding: 0.5rem 1rem;
@@ -777,3 +778,12 @@ a:not([href]):not([class]):hover {
777778
letter-spacing: 0.03em;
778779
}
779780
}
781+
782+
html {
783+
scroll-padding-top: 5rem;
784+
scroll-behavior: smooth;
785+
}
786+
787+
h1, h2, h3, h4, h5, h6 {
788+
scroll-margin-top: 1rem;
789+
}

0 commit comments

Comments
 (0)