From 24756e2ea93d115c33453a32c601be95cf86813a Mon Sep 17 00:00:00 2001 From: samuelgoddard Date: Thu, 26 Apr 2018 15:57:48 +0100 Subject: [PATCH 1/4] updated nav links padding so they don't overlap the menu at narrow browser widths --- lib/default-theme/NavLinks.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/default-theme/NavLinks.vue b/lib/default-theme/NavLinks.vue index 5b19cb9d60..cc404120ce 100644 --- a/lib/default-theme/NavLinks.vue +++ b/lib/default-theme/NavLinks.vue @@ -117,10 +117,15 @@ export default { .repo-link margin-left 1.5rem -@media (max-width: $MQMobile) +@media (min-width: $MQMobile) + .nav-links + .nav-item, .repo-link + margin-left 0.75rem + +@media (min-width: $MQNarrow) .nav-links .nav-item, .repo-link - margin-left 0 + margin-left 1.5rem @media (min-width: $MQMobile) .nav-links a From 7f52977cd12876921bbb1c0c889800a61a4ee4f6 Mon Sep 17 00:00:00 2001 From: samuelgoddard Date: Thu, 26 Apr 2018 15:58:17 +0100 Subject: [PATCH 2/4] updated search box so it doesn't break at narrow viewpoints, now absolutely positions over the top of the nav --- lib/default-theme/SearchBox.vue | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/default-theme/SearchBox.vue b/lib/default-theme/SearchBox.vue index 395bdce4f9..dee514ca5f 100644 --- a/lib/default-theme/SearchBox.vue +++ b/lib/default-theme/SearchBox.vue @@ -184,17 +184,40 @@ export default { a color $accentColor -@media (max-width: $MQNarrow) +@media (max-width: $MQMobile) .search-box + margin-right 0 + display inline-block input + position relative + left 1rem cursor pointer width 0 border-color transparent - position relative - left 1rem + background-color white + z-index 10 + &:focus + cursor text + width 10rem + +@media (min-width: $MQMobile) and (max-width: $MQNarrow) + .search-box + position relative + display inline-block + width 30px + height 23px + margin-right 0 + input + cursor pointer + width 0 + border-color transparent + position absolute + background-color white + z-index 10 + left 0 + top: 0 &:focus cursor text - left 0 width 10rem @media (max-width: $MQNarrow) and (min-width: $MQMobile) From c90dd820520cdb1b43505b892cbb4c3c87283d7a Mon Sep 17 00:00:00 2001 From: samuelgoddard Date: Mon, 30 Apr 2018 09:59:24 +0100 Subject: [PATCH 3/4] : removed, change request - https://github.com/vuejs/vuepress/pull/266/files/7f52977cd12876921bbb1c0c889800a61a4ee4f6 --- lib/default-theme/SearchBox.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/default-theme/SearchBox.vue b/lib/default-theme/SearchBox.vue index dee514ca5f..62e95d7e1c 100644 --- a/lib/default-theme/SearchBox.vue +++ b/lib/default-theme/SearchBox.vue @@ -215,7 +215,7 @@ export default { background-color white z-index 10 left 0 - top: 0 + top 0 &:focus cursor text width 10rem From a235176f56cd0fcb0730a3857f6085ab1350404b Mon Sep 17 00:00:00 2001 From: samuelgoddard Date: Mon, 30 Apr 2018 10:05:23 +0100 Subject: [PATCH 4/4] multiple media queries merged --- lib/default-theme/NavLinks.vue | 12 +++++------- lib/default-theme/SearchBox.vue | 8 ++------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/lib/default-theme/NavLinks.vue b/lib/default-theme/NavLinks.vue index cc404120ce..11f72dd05b 100644 --- a/lib/default-theme/NavLinks.vue +++ b/lib/default-theme/NavLinks.vue @@ -121,13 +121,6 @@ export default { .nav-links .nav-item, .repo-link margin-left 0.75rem - -@media (min-width: $MQNarrow) - .nav-links - .nav-item, .repo-link - margin-left 1.5rem - -@media (min-width: $MQMobile) .nav-links a &:hover, &.router-link-active color $textColor @@ -135,4 +128,9 @@ export default { &:hover, &.router-link-active margin-bottom -2px border-bottom 2px solid lighten($accentColor, 8%) + +@media (min-width: $MQNarrow) + .nav-links + .nav-item, .repo-link + margin-left 1.5rem diff --git a/lib/default-theme/SearchBox.vue b/lib/default-theme/SearchBox.vue index 62e95d7e1c..f5cda7cafd 100644 --- a/lib/default-theme/SearchBox.vue +++ b/lib/default-theme/SearchBox.vue @@ -199,6 +199,8 @@ export default { &:focus cursor text width 10rem + suggestions: + rigt 0 @media (min-width: $MQMobile) and (max-width: $MQNarrow) .search-box @@ -225,12 +227,6 @@ export default { .suggestions left 0 -@media (max-width: $MQMobile) - .search-box - margin-right 0 - .suggestions - right 0 - @media (max-width: $MQMobileNarrow) .search-box .suggestions