feat: add scroll snap to section

This is required for anchor links to scroll to the correct tab.
However this might re-trigger the bug mentioned in #47 and #38,
need some alternative to fix those.
This commit is contained in:
alistair3149 2022-10-21 15:54:24 -04:00
parent 767ac2ee28
commit 1ff78cd0b2
No known key found for this signature in database

View file

@ -25,6 +25,7 @@
block-size: 100%;
grid-auto-columns: 100%;
grid-auto-flow: column;
scroll-snap-type: x mandatory;
}
&__header {
@ -127,6 +128,7 @@
&__panel {
height: max-content;
overflow-x: auto;
scroll-snap-align: start;
// Hide edit buttons for non-transclusion tabs since they don't work
/* stylelint-disable-next-line selector-class-pattern */
@ -151,10 +153,10 @@
display: inline-block;
width: @width-bounce-dot;
height: @width-bounce-dot;
border-radius: 100%;
animation: bounce-delay 1600ms infinite ease-in-out both;
animation-delay: -160ms;
background-color: #36c;
border-radius: 100%;
content: '';
}