Respect users's "reduced motion" preference for smooth scrolling
This commit is contained in:
parent
62e04a1bbd
commit
8ee653f252
3 changed files with 15 additions and 3 deletions
|
@ -106,6 +106,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Smooth scrolling
|
||||
|
||||
@mixin smooth-scroll() {
|
||||
scroll-behavior: smooth;
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Icons
|
||||
|
||||
@mixin color-svg($svg, $color, $stretch: true) {
|
||||
|
|
|
@ -6308,12 +6308,13 @@ button.module-image__border-overlay:focus {
|
|||
&__scroll-marker {
|
||||
$scroll-marker-selector: &;
|
||||
|
||||
@include smooth-scroll;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
position: absolute;
|
||||
scroll-behavior: smooth;
|
||||
transition: opacity 200ms ease-out;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
|
@ -6896,7 +6897,7 @@ button.module-image__border-overlay:focus {
|
|||
// Module: conversation list
|
||||
|
||||
.module-conversation-list {
|
||||
scroll-behavior: smooth;
|
||||
@include smooth-scroll;
|
||||
|
||||
&__item {
|
||||
&--archive-button {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
.module-ContactPills {
|
||||
@include smooth-scroll;
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 10px;
|
||||
|
@ -9,7 +11,6 @@
|
|||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-left: 12px;
|
||||
scroll-behavior: smooth;
|
||||
|
||||
.module-ContactPill {
|
||||
margin: 4px 6px;
|
||||
|
|
Loading…
Reference in a new issue