From 595033c4c77d6dfe700e2cdaa3ae6bf5400b8f31 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Mon, 19 Apr 2021 12:48:59 +0300 Subject: [PATCH] apply scroll-snap to tabs --- chrome/multi-row_tabs.css | 6 +++++- chrome/multi-row_tabs_below_content.css | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/chrome/multi-row_tabs.css b/chrome/multi-row_tabs.css index 1bc8be5..3d74fbb 100644 --- a/chrome/multi-row_tabs.css +++ b/chrome/multi-row_tabs.css @@ -39,6 +39,7 @@ See the above repository for updates as well as full license text. */ max-height: calc((var(--tab-min-height) + 2 * var(--proton-tab-block-margin,0px)) * var(--multirow-n-rows)); scrollbar-color: currentColor transparent; scrollbar-width: thin; + scroll-snap-type: y mandatory; } } @@ -49,7 +50,10 @@ See the above repository for updates as well as full license text. */ --scrollbutton-display-model: none; } -.tabbrowser-tab{ height: calc((var(--tab-min-height) + 2 * var(--proton-tab-block-margin,0px))) !important; } +.tabbrowser-tab{ + height: calc((var(--tab-min-height) + 2 * var(--proton-tab-block-margin,0px))) !important; + scroll-snap-align: start; +} #tabbrowser-tabs .tabbrowser-tab[pinned]{ position: static !important; diff --git a/chrome/multi-row_tabs_below_content.css b/chrome/multi-row_tabs_below_content.css index 6a7a59b..16e7311 100644 --- a/chrome/multi-row_tabs_below_content.css +++ b/chrome/multi-row_tabs_below_content.css @@ -142,6 +142,7 @@ See the above repository for updates as well as full license text. */ max-height: var(--uc-scrollbox-max-height,1px); scrollbar-color: currentColor transparent; scrollbar-width: thin; + scroll-snap-type: y mandatory; } .scrollbox-clip[orient="horizontal"], @@ -155,7 +156,10 @@ See the above repository for updates as well as full license text. */ :root[inFullscreen] .scrollbox-clip[orient="horizontal"]:not(:hover), :root[inFullscreen] #tabbrowser-arrowscrollbox:not(:hover){ --uc-scrollbox-max-height: 1px; min-height: 1px !important; } - .tabbrowser-tab{ height: calc((var(--tab-min-height) + 2 * var(--proton-tab-block-margin,0px))) !important; } + .tabbrowser-tab{ + height: calc((var(--tab-min-height) + 2 * var(--proton-tab-block-margin,0px))) !important; + scroll-snap-align: start; + } .tabbrowser-tab[pinned]{ position: static !important;