From 08822fbdcacb0a0461379e42150b20e09c6be357 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Fri, 26 Jan 2018 14:46:52 +0100 Subject: [PATCH 1/3] added media break for md and sm --- public/sass/components/_search.scss | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/public/sass/components/_search.scss b/public/sass/components/_search.scss index d90943f4b60..f92f4dd1f27 100644 --- a/public/sass/components/_search.scss +++ b/public/sass/components/_search.scss @@ -248,6 +248,39 @@ background: $panel-bg; } +@include media-breakpoint-down(md) { + .search-dropdown { + flex-direction: column; + } + + .search-dropdown__col_1 { + height: 100%; + } + + .search-dropdown__col_2 { + max-width: 700px; + flex-direction: row; + margin: 0; + justify-content: space-between; + height: 260px; + } + + .search-filter-box { + margin: 0; + } +} + +@include media-breakpoint-down(sm) { + .search-dropdown__col_2 { + flex-direction: column; + height: 100%; + } + + .search-filter-box { + margin-bottom: 1.5rem; + } +} + @include media-breakpoint-down(xs) { .search-container { left: 0; From 2f891726c325fadde967e2ea232ee326b3e382a2 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Fri, 26 Jan 2018 14:57:55 +0100 Subject: [PATCH 2/3] fix for sm --- public/sass/components/_search.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/sass/components/_search.scss b/public/sass/components/_search.scss index f92f4dd1f27..9ae277ce0a5 100644 --- a/public/sass/components/_search.scss +++ b/public/sass/components/_search.scss @@ -273,7 +273,8 @@ @include media-breakpoint-down(sm) { .search-dropdown__col_2 { flex-direction: column; - height: 100%; + height: 80%; + justify-content: flex-start; } .search-filter-box { From ffff75b01a20ee8692c3462334fd814a89d8405b Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Fri, 26 Jan 2018 16:59:16 +0100 Subject: [PATCH 3/3] reverted media queries --- public/sass/components/_search.scss | 63 +++++++++++++---------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/public/sass/components/_search.scss b/public/sass/components/_search.scss index 9ae277ce0a5..98616571ed8 100644 --- a/public/sass/components/_search.scss +++ b/public/sass/components/_search.scss @@ -10,7 +10,7 @@ } .search-container { - left: $side-menu-width; + left: 0; top: 0; right: 0; bottom: 0; @@ -58,7 +58,7 @@ .search-dropdown { display: flex; - flex-direction: row; + flex-direction: column; height: calc(100% - #{$navbarHeight}); } @@ -74,7 +74,7 @@ flex-grow: 1; height: 100%; padding-top: 16px; - display: flex; + display: none; flex-direction: column; align-items: flex-start; } @@ -85,7 +85,6 @@ padding: $spacer*1.5; min-width: 340px; margin-bottom: $spacer * 1.5; - margin-left: $spacer * 1.5; } .search-filter-box__header { @@ -215,7 +214,8 @@ } .search-item__tags { - padding: 10px; + display: none; + //padding: 10px; } .search-item__actions { @@ -248,50 +248,45 @@ background: $panel-bg; } -@include media-breakpoint-down(md) { - .search-dropdown { - flex-direction: column; +@include media-breakpoint-up(sm) { + .search-container { + left: $side-menu-width; + } + + .search-dropdown__col_2 { + display: flex; + margin-bottom: 1rem; + } +} + +@include media-breakpoint-up(md) { + .search-dropdown__col_2 { + flex-direction: row; + justify-content: space-between; + max-width: 700px; + height: 260px; } .search-dropdown__col_1 { height: 100%; } - .search-dropdown__col_2 { - max-width: 700px; - flex-direction: row; - margin: 0; - justify-content: space-between; - height: 260px; - } - .search-filter-box { margin: 0; } } -@include media-breakpoint-down(sm) { +@include media-breakpoint-up(lg) { + .search-dropdown { + flex-direction: row; + } + .search-dropdown__col_2 { flex-direction: column; - height: 80%; - justify-content: flex-start; } .search-filter-box { - margin-bottom: 1.5rem; - } -} - -@include media-breakpoint-down(xs) { - .search-container { - left: 0; - } - - .search-dropdown__col_2 { - display: none; - } - - .search-item__tags { - display: none; + margin-left: $spacer * 1.5; + margin-bottom: $spacer * 1.5; } }