Skip to content
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

fixing hover effect on cards on News page #4691

Merged
merged 4 commits into from
Aug 23, 2023
Merged
Changes from 2 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
25 changes: 18 additions & 7 deletions src/components/Card/Card.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,23 @@ export const CardWrapper = styled.div`
border-top-right-radius: 0.5rem;
border-top-left-radius: 0.5rem;

.gatsby-image-wrapper, .old-gatsby-image-wrapper{
.gatsby-image-wrapper{
height:80%;
width:70%;
margin-top: 0.5rem;
margin-left: 3rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you have explicitly added margin-left as 3rem which is causing alignment issues on some screen size between desktop and mobile(image is not in center of the card).

Maybe you can try
margin:auto; margin-top:0.5rem;
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Well good work @VamshiReddy02 it is working for the desktop screen.

transition: all 0.3s ease-in;
}
.old-gatsby-image-wrapper{
height:100%;
width:70%;
margin-left: 3rem;
transition: all 0.3s ease-in;
}
img{
height: inherit;
max-height: 180px;
display: block;
text-align: center;
margin: auto;
img{
padding: 0px;
width: 100%;
height: 100%;
}
}

Expand Down Expand Up @@ -97,6 +104,8 @@ export const CardWrapper = styled.div`
.post-meta-block{
height: auto;
display: flex;
margin-buttom: 0.5rem;


.author{
text-align: end;
Expand All @@ -118,6 +127,7 @@ export const CardWrapper = styled.div`
.readmore-btn-wrapper{
display:flex;
justify-content: flex-start;

}

.readmore-btn::after{
Expand All @@ -136,6 +146,7 @@ export const CardWrapper = styled.div`
align-items: center;
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);


svg{
font-size: 1.5rem;
transition: all 0.3s;
Expand Down