Skip to content

Commit

Permalink
Merge pull request #47 from stackabletech/refactor/boxes-css
Browse files Browse the repository at this point in the history
refactor: Use CSS `grid` instead of `flex` for boxes wrapper
  • Loading branch information
fhennig authored Nov 14, 2023
2 parents d2d8b04 + 29a1bbb commit 5d05a8e
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions src/css/landing.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
.boxes {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
display: grid;
column-gap: 1rem;
row-gap: 2rem;
grid-template-columns: 1fr 1fr 1fr;
}

.box {
flex: 0 30%;
min-height: 200px;
margin-bottom: 2%; /* (200-32*3)/2 */
}

.boxes.two-column .box {
flex: 0 48%;
.boxes.two-column {
grid-template-columns: 1fr 1fr;
}

.box h3 {
Expand All @@ -31,13 +26,13 @@
}

@media screen and (max-width: 1023.5px) {
.box {
flex: 0 47% !important;
.boxes {
grid-template-columns: 1fr 1fr;
}
}

@media screen and (max-width: 768px) {
.box {
flex: 0 100% !important;
.boxes {
grid-template-columns: 1fr;
}
}

0 comments on commit 5d05a8e

Please sign in to comment.