Skip to content

Commit 24374a4

Browse files
committed
Add mediaquery for large screens
Just fix the auto-fitting columns for the cards. All screens have a minwidth of 300px and 1fr for max; on larger screens it's the other way around, max = 300px. With other solutions I tried, like setting a max width on one of the containers, the hero triangle gets smaller too.
1 parent 1eabffc commit 24374a4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/assets/stylesheets/home.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,17 @@ hr.separator-line {
8282
display: grid;
8383
grid-gap: 1rem;
8484
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
85-
// ^ make it responsive without mediaqueries:
85+
// ^ no media queries needed for smaller screens
8686
margin-bottom: 3vh;
8787
}
8888

89+
@media screen and (min-width: 1400px) {
90+
.cards {
91+
//background-color: deeppink;
92+
grid-template-columns: repeat(auto-fit, minmax(1fr, 300px));
93+
}
94+
}
95+
8996
.card {
9097
background-color: $DJSbackground_grey;
9198
padding: 1rem;

0 commit comments

Comments
 (0)