Merge pull request #7028 from continuedev/bdougie/con-3140
docs: smooth scrolling
This commit is contained in:
commit
e575fdba78
2 changed files with 35 additions and 0 deletions
32
docs/custom.css
Normal file
32
docs/custom.css
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* Custom CSS for Continue documentation */
|
||||
|
||||
/* Enable smooth scrolling for anchor links */
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
/* Adjust scroll padding to account for fixed header */
|
||||
scroll-padding-top: 80px;
|
||||
}
|
||||
|
||||
/* Ensure proper spacing for heading anchors */
|
||||
h1[id],
|
||||
h2[id],
|
||||
h3[id],
|
||||
h4[id],
|
||||
h5[id],
|
||||
h6[id] {
|
||||
scroll-margin-top: 80px;
|
||||
}
|
||||
|
||||
/* Optional: Add a subtle highlight effect when navigating to anchors */
|
||||
:target {
|
||||
animation: highlight 2s ease-out;
|
||||
}
|
||||
|
||||
@keyframes highlight {
|
||||
0% {
|
||||
background-color: rgba(255, 235, 59, 0.3);
|
||||
}
|
||||
100% {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
|
@ -337,6 +337,9 @@
|
|||
"apiKey": "phc_JS6XFROuNbhJtVCEdTSYk6gl5ArRrTNMpCcguAXlSPs"
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"css": ["custom.css"]
|
||||
},
|
||||
"redirects": [
|
||||
{
|
||||
"source": "/hub",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue