Skip to content

Commit 84361df

Browse files
feat(alpha): Fade out scroller buttons nicely
1 parent 8b6d089 commit 84361df

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/assets/stylesheets/components/scroller.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,19 @@
7979
top: calc(50% + var(--scroller-button-offset, 0px));
8080

8181
transform: translateY(-50%);
82+
83+
transition:
84+
opacity 0.2s ease-in-out,
85+
visibility 0.2s ease-in-out,
86+
filter 0.2s ease-in-out,
87+
background-color 0.2s ease-in-out,
88+
border-color 0.2s ease-in-out;
8289
}
8390

8491
.scroller__button:disabled {
85-
display: none;
92+
visibility: hidden;
93+
94+
opacity: 0;
8695
}
8796

8897
.scroller__button--previous {

src/views/collections/followers/edit.html.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
title="{{ t('Display the previous streams') }}"
110110
data-scroller-target="previous"
111111
data-action="scroller#previous"
112+
disabled
112113
>
113114
{{ icon('arrow-left', 'rotate90') }}
114115

@@ -161,6 +162,7 @@
161162
title="{{ t('Display the next streams') }}"
162163
data-scroller-target="next"
163164
data-action="scroller#next"
165+
disabled
164166
>
165167
{{ icon('arrow-right', 'rotate90') }}
166168

src/views/streams/_filters.html.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
title="{{ t('Display the previous days') }}"
3232
data-scroller-target="previous"
3333
data-action="scroller#previous"
34+
disabled
3435
>
3536
{{ icon('arrow-left') }}
3637

@@ -126,6 +127,7 @@
126127
title="{{ t('Display the next days') }}"
127128
data-scroller-target="next"
128129
data-action="scroller#next"
130+
disabled
129131
>
130132
{{ icon('arrow-right') }}
131133

0 commit comments

Comments
 (0)