Skip to content

Commit fceed5d

Browse files
committed
move fade to shared css
1 parent d74d429 commit fceed5d

2 files changed

Lines changed: 46 additions & 46 deletions

File tree

‎src/browser/styles/globals.css‎

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -793,52 +793,6 @@ body {
793793

794794
@import "./scrollbar-none.css";
795795

796-
/*
797-
* Edge fade for rows that scroll sideways with a hidden scrollbar (#5696): an edge fades out
798-
* while more items sit past it, so cut-off items do not look missing. Scroll-driven CSS, no JS:
799-
* a row that fits has an inactive scroll timeline and shows no fade, and browsers without scroll
800-
* timelines keep the plain row.
801-
*/
802-
@property --scroll-fade-start {
803-
syntax: "<length>";
804-
inherits: false;
805-
initial-value: 0px;
806-
}
807-
@property --scroll-fade-end {
808-
syntax: "<length>";
809-
inherits: false;
810-
initial-value: 0px;
811-
}
812-
@keyframes scroll-fade-x {
813-
0% {
814-
--scroll-fade-start: 0px;
815-
--scroll-fade-end: 24px;
816-
}
817-
10%,
818-
90% {
819-
--scroll-fade-start: 24px;
820-
--scroll-fade-end: 24px;
821-
}
822-
100% {
823-
--scroll-fade-start: 24px;
824-
--scroll-fade-end: 0px;
825-
}
826-
}
827-
@supports (animation-timeline: scroll()) {
828-
.scroll-fade-x {
829-
mask-image: linear-gradient(
830-
to right,
831-
transparent,
832-
#000 var(--scroll-fade-start),
833-
#000 calc(100% - var(--scroll-fade-end)),
834-
transparent
835-
);
836-
animation: scroll-fade-x linear both;
837-
/* After the shorthand, which resets the timeline. */
838-
animation-timeline: scroll(self inline);
839-
}
840-
}
841-
842796
/* Root container */
843797
html,
844798
body,

‎src/browser/styles/scrollbar-none.css‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,49 @@
1212
scrollbar-width: none;
1313
scrollbar-color: auto;
1414
}
15+
16+
/*
17+
* Edge fade for rows that scroll sideways with a hidden scrollbar (#5696): an edge fades out
18+
* while more items sit past it, so cut-off items do not look missing. Scroll-driven CSS, no JS:
19+
* a row that fits has an inactive scroll timeline and shows no fade, and browsers without scroll
20+
* timelines keep the plain row.
21+
*/
22+
@property --scroll-fade-start {
23+
syntax: "<length>";
24+
inherits: false;
25+
initial-value: 0px;
26+
}
27+
@property --scroll-fade-end {
28+
syntax: "<length>";
29+
inherits: false;
30+
initial-value: 0px;
31+
}
32+
@keyframes scroll-fade-x {
33+
0% {
34+
--scroll-fade-start: 0px;
35+
--scroll-fade-end: 24px;
36+
}
37+
10%,
38+
90% {
39+
--scroll-fade-start: 24px;
40+
--scroll-fade-end: 24px;
41+
}
42+
100% {
43+
--scroll-fade-start: 24px;
44+
--scroll-fade-end: 0px;
45+
}
46+
}
47+
@supports (animation-timeline: scroll()) {
48+
.scroll-fade-x {
49+
mask-image: linear-gradient(
50+
to right,
51+
transparent,
52+
#000 var(--scroll-fade-start),
53+
#000 calc(100% - var(--scroll-fade-end)),
54+
transparent
55+
);
56+
animation: scroll-fade-x linear both;
57+
/* After the shorthand, which resets the timeline. */
58+
animation-timeline: scroll(self inline);
59+
}
60+
}

0 commit comments

Comments
 (0)