diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-17 18:31:21 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-17 18:31:21 +0200 |
| commit | 9a186b357b32325cf77fdce39a6c6c9aff76d8a5 (patch) | |
| tree | bfeb790f3cc82f753ac74c9b0130f43189502803 /src/components/templates/layout/layout.module.scss | |
| parent | c77c58e18143233be042c4980a6ed08ae9beac52 (diff) | |
chore: listen scroll to hide/show back to top button
Diffstat (limited to 'src/components/templates/layout/layout.module.scss')
| -rw-r--r-- | src/components/templates/layout/layout.module.scss | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/templates/layout/layout.module.scss b/src/components/templates/layout/layout.module.scss index 806d2d7..09904dc 100644 --- a/src/components/templates/layout/layout.module.scss +++ b/src/components/templates/layout/layout.module.scss @@ -13,6 +13,20 @@ border-top: fun.convert-px(3) solid var(--color-border-light); } +.back-to-top { + &--hidden { + opacity: 0; + transform: translateY(calc(var(--button-size) + var(--spacing-md))); + visibility: hidden; + } + + &--visible { + opacity: 1; + transform: translateY(0); + visibility: visible; + } +} + .noscript-spacing { width: 100%; height: fun.convert-px(75); |
