Skip to content

Commit

Permalink
Update responsive layout and styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave-lab12 committed Feb 9, 2024
1 parent bc9126a commit f32817a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/components/Blog/BlogCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ function stripHtml(dirtyString: string) {
color: var(--gray-6, #f2f2f2);
}

@media screen and (max-width: 1127px) {
.card {
margin: auto;
}
}
@media screen and (max-width: 768px) {
.card {
display: flex;
flex-direction: column-reverse;
margin: auto;
}
.card-img {
max-width: 100%;
Expand Down
3 changes: 1 addition & 2 deletions src/layouts/ResponsiveCards.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { gap = "1rem", width = "402px" } = Astro.props;
<style define:vars={{ gap, width }}>
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(425px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(475px, 1fr));
gap: 25px;
}

Expand All @@ -27,4 +27,3 @@ const { gap = "1rem", width = "402px" } = Astro.props;
}
}
</style>

0 comments on commit f32817a

Please sign in to comment.