fix(ui): fade the hidden edges of horizontally scrolling tab rows
This commit is contained in:
1 parent
06014f4a39
commit
e5520ae4e5
2 files changed
+37
-1
No files matched your search
@@ -94,3 +94,39 @@
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fades whichever edge of a horizontal scroller still hides content. */
|
||||
@property --fade-start {
|
||||
syntax: "<length>";
|
||||
inherits: false;
|
||||
initial-value: 0px;
|
||||
}
|
||||
@property --fade-end {
|
||||
syntax: "<length>";
|
||||
inherits: false;
|
||||
initial-value: 1.5rem;
|
||||
}
|
||||
@keyframes scroll-fade-x {
|
||||
0% {
|
||||
--fade-start: 0px;
|
||||
}
|
||||
10%,
|
||||
90% {
|
||||
--fade-start: 1.5rem;
|
||||
--fade-end: 1.5rem;
|
||||
}
|
||||
100% {
|
||||
--fade-end: 0px;
|
||||
}
|
||||
}
|
||||
@utility scroll-fade-x {
|
||||
mask-image: linear-gradient(
|
||||
to right,
|
||||
transparent,
|
||||
#000 var(--fade-start),
|
||||
#000 calc(100% - var(--fade-end)),
|
||||
transparent
|
||||
);
|
||||
animation: scroll-fade-x linear both;
|
||||
animation-timeline: scroll(self inline);
|
||||
}
|
||||
Reference in new issue
Block a user