mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
Improve markdown TOC scrolling (#349)
Use a better system for scrolling using scrollTo on the OverlayScrollbars ref. This lets me get the heading as close to the top of the viewport as possible without the convoluted CSS tricks I was trying before.
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
font-size: 14px;
|
||||
overflow-wrap: break-word;
|
||||
margin-bottom: 10px;
|
||||
--half-contents-height: 10em;
|
||||
|
||||
.heading {
|
||||
&:first-of-type {
|
||||
@@ -26,7 +25,6 @@
|
||||
color: var(--app-text-color);
|
||||
margin-top: 16px;
|
||||
margin-bottom: 8px;
|
||||
scroll-margin-block-end: var(--half-contents-height);
|
||||
}
|
||||
|
||||
strong {
|
||||
|
||||
Reference in New Issue
Block a user