From 4a53fc8204d5a3a3d5a77b3dfe128f0985153bf8 Mon Sep 17 00:00:00 2001 From: Kim <1877318+kimsible@users.noreply.github.com> Date: Mon, 10 Aug 2020 15:57:37 +0200 Subject: Add new anchors in my-settings and handle offset sub-menu height (#3032) * Add anchors setting and handle offset with sub-meu * Use PeerTube scroll logic * Add anchor for top my-settings * Improve scroller with smooth behavior and css offset * Fix anchor position when using history navigation Co-authored-by: kimsible --- client/src/sass/application.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client/src/sass/application.scss') diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index 1dbdd4064..4f2278414 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss @@ -18,6 +18,10 @@ $assets-path: '../../assets/'; display: none !important; } +html { + scroll-behavior: smooth; +} + body { /*** theme ***/ // now beware node-sass requires interpolation @@ -307,7 +311,7 @@ table { .anchor { position: relative; - top: #{-($header-height + 20px)}; + top: #{-($header-height + 20px)}; // offsetTop scrollToAnchor } @media screen and (max-width: #{breakpoint(xxl)}) { -- cgit v1.2.3