Skip to content

Update: Improved hover styles to Watch Page #4677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/src/pages/Home/Watch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Watch() {
description={
<>
Watch talks by the React team and learn how to get the most out of
React Native. Find the latest on{' '}
React Native. <br /> Find the latest on{' '}
<a href="https://twitter.com/intent/follow?screen_name=reactnative&region=follow_link">
X
</a>
Expand Down
26 changes: 22 additions & 4 deletions website/src/pages/Home/Watch/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,46 @@
.videos {
display: grid;
grid-template-columns: repeat(2, minmax(300px, 1fr));
gap: 1rem;
gap: 2rem;
margin: 2rem auto;
}

.videoContainer {
border: 1px solid var(--home-border);
/* border: 1px solid var(--home-border); */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's retain the border for the container.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, no problem. I'll remove it for a cleaner look but totally okay keeping the border if you think it's important for layout clarity.

border-radius: 12px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.03);
padding: 16px;
display: flex;
flex-direction: column;
gap: 1rem;
max-width: 400px;
max-width: 500px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we should also set proper aspect-ratio to ensure that there are no black bars when manipulating the viewport.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I’ll experiment with a couple of aspect-ratio settings and test how it behaves on various viewports will push an update soon.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

background: var(--home-background);
transition:
box-shadow 0.2s,
transform 0.2s;
}

.video {
width: 100%;
height: 200px;
height: 240px;
border-radius: 8px;
border: 1px solid var(--home-border);
}
/* Hover effect for video container */
.videoContainer:hover {
box-shadow:
0px 8px 24px rgba(0, 0, 0, 0.15),
0px 1.5px 8px rgba(0, 0, 0, 0.1);
transform: translateY(-4px) scale(1.05);
}

@media (prefers-color-scheme: light) {
.videoContainer:hover {
box-shadow:
0px 8px 24px rgba(0, 0, 0, 0.1),
0px 1.5px 8px rgba(0, 0, 0, 0.08);
}
}

.videoInfo {
display: flex;
Expand Down