From 1ff78cd0b2ad79074cbc7c192361505bb101b208 Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Fri, 21 Oct 2022 15:54:24 -0400 Subject: [PATCH] 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. --- modules/ext.tabberNeue.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ext.tabberNeue.less b/modules/ext.tabberNeue.less index 3a5ffed..1dff432 100644 --- a/modules/ext.tabberNeue.less +++ b/modules/ext.tabberNeue.less @@ -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: ''; }