Skip to content

Commit

Permalink
Modify design of post card
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Feb 17, 2025
1 parent f4735fe commit 712487c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion apps/blog/src/components/PostCard/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
@use "sass:map";

.post-card {
$self: &;
display: flex;
padding: 16px 20px;
flex-direction: column;
transition: transform 0.15s ease-in-out;

@include supports-hover {
@at-root &:hover {
transform: translateY(-5px);
}
}

&__image {
position: relative;
width: 100%;
height: 0;
margin-bottom: 12px;
padding-bottom: 100%;
padding-bottom: 56.25%;
flex-shrink: 0;
transition: transform 0.15s ease-in-out;
overflow: hidden;

img {
position: absolute;
Expand All @@ -23,6 +33,12 @@
object-fit: cover;
border-radius: 4px;
transition: transform 0.15s ease-in-out;

@include supports-hover {
@at-root #{$self}:hover & {
transform: scale(1.15);
}
}
}
}

Expand Down

1 comment on commit 712487c

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Visual regression test result - success

Component Story Success Viewport MisMatch Percentage
components-button string-children phone 0.00%
components-button string-children tablet 0.10%
input-input default phone 0.00%
input-input default tablet 0.10%
input-input line phone 0.00%
input-input line tablet 0.04%
input-input box phone 0.00%
input-input box tablet 0.04%
components-profile default phone 0.00%
components-profile default tablet 0.00%
input-textarea line phone 0.00%
input-textarea line tablet 0.04%
input-textarea box phone 0.00%
input-textarea box tablet 0.04%
typography-typography default phone 0.00%
typography-typography default tablet 0.07%

Please sign in to comment.