Skip to content

Commit 32660e5

Browse files
committed
collapse and show video smoothly
1 parent 34cbfc9 commit 32660e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/content-script/update-solutions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ function createVideoContainer(videoUrl, channelName) {
5959
display: 'flex',
6060
justifyContent: 'center',
6161
paddingBottom: `${VIDEO_ASPECT_RATIO}%`,
62-
marginBottom: '60px'
62+
marginBottom: '60px',
63+
transition: 'padding-bottom 0.3s ease-out' // Add this line
6364
});
6465
container.classList.add('video-container');
6566

@@ -134,7 +135,7 @@ function addVideo(title: string) {
134135
}
135136
toggleButton.style.transition = 'transform 0.3s linear';
136137
}
137-
});
138+
})
138139

139140
// on hover, change background color of toggleButton
140141
toggleButton?.addEventListener('mouseover', () => {

0 commit comments

Comments
 (0)