Skip to content

Commit 926c8cb

Browse files
authored
Merge pull request #1339 from aryanpingle/main
Change timeline button borders for readability
2 parents d9a70df + 2405fac commit 926c8cb

File tree

6 files changed

+29
-3
lines changed

6 files changed

+29
-3
lines changed

src/components/TimestampTimeline.module.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
display: flex;
1212
padding: 0;
1313
cursor: pointer;
14+
15+
&:first-child {
16+
/* border-top will be set by the variant */
17+
border-top: none !important;
18+
}
19+
1420
& span {
1521
display: flex;
1622
align-items: center;
@@ -66,6 +72,10 @@
6672
& .time {
6773
color: var(--red);
6874
}
75+
76+
& .timestamp {
77+
border-top: var(--border-red-light);
78+
}
6979
}
7080

7181
.cyan {
@@ -81,6 +91,10 @@
8191
& .time {
8292
color: var(--cyan);
8393
}
94+
95+
& .timestamp {
96+
border-top: var(--border-cyan-light);
97+
}
8498
}
8599

86100
@media (--reduced) {

src/components/challenges/VideoSection.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@
149149
color: var(--cyan);
150150
font-size: var(--maru-small);
151151
font-family: var(--maru-mono);
152+
153+
background-color: var(--red-lightest);
152154
}
153155

154156
.partTimeline.hide,

src/components/tracks/OverviewTimeline.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const ChapterSection = memo(
9696
return (
9797
<ul className={css.chapterList}>
9898
{chapter.title && (
99-
<li>
99+
<li className={css.chapterListItem}>
100100
<button
101101
className={cn(
102102
css.chapterTitle,
@@ -129,7 +129,7 @@ const ChapterSection = memo(
129129
return (
130130
<li
131131
key={`${video.slug}-${partIndex}`}
132-
className={cn(css.videoItem, {
132+
className={cn(css.videoItem, css.chapterListItem, {
133133
[css.seen]: hasSeenPart,
134134
[css.last]: isLastVideo && partIndex === currentPartIndex
135135
})}>
@@ -146,7 +146,7 @@ const ChapterSection = memo(
146146
) : (
147147
<li
148148
key={video.slug}
149-
className={cn(css.videoItem, {
149+
className={cn(css.videoItem, css.chapterListItem, {
150150
[css.seen]: hasSeenVideo,
151151
[css.last]: isLastVideo
152152
})}>

src/components/tracks/OverviewTimeline.module.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
padding: 0;
3737
}
3838

39+
.chapterListItem {
40+
/*
41+
CSS 'border' interferes with the track stop lines, so we use a box shadow that matches 'border-red-light'.
42+
*/
43+
box-shadow: 0 -1px 0 rgba(255, 0, 0, 0.1);
44+
}
45+
3946
.chapterTitle {
4047
position: relative;
4148
height: var(--baseline);

src/components/tracks/VideoSection.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@
150150
color: var(--red);
151151
font-size: var(--maru-small);
152152
font-family: var(--maru-mono);
153+
154+
background-color: var(--red-lightest);
153155
}
154156

155157
.overviewTimeline.hide,

src/styles/variables.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
--border-red-light: 1px solid rgba(255, 0, 0, 0.1);
112112
--border-orange: 1px solid var(--orange);
113113
--border-cyan: 1px solid var(--cyan);
114+
--border-cyan-light: 1px solid rgba(0, 128, 128, 0.1);
114115
--border-pink: 1px solid var(--pink);
115116

116117
--box-padding: 25px;

0 commit comments

Comments
 (0)