From 2ebc4288d637830fd75f10cbaab43dd9af828867 Mon Sep 17 00:00:00 2001 From: Utkarsh Kukreti Date: Sat, 1 Oct 2016 15:08:35 +0530 Subject: [PATCH] Wrap instead of hiding crate list sections on mobile. --- app/styles/home.scss | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/app/styles/home.scss b/app/styles/home.scss index 4512ac5b41d..330287d2c9f 100644 --- a/app/styles/home.scss +++ b/app/styles/home.scss @@ -121,18 +121,21 @@ } li a:hover { background-color: darken($main-bg-dark, 5%); } - @media only screen and (max-width: 750px) { - #just-updated { display: none; } - } - @media only screen and (max-width: 550px) { - #new-crates { display: none; } - } } -#home-crates > div { - @include flex(1); - - // flexbox trick to help truncate text and prevent overflow - // https://css-tricks.com/flexbox-truncated-text/ - min-width: 0; +#home-crates { + @include flex-wrap(wrap); + @include justify-content(center); + + > div { + margin: 0; + padding: 0 15px; + width: 33.33%; + @media only screen and (max-width: 750px) { + width: 50%; + } + @media only screen and (max-width: 550px) { + width: 100%; + } + } }