Skip to content

Commit 7b6752d

Browse files
authored
Merge pull request #449 from utkarshkukreti/wrap-not-hide-crate-list-sections
Wrap instead of hiding crate list sections on mobile.
2 parents be9e617 + 2ebc428 commit 7b6752d

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

app/styles/home.scss

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,21 @@
121121
}
122122
li a:hover { background-color: darken($main-bg-dark, 5%); }
123123

124-
@media only screen and (max-width: 750px) {
125-
#just-updated { display: none; }
126-
}
127-
@media only screen and (max-width: 550px) {
128-
#new-crates { display: none; }
129-
}
130124
}
131125

132-
#home-crates > div {
133-
@include flex(1);
134-
135-
// flexbox trick to help truncate text and prevent overflow
136-
// https://css-tricks.com/flexbox-truncated-text/
137-
min-width: 0;
126+
#home-crates {
127+
@include flex-wrap(wrap);
128+
@include justify-content(center);
129+
130+
> div {
131+
margin: 0;
132+
padding: 0 15px;
133+
width: 33.33%;
134+
@media only screen and (max-width: 750px) {
135+
width: 50%;
136+
}
137+
@media only screen and (max-width: 550px) {
138+
width: 100%;
139+
}
140+
}
138141
}

0 commit comments

Comments
 (0)